• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Improving Photoreal Resolution for FSX

Messages
192
Country
germany
Hi Skydvdan1.

Try using GeoTiff Examiner:

http://www.mentorsoftwareinc.com/freebie/FREE0699.HTM

Dick

Is that software just for examining Tiffs? I'm not sure where to go from here. When I try to open the small test cell it says that the corresponding world file does not exist.

Hi, I don't know why ur geotiff didn't work. I'm happy to look at it if you want.

Bob

Here's what I'm using for this test.
http://c130sim.com/imagery/
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,415
Country
netherlands
Hi Dan,

Does it have to be WGS84? If so how would I convert it? I think that the ones I'm downloading are NAD83. But that still doesn't explain the ones that aren't geotif.

You can also use images that are not GeoTIFF, but in that case you will have to provide all placement information in the INF file for resample. When using GeoTIFF images that is not needed, so that makes your life a lot easier.

All input for resample does indeed have to be WGS84, as that is the projection used by FS. So if your data is in a different format, you will have to reproject your images. I use the gdalwarp tool for that (comes with GDAL). In the same package is also the gdal_translate tool, which I used to make my own GeoTIFF images from the BMP images I had.

Here's what I'm using for this test.

That is indeed a GeoTIFF image. I tried to convert it with gdalwarp to WGS84, but I am not really familiar with NAD83, so I could not find all correct parameters yet.

One thing I noticed when I used my own GeoTIFF images with resample, is that resample does not all all GeoTIFF formats. The TIFF file can be band seperated or not, and one of those two do not work (an error is thrown). I always forget which of the two works though :).
 
Messages
192
Country
germany
Hi Dan,



You can also use images that are not GeoTIFF, but in that case you will have to provide all placement information in the INF file for resample. When using GeoTIFF images that is not needed, so that makes your life a lot easier.

All input for resample does indeed have to be WGS84, as that is the projection used by FS. So if your data is in a different format, you will have to reproject your images. I use the gdalwarp tool for that (comes with GDAL). In the same package is also the gdal_translate tool, which I used to make my own GeoTIFF images from the BMP images I had.



That is indeed a GeoTIFF image. I tried to convert it with gdalwarp to WGS84, but I am not really familiar with NAD83, so I could not find all correct parameters yet.

One thing I noticed when I used my own GeoTIFF images with resample, is that resample does not all all GeoTIFF formats. The TIFF file can be band seperated or not, and one of those two do not work (an error is thrown). I always forget which of the two works though :).

I'll just have to put the placement info in myself. But my next issue is that I can't get resample to use regular tiffs. I can get bitmaps to work fine but not tiffs. Any idea why?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,415
Country
netherlands
Do you get an error or so? Maybe it is the band seperation I posted about.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,240
Country
us-wisconsin
Attached is a sample GeoTiff and inf file for the new resample.

Edited:
I changed the zipfile.

Dick
 
Last edited:

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,240
Country
us-wisconsin
Skydvdan1 said:
Dick,
So you made this Geotiff? Can you explain how?


TIF was made in PaintshopPro, saved uncompressed. GeotiffExaminer was used to make it a Geotiff ( adding the tags to the tif ).

Dick
 
Messages
192
Country
germany
TIF was made in PaintshopPro, saved uncompressed. GeotiffExaminer was used to make it a Geotiff ( adding the tags to the tif ).

Dick


I got GeotiffExaminer. Am I missing something? I still can't get tiffs to work with the resampler. I created a tiff then opened it in Geotiffexaminer. I then entered the values:

X Pixel Scale: 0.3
Y Pixel Scale: 0.3
Tie Point, WorldX: -111.000998
Tie Point, WorldY: 32.248459


Then I hit Update Referencing in Tiff File button. I assume that creates the GeoTiff. I then run it through the resampler and it compiles (very quickly for a 643mb image, and the output file is only 173KB), but when I put the output file in the scenery folder nothing appears in FS. Tired...I've been at this all day.
 
