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

Geographical representation of agn files in Google Earth

I've been trying to replicate this lovely kml representation of autogen tiles, originally done by 'Vogel', (who unfortunately doesn't appear to be around much), without success :(

http://www.avsim.com/topic/365949-fsearthtiles-updated-version/?p=3366294

Does anyone have any ideas or pointers as to how to accomplish this please? I am vaguely familiar with the naming convention for autogen files having researched it, but as to how to actually perform a calculation to generate kml squares such as this is perhaps a little beyond me...

Thanks in advance for any help advice or information! Cheers K
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I think you should be able to get close with scenProc. Take a big polygon as input and split it in the AGN grid tiles. Then you can use ExportOGR to export it as a KML file. Google Earth should be able to read this. The only thing is the names, I would have to check what they are based on. scenProc doesn't store the LOD name at the moment, but that could be a good addition.
 
Thanks Arno, the LOD name is precisely what is required so as to be able to more efficiently uniquely identify agn squares without using annotator and reviewing the time/date stamps of changed files!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Let me check how such names are specified in the KML file and if OGR can easily write them. Then I might be able to add it to scenProc as well. Would be a cool addition.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I had a quick look and this should work:

Code:
ImportOGR|area.shp|*|*|NOREPROJ
#
SplitGrid|AGN|*
PlacePointAtCenterPolygon|*|String;name|LODNAME|0
#
MergeGrid
#
ExportOGR|*|KML|agntiles.kml|agntiles

But, I first have to add LODNAME as special attribute name (like NEWGUID or RND360). That would then insert the correct numbers (name) for the LOD tile that polygon is in. I'll try to code that tonight.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I have made the change, it will be in the next build tomorrow. The syntax has changed a bit. The sample below is also included in the manual btw.

Code:
CreateRectangle|Texel
#
SplitGrid|AGN|*
PlacePointAtCenterPolygon|*|String;obj|center|0
AddAttribute|FTYPE="POINT"|String;name|TILELOD
#
MergeGrid
#
ExportOGR|*|KML|grid.kml|grid
 

Attachments

  • GE_tiles.jpg
    GE_tiles.jpg
    195.4 KB · Views: 250
Nicely done Arno thanks. I'm guessing that I can easily use SplitGrid to produce accurate LOD9 (QMID11) hydropoly tiles from a very large coastline vector files? :) Never thought of that before...
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
I did notice that for big areas the SplitGrid is sometimes slow and seems to stall. That's something I need to check, might be a bug.

Yes, you can tell SplitGrid to use other sizes than the AGN grid as well.
 
Top