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

Import AGN files

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
34,535
Country
netherlands
Hi,

I am thinking about adding support to read AGN files into scenProc. This could then be used for example to export the autogen as SHP file for easier viewing. And it would also allow merging with existing AGN files.

But I am not yet sure how to do the importing. From all the other formats scenProc imports the features and it is up to the user to create autogen from those features. How would you expect this works for importing AGN files?

Also importing as features and letting the user determine which features are turned into autogen. Or should an existing AGN file be imported so that the autogen objects are already there?
 
Hi Arno:

IMHO, in addition to "feature" data as to object shape, some developers may also wish to import a *an*.AGN file with all original info intact, including mapped GUIDs, relative quad vector placement coordinates, etc.


After a FS *an*.AGN file is imported (with or without data processing to ex: edit "feature" data as to object shape, mapped GUIDs, relative quad vector placement coordinates, etc.), some developers may then wish to export to: :idea:


* FS8 BGLC compatible *.CSV or FS9 / FSX BGLComp compatible *.XML format code for "non-AGN / non-autogen pipeline rendering mode" scenery 'library' object placement, with relative quad vector placement coordinates converted to geographic Lon-Lat projection / WGS84 datum 'RefPoint' placement coordinates

* Legacy FS2Kx (aka FS8 or FS9) or FSX autogen *an*.AGN format

* Legacy FS2Kx (aka FS8 or FS9) or FSX autogen *an*.XML format

* ESRI 'SHP' shape file for I/O with OSM, Google Earth, GIS apps, or 3D modeling apps such as Sketchup, etc.

* AutoCAD DXF or DWG file for I/O with ex: GIS or 3D modeling apps such as Sketchup

* KML / KMZ file for I/O with ex: Google Earth, GIS apps, or 3D modeling apps such as Sketchup, etc.


BTW: SHP and KML / KMZ file output may also prove useful with GIS apps and FS scenery utilities such as SBuilderX, FSX-KML, ADE etc. ;)

[EDITED]

* BLN file output of converted vertex coordinates may also prove helpful with GIS apps and FS scenery utilities such as SBuilder for FS9

[END_EDIT]


Hope these ideas may help make SceneProc even better in the future ! :)

GaryGB
 
Last edited:
Very good idea, Arno.

I would appreciate this feature. I think it would do by just creating polygon features from the AGN files with the guid as parameter and export as ESRI shapefile. Eventually you can add a 'type' parameter including the type of polygon, i.e.'vegetation', 'rowhouse', 'house', ....
All other things can be done with GIS software subsequently.

Regards,
Heinrich
 
great news Arno,

It will open new possibility in merging Autogen...

AGN attributes feature:
- Type: Rectveget, polyVeget, GenericBuilding,etc...
- GUID

- the only difference in IMPORTAGN instruction will be that we must choose a folder instead of only one file.
- add a Name to the AGN Layer
- add a filter to select AGN files by AABOX or AGN file included in a Polygon(s)(KML files for example).
- add a filter to select it by name.

IMPORTAGN|FOLDER|Coordinate box OR Kml shape|Type Filter(Rowhouse,RectVeget,etc...)|LAYERNAME= Layer1

and allow user to keep GUID already setuped in feature or replace by another one:

CREATEAGNRECTANGULARVEGET|FTYPE=POLYGON;FROMAGN=Layer1;type=AGNrectangularVegetation|KEEPGUID
or
CREATEAGNRECTANGULARVEGET|FTYPE=POLYGON;FROMAGN=Layer1;Guid={xxxxxxxx-xxxx-xxxx-xxxxxxx}|{xxxxxxxx-xxxx-xxxx-xxxxxxx}

after that, all the possibility of Scenproc will be usefull to work on it :stirthepo
 
Last edited:
Hi Arno,
Any news regarding ScenProc and the import feature of agn tiles?

Regards,
Heinrich
 
Hi Heinrich,

It's still on my todo list, have been busy with other things recently (I am working on some scenery again after a while :)).

But it should not be too much work, so I'll see if I can work on it somewhere soon.
 
Hi Arno,

I appreciate yery much your presentation about scenProc at Flugsimulator Konferenz today in Paderborn. Thank you very much.

Thomas
 
Hi Thomas,

Glad to hear you liked it. I plan to upload the presentation soon so that others can also view it.
 
It's still on my todo list, have been busy with other things recently (I am working on some scenery again after a while :)).

But it should not be too much work, so I'll see if I can work on it somewhere soon.

Hi Arno

That would be a great improvement indeed! Hope you can manage it soon.
Thx for all that job.

Regards

JpP
 
Hi,

If you download the latest version, you will see that it can already import agn files. You use the IMPORTAGN step for that.
 
Thank you Arno, I'll give it a try (asap)

Regards

JpP

EDIT: asap was right now!

Test.spc was IMPORTAGN|D:\TEMP|CREATEFEATURES

Test.log is 14:47 IMPORTAGN Information Import AGN files from D:\TEMP
14:47 SceneryProcessor Information scenProc finished processing
14:47 SceneryProcessor Information 0.72 seconds for IMPORTAGN
14:47 SceneryProcessor Information 0.72 seconds total


Question is Where can I find the resulting files
 
Last edited:
If you only import them they are in memory. You could use them in the other steps. To have them as files you need to export to SHP for example.
 
Great! It works, I've got the shapefiles in the "templates" directory (?)

They are named from the "basename" indication; maybe keeping the original naming from the agn one could be of some interest too...

JpP
 
Hi,

They are saved in the same folder as your SPC file is.

Using the AGN names would be an idea, let me think if I can implement it (exporting to SHP should also work when the features have no yet been split in the AGN grid of course).
 
Hello Arno,
I checked again with the latest build of ScenProc and the problem with flipped vegetation rectangles when importing still exists.

I attached a screenshot showing the problem and test files.

The left image shows my agn tile in annotator, its the 'old' FS2004 type of AGN. On the right you see the resulting shapefile created with ScenProc and as you will regognize, some vegetation rectangles are flipped vertically upside.

I also attached the agn tile for testing.

Regards,
Heinrich
 

Attachments

  • import_agn.jpg
    import_agn.jpg
    438.1 KB · Views: 546
  • 011232023033221an.zip
    011232023033221an.zip
    5.2 KB · Views: 376
Hi Heinrich,

Very special indeed, some of them are flipped, but not all. I'll try to reproduce it here.
 
Hi Heinrich,

I can reproduce the problem with the sample file you send. Now I just need to understand what goes on here :)
 
Back
Top