• 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.

FSXA Exporting GeoTIFF lat/long

Dick,

Perhaps you're right. I did as suggested, and resample is currently compiling the cells (6437 of them). It certainly was much more simple than I thought.

Nonetheless, I'm still a bit perplexed why the reprojection in Global Mapper looks distorted, why SBX doesn't recognize the data in the .prj file, and why SBX thinks that I haven't selected any items for exporting...

I'll take a raincheck on those answers assuming your much simpler method gets the job done. Thanks for helping me out.

That goes for everyone else who was kind enough to reply here as well: Thank you!

Regards,

Nick
 
But wait! There's more!

It compiled ok and it's activated in FSX, but... It's all red. It looks like Mars. Any idea what that's about?

Nick
 
In GM you have to save it as 24 bit, I think it defaults to 8 bit palette, did you check that?

scott s.
.
 
From memory photoscenery compilation within SBX is only implemented for BMP files.

I tend to use it as a background for vector data only, and compile the the data manually into an inf.

The metadata is stripped by Photoshop and the like anyway, so this is important for my workflow.

I have not had to convert Datum, as all my imagery has been in WGS84 ... and as such have never had difficulty with SBX reading the metadata from Globalmapper Exported files.

I think it is normal that it won;t compile photoscenery for you.

Grab the information and cut/paste it into an inf.
 
Scott,

I remember seeing that option, and I think I left it at it's default setting. I'll go back and try the 24bit option. Thanks for the suggestion.

H,

The SBX documentation makes several references to the geoTIFF format, but I suppose that could be legacy stuff. To be perfectly honest, the .inf method using Resample seems easier anyway. I'll probably still use SBX to do the traffic and few other vector features, though.

Thank you both,

Nick
 
Just wanted to let you know that the 24bit export option in Global Mapper fixed the RGB channel issue. Everything is in the sim and looking pretty.

Now to tackle the DEM!

Thanks everyone.

Nick
 
Good to hear. GM can also get you a DEM that works just as easily. Just export as geotiff elevation 16 bit.

scott s.
.
 
Okay gents,

I have a new problem, but I didn't think I should start a whole new post...

Resample digests my GeoTiff, and I have nice 1ft resolution photoscenery for my airport in FSX. But...

My 3ds Max created runways and taxiways do not line up correctly. I know the obvious answer would be that I simply did something wrong in Max, but I've checked several times and I find no errors.

I created the ground polys using the very same imagery I eventually 'Resampled' into FSX as my background. In Max 8, it overlays perfectly, but in FSX, things don't line up very well at all. If I fix one runway end, then the other end is off by almost 10ft. No amount of rotating my model is going to fix it, it seems.

It's as if the image (in FSX) is slightly stretched, so parallel lines aren't parallel anymore. It's very subtle, but opposite ends of an 11,000ft runway are almost 10ft off.

I have the distinct feeling that this relates to the reprojection that Global Mapper performed on my imagery. I looked through the SDK and tried fiddling with the xDim and yDim settings, but it didn't seem to make any difference.

How can I beat this? Changing the lengths of my Max 8 runways to values other than the real-world lengths doesn't seem like a solution to me, so that leaves me with correcting or altering the imagery.

Should I strip the georeferencing info out of the TIF and manually specify my own coords in the .inf? What would such an .inf look like?

I was hoping to use the Gridding feature of Global Mapper to try an eliminate some of the extra imagery around the edges of my export area. Otherwise, I'll have a lot of white space left over after making my alpha mask. Not to mention, I want to cut down on the autogen exclusion.

But If I go fiddling with the corner data of the "main" Tiff, how would I manage all the tiles I want to create?

Sorry for so many questions, and I appreciate any insight you guys might have.

Regards,

Nick
 
I kind of doubt taking the georef data out of the Geotiff is going to change anything, unless there is a rounding error being introduced. There is a freeware program, geotiff header examiner geotiffe.exe that can extract the data from a geotiff, but it's just as easy to create a tfw file in GM and get the same data.

AFAIK GM uses "industry standard" reprojection algorithms. One thing I would check that your projection / datum parameters are correct (example, check the unit "US survey foot") though I don't think that would cause an error of 10 ft over the length of a runway.