Last edited:
Messages
1,484
Dan, here's a small utility, run it from the command line and tell me what it reports.

It may give you a pointer as to where you've gone wrong.

Bob
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,415
Country
netherlands
Hi Dan,

I think you also want to run resample from the command prompt. In that case you can see the errors it throws at you. Remember these tools are command line tools, they work best if you don't use the Windows drag and drop methods :).
 
Messages
192
Country
germany
Hi Dan,

I think you also want to run resample from the command prompt. In that case you can see the errors it throws at you. Remember these tools are command line tools, they work best if you don't use the Windows drag and drop methods :).

Great.:(

Ok, I ran my test file and this is what I got:

resample info file: '1.inf
[source] type = 'geotiff
[source] type = 'geotiff
[source] sourcedir = 'sourcedata
[source] sourcefile= 'wtf.Tif'
[source] layer= 'Imagery'
[source] variation= 'Day'
Tiffreaddirectory: Warning, H:\sourcedata\wtf.tif: wrong data type 1 for XMLpacket"; tag ignored
Tiffreaddirectory: Warning, H:\sourcedata\wtf.tif: unknown field with tag 34665 (0x8769) encounterd.
Tiffreaddirectory: Warning, H:\sourcedata\wtf.tif: invalid Tiff directory; tags are not sorted in ascending order
[Destination] destdir = 'output'
[Destination] destbasefilename = '1test'
[Destination] LOD = auto
[Destination]destfiletype = 'bgl'
Cell 6 of 6 (100.00%); 0:00:12 elapsed, 0:00:00 remaining...




Elapsed time:00:00:01
Compression Stats:
Method: LZ1 compressed
Blocks: 5
Ratio: 4.0 : 1
Method: PTC
Blocks: 1
Ratio: 10.9 : 1
Totals:
Blocks: 6
Ratio: 4.5 : 1
Resample completed successfully.

I still don't get what the problem is.:confused:
 
Last edited:

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,240
Country
us-wisconsin
Hi Dan.

I think you need to back up a bit.

Zip a file with your geotiff image, and your inf file... or put it on your web address as before.

I can then look at it all and then post ( or email if you like ) a zip file with a folder structure, inf and geotiff that works. I don't know where you are stuck, but it shouldn't be this hard.

Dick
 
Messages
192
Country
germany
Hi Dan.

I think you need to back up a bit.

Zip a file with your geotiff image, and your inf file... or put it on your web address as before.

I can then look at it all and then post ( or email if you like ) a zip file with a folder structure, inf and geotiff that works. I don't know where you are stuck, but it shouldn't be this hard.

Dick

I'll have to create a new geotiff. the one I'm using is over 600mb.
 
Messages
1,484
Dan I queried your geotif using the utility "listgeo", here is the result:


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\fs_design_projects\dicks example\test\SourceData>listgeo wtf1.tif
wtf1.tif: Warning, wrong data type 1 for "XMLPacket"; tag ignored.
wtf1.tif: Warning, unknown field with tag 34665 (0x8769) encountered.
wtf1.tif: Warning, invalid TIFF directory; tags are not sorted in ascending orde
r.
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-111.000998 32.248459 0
ModelPixelScaleTag (1,3):
0.3 0.3 0
End_Of_Tags.
Keyed_Information:
End_Of_Keys.
End_Of_Geotiff.


Corner Coordinates:
Upper Left ( -111.001, 32.248)
Lower Left ( -111.001, -1455.752)
Upper Right ( 1370.999, 32.248)
Lower Right ( 1370.999, -1455.752)
Center ( 629.999, -711.752)

_____________________________________________________

It looks to me like you have an incorrect scaling factor, as your longitude for upper right and lower right wraps around the world a few times.

Under "model pixel scale" tag, you have .3, .3, 0

I queried one of my own geotifs, here is the result of listgeo for my file:
___________________________________________________________
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

H:\fs_design_projects\harvey_fsx>listgeo sno1.tif
Geotiff_Information:
Version: 1
Key_Revision: 1.0
Tagged_Information:
ModelTiepointTag (2,3):
0 0 0
-122.202029 47.9632241 0
ModelPixelScaleTag (1,3):
2.66121067e-005 2.66121067e-005 1
End_Of_Tags.
Keyed_Information:
GTModelTypeGeoKey (Short,1): ModelTypeGeographic
GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
GeographicTypeGeoKey (Short,1): GCS_WGS_84
GeogAngularUnitsGeoKey (Short,1): Angular_Degree
End_Of_Keys.
End_Of_Geotiff.

GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)