One thing in GM is there is an option "create square pixels" on export that is enabled by default. I always uncheck that.

I've gotten good results by painting my image in a paint program with purple in the area I don't want and then setting purple as my nullValue in the .inf. My paint program destroys the geotiff tags, but I just run the image back through GM to put it back.

I've never tried to overlay GMAX-generated ground polys, so don't know what positioning issues there might be. I don't know how you determine "ground truth" when you are working with such high desired accuracy.

scott s.
.
 
I don't know how you are placing the runway images, but be aware that headings in FS are magnetic... not true headings. You need to use a program like TCalcX to get a true heading in the sim.

Also, the resampled image, now in Geographic projection, is no longer a representation of true length or width.

Geographic projections are in degrees of latitude and longitude... Max or GMax uses linear measurements of meters or feet. So you really can't use an image of this type as a max background.

You might be able to use a background image that UTM projection, which is a linear measurement ( I think ). Perhaps someone else can chime in here.


Dick
 
Thanks guys.

@Dick, I forgot to mention that everything I designed in Max is exactly per the Airport Master Plan documentation. True Bearings, Runway dimensions, taxiway widths, centerline-to-centerline distances, and fillet radii are all specified in the docs, and I created my ground polys faithfully to these dimensions.

To back up that data, I imported the aerial imagery I mentioned at the beginning of this thread (still in State Plane projection, and at 1ft/px), placing it on a plane and using it as a backdrop while designing the pavement. The result was a perfect match to the published dimensions.

In a nutshell that's why I think the reprojected imagery in FSX is the culprit.

@Scott, I've re-exported numerous times with various settings in order to try and isolate any setting that I might have set incorrectly. The "square pixels" option was one of them. I also check the Feet (Survey) setting, and double checked the arc degrees per pixel, all to no avail. Nothing I changed seemed to make any difference in FSX.

I also went through the SDK and fiddled with the INF file. I tried the xDim and yDim entries, but that didn't have any effect either.

Thats what led me to believe that if I manually tell resample to slightly move the Southeast corner of my image, perhaps I can get it to line up properly.

When comparing the imagery to the surrounding vector features in FSX, certain road line up exactly, while others seem to be off slightly...on the order of about 10 feet in places. It's not really about rotation, more like a slight distortion...I just can't tell if it's in the x or the y dimension.

I'd love to post some pics to make what I'm seeing more clear, but I can't really do that, unfortunately.

If you guys have any more ideas, I'm all ears. I'll keep fooling around with it in the mean time. Thanks again.

Nick
 
Last edited:
Hello:

Somebody please correct me if I'm wrong (as I am not a GMAX user). :twocents:

Imagery to be used as source data in any file format for FS ground textures / background images / maps / vector content etc. in ANY FS utility, whether FS SDK Resample, SHP2VEC, AFCAD, ADE, AFX /Airport Studio, SBuilder, SBuilderX, Slartibartfast.... and/or GMAX, 3dsMAX, Sketchup etc. should first be projected in the required Geographic Lat-Lon WGS84 datum.

The same is true of imagery intended to be used for texturing large areas ex: long RWYs or other terrain regions such as custom ground poly in any of the above FS utilities... just because you can "warp" or "stretch"imagery in an app doesn't mean that will produce the best result compared to an image already projected closer to the final "shape" that FS will require.


FYI: This does not apply to 3D scenery objects such as buildings. vegetation, SimObjects, Aircraft etc. to be placed "above" ground.


Yes imagery will look "squished", and squares will look like rectangles with longer dimensions along the horizontal (East-West) direction... that is what WGS84 should "look like"; but FS will 'warp' it back into "normal" looking 'square' quad matrix cell tiles at run time, so no worries ! ;)


Do not do any significant manual "stretching" of imagery intended for use in apps with such a 'rubber sheet' feature option (ex: AFX /Airport Studio).

Likewise, do not do any processing of imagery with 'arbitrary' parameters via GDALWarp or other such tools to "warp" an image into what you think "looks right"... it must be projected correctly as WGS84... or IMHO you are better off NOT attempting to use it.


Hope this helps ! :)

GaryGB
 
Last edited:
Hi Gary,

For use in GMax/FSDS/SketchUp the imagery should not be in lat/long projection, but in a local flat earth projection. Since that is the grid those programs work in.

Most other programs will indeed require WGS84 lat/long.
 
Thanks Arno. :eek:

But I thought Christopher Columbus discovered that the Earth wasn't flat ? :p <...just kidding, of course ! >


Apparently Sketchup performs the required re-projection when one geo-locates a (max 1024x1024 pixel) image tile directly from Google Earth via its own internal engine.


Can that same internal engine in Sketchup be used to import ex: a GeoTiff (treated as a generic Tiff I would assume), or a BMP file ?


I suspect that internal engine in Sketchup can't be used by the end user to do this with any other image import process. :eek:


So, IIUC, if we import non-georectified imagery into ex: Sketchup to use as a background for tracing objects to be placed into FS on the ground (ex: custom ground polys), what is a freeware application that end users could utilize to "re-project" or 'warp' the imagery properly before import ? :confused:


I think we'd all like to be certain about this for FS Development, especially considering such issues as I've seen addressed in the Global Mapper forum: ;)

http://globalmapperforum.com/forums/projection-questions/4612-flat-earth-projection-conversion.html



And regarding the making of large FS airport backgrounds / very long RWYs etc, this was rather intriguing in its implications for would-be 3D modelers:

"We need to decide: what is the acceptable difference between distance measured
on the ground and distance measured on the map.
Local ‘flat earth’ grids only work over a very small area. If your work area extends
beyond a kilometre, you can no longer use a localised flat earth grid. However, you

could define your own local map projection with a small (negligible, but acceptable)
scale-factor. It is relatively easy to convert data between your local projection and the
national grid.
If you are designing a long linear feature, it will usually have its own reference
system – chainage (i.e. distance from a known starting point), along the feature and
offset perpendicular to the feature. You could introduce a variable scale-factor, so that
chainage corresponds with what you measure on the ground. An even neater solution
would be to use what is commonly known as ‘snake’ projection: this dynamically
converts between chainage and grid co-ordinates on large, generally linear projects.
"


...also to be considered:

"in Great Britain, Ordnance Survey (ordnancesurvey.co.uk) provides
geodata referenced to a map projection known as British National Grid.
In most places, there will be a difference between a distance measured
on the ground. This difference is known as scale-error or scale-factor
distortion. It is variable depending upon location in the country, and can affect
measurements by an amount ranging between zero and 4cms every 100m.
"

http://www.rics.org/site/download_feed.aspx?fileID=272&fileExtension=PDF

https://communities.rics.org/gf2.ti...657_Map_Proj_Scale_Factor_1st_final_draft.pdf.



Thanks for your further clarification of what the proper name of that conversion / re-projection format is which we should look for in GIS apps, for subsequent 3D world modeling in GMAX / 3DSMAX and Sketchup with FS as the ultimate destination of such content. :)


PS: I see that Google Maps (AFAIK the same as Google Earth) says this about their projection and coordinate system:

"Map Coordinates

There are several coordinate systems that the Google Maps API uses:

* Latitude and Longitude values which reference a point on the world uniquely. (Google uses the World Geodetic System WGS84 standard.)
* World coordinates which reference a point on the map uniquely
* Tile coordinates which reference a specific tile on the map at the specific zoom level

World Coordinates

Whenever the Maps API needs to translate a location in the world to a location on a map (the screen), it needs to first translate latitude and longitude values into a "world" coordinate. This translation is accomplished using a map projection. Google Maps uses the Mercator projection for this purpose. You may also define your own projection implementing the google.maps.Projection interface. (Note that interfaces in V3 are not classes you "subclass" but instead are simply specifications for classes you define yourself.)

For convenience in the calculation of pixel coordinates (see below) we assume a map at zoom level 0 is a single tile of the base tile size. We then define world coordinates relative to pixel coordinates at zoom level 0, using the projection to convert latitudes & longitudes to pixel positions on this base tile. This world coordinate is a floating point value measured from the origin of the map's projection to the specific location. Note that since this value is a floating point value, it may be much more precise than the current resolution of the map image being shown. A world coordinate is independent of the current zoom level, in other words.

World coordinates in Google Maps are measured from the Mercator projection's origin (the northwest corner of the map at 180 degrees longitude and approximately 85 degrees latitude) and increase in the x direction towards the east (right) and increase in the y direction towards the south (down). Because the basic Mercator Google Maps tile is 256 x 256 pixels, the usable world coordinate space is {0-256}, {0-256}
"

http://code.google.com/apis/maps/documentation/javascript/maptypes.html


Hmmm... remarkably similar to the FS world quad matrix cell system of ex: LOD-13 tiles having 256 x256 Area Points each cell ! :scratchch


But then, I've seen rumors posted that a number of folks with the original KeyHole / Google Earth team used to work for ACES. :D



This was a rather interesting "MS" Document as well: :idea:

Introduction to Spatial Coordinate Systems: Flat Maps for a Round Planet

http://msdn.microsoft.com/en-us/library/cc749633(v=sql.100).aspx


So, I guess we should also look at what MS 'Bing' Maps (aka MS Virtual Earth") uses too: :stirthepo

"Map Projection

To make the map seamless, and to ensure that aerial images from different sources line up properly, we have to use a single projection for the entire world. We chose to use the Mercator projection, which looks like this:
Bb259689.150afcdc-99eb-4296-9948-19c0a65727a3(en-us,MSDN.10).jpg

Although the Mercator projection significantly distorts scale and area (particularly near the poles), it has two important properties that outweigh the scale distortion:

1. It’s a conformal projection, which means that it preserves the shape of relatively small objects. This is especially important when showing aerial imagery, because we want to avoid distorting the shape of buildings. Square buildings should appear square, not rectangular.

2. It’s a cylindrical projection, which means that north and south are always straight up and down, and west and east are always straight left and right.

Since the Mercator projection goes to infinity at the poles, it doesn’t actually show the entire world. Using a square aspect ratio for the map, the maximum latitude shown is approximately 85.05 degrees.

To simplify the calculations, we use the spherical form of this projection, not the ellipsoidal form. Since the projection is used only for map display, and not for displaying numeric coordinates, we don’t need the extra precision of an ellipsoidal projection. The spherical projection causes approximately 0.33% scale distortion in the Y direction, which is not visually noticeable.
"

http://msdn.microsoft.com/en-us/library/bb259689.aspx



GaryGB
 
Last edited:
My experience is that the INF file that SBuilderX creates with the lat/long has limited numeric resolution. That means -as I have observed- that if you delete it and then add it again with the INF file, the image will be shifted due to lost resolution.

That makes me believe that perhaps somehow SBX stores the proper more accurate coordinates in the SBX file (so it always displays right in SBX) but when it creates the INF, it uses a rounded up value that is no longer as accurate.
 
Hi Emilio:

I have found that it is necessary to use at least 13 decimal places bit depth in Lat-Lon placement to achieve precision results in placement of certain content in FSX. ;)

Interestingly, I have also seen saved FS flights (in a *.FLT file) which required 14 decimal places to resolve a Start Location with precision. :eek:


IMHO, some FS Developers and/or programmers assume that just because most examples shown in the FS SDK docs for ex: XML placement only show 6 to 10 decimal places in their LAT-LON precision, that is an appropriate number of digits to use for coding other FS content output and/or placement scenarios. :mad:

This is complicated by use of abbreviated "exponent" format examples (shown in scientific notation) in reference documents or example INFs posted by others on FS web sites... one might not notice the actual precision when scanning posts. :rolleyes:


Give me explicit numbers even if they have trailing zeros out to 13 decimal places any day, so I will be less likely to miss something ! :p

Honestly, I don't care if "proper" math formatting would normally 'round off' numbers because decimal places beyond a certain value would be an 'insignificant digit'; I purposely format all my FS spreadsheets to force 13 decimal places... so I will be less likely to miss something when proof-reading tables or ASCII XYZ files, and (in some cases) I'll get better precision outputting certain FS content because I set up the source spreadsheet to allow that extent of precision to begin with. :twocents:

GaryGB
 
Last edited:
Back
Top