Corner Coordinates:
Upper Left (122d12' 7.30"W, 47d57'47.61"N)
Lower Left (122d12' 7.30"W, 47d49'32.49"N)
Upper Right (121d59' 5.55"W, 47d57'47.61"N)
Lower Right (121d59' 5.55"W, 47d49'32.49"N)
Center (122d 5'36.43"W, 47d53'40.05"N)

___________________________________________________


See how all the coordinates make sense, and the scale is on the order of 10e-5 for x and y, with 1 for z.

You also are getting some error messages, the first two I have seen before and it didn't appear to hurt the validity of the geotif, but the third one I haven't seen.

Hope this helps

Bob
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,240
Country
us-wisconsin
Hi Dan.

The problem with your scenery is in the geotiff tag. You set the X Pixel Scale and the Y Pixel Scale as 0.3... hoping for 0.3 meters/pixel resolution.

But that isn't what a geotiff needs in this case. We want lat-long format with WGS84 datum... so X Pixel Scale and Y Pixel Scale should be 2.67177E-06. That is the degrees per pixel according to the SDK.

You can compute the exact degrees/pixel by:

(span of image in degrees) / ( # of pixels in image (-1) )

I don't know the source of your original image, but if it was a geotiff, it may have been right from the start if it was lat-long with WGS84 datum.

If it was UTM, then it needed to be reprojected to lat-long, WGS84.

Your INF was OK, but you might want to consider compression:

Code:
[Source]
Type                = GeoTIFF
SourceDir           = "SourceData"
SourceFile          = "wtf1.Tif"
Layer               = Imagery
Variation           = Day
NullValue           = 255,255,255

[Destination]
DestDir             = "Output"
DestBaseFileName    = "wtf1"
DestFileType        = BGL
LOD                 = Auto
CompressionQuality =85

The compression of 85% doesn't loose much data, and it cuts the size of the BGL from about 20mb to 4mb.

Dick
 
Last edited:
Messages
192
Country
germany
Dick,
Thank you so much. I didn't realize that I had to use that form of pixel scale. It's right in the sdk but one of the other examples that I found used the 0.3 so I assumed that was what it needed. As for the compression, I've been doing quite a great deal of experimentation with it. I figure with the size of the area that I'm trying to do 75% might be the way to go because of file size. The source of my original imagery is actually Jpeg comverted to Tiff through photoshop.

Thank you all for your support and guidance.

orde

See how all the coordinates make sense, and the scale is on the order of 10e-5 for x and y, with 1 for z.

Bob

Bob, I don't see any issues with my coordinates. What do you mean? They make sense to me.
 
Last edited:
Messages
1,484
Dan, your coordinates express longitude, latitude. yes? for instance your upper left shows that the corner is at W111.001 degrees longitude, and N32.248 degrees latitude.

from your file:
<<Upper Left ( -111.001, 32.248)>>


Your lower right shows that corner of the file is not in this world!!!!!!!!!! It claims to be at E1370.999 degrees longitude (180 is max), and S1455.752 latitude (90 is max)

from your file:
<<Lower Right ( 1370.999, -1455.752)>>


Anyway, its all an artifact of the scaling problem as both Dick and I point out, so fix that and don't worry about the rest.
 
Top