FSXA Autogen roads with LineToPolygon

#1
Hi there,

Since it's not possible to add vector data on top of a photoreal scenery other than playing with the blend mask, I though to create the roads as autogen with scenProc. Below is the modified version of the sample code taken from the program's manual. It runs OK but I don't get any files at the end:

# Chilov Island Road Autogen
ImportOGR|F:\MY.PROJECTS\Azerbaijan_X\source_files\SHP\gis.osm_roads_free_1.shp|*|*|NOREPROJ
#
SplitGrid|AGN|*
#
LineToPolygon|FTYPE="LINE" And fclass="primary"|13|String;polygons|road
#
ExportAGN|FSX|C:\Users\VNA\Desktop\roads\scenery


I've checked SHP metadata, which indeed shows feature type as LINE and one of the fclass values as 'primary'. So, I don't think it's a syntax-related problem as far as the SHP file is concerned.

Also, I've tried the same with a hand-made KML file (below) featuring some road data for an island I'm currently working on. But I don't know what attributes must be present in KML to make it compatible with scenProc? Is this enough for example?:

<Placemark id="primary">
<name>Primary 01</name>
<LineString>
<tessellate>1</tessellate>
<coordinates>
50.58136262525812,40.31392880498429,0 50.58209404984947,40.3142262462122,0 50.58240126032916,40.31437381888503,0 50.5827589929563,40.31450514265535,0 50.58334292106189,40.31472036117424,0 50.584055284606,40.31493926309398,0 50.58530205897911,40.31537701180269,0 50.58670483776652,40.31587093764085,0 50.58736832681042,40.31610956780918,0 50.58821910477716,40.31640278288965,0 50.58899991199374,40.31666681989695,0 50.58955421552673,40.3168698419249,0 50.59102843818437,40.31739277399971,0 50.5922481375484,40.31778577476833,0 50.59402620945033,40.31840351330699,0 50.59426134080599,40.3184362575666,0
</coordinates>
</LineString>
</Placemark>

<Placemark id="primary">
<name>Primary 02</name>
<LineString>
<tessellate>1</tessellate>
<coordinates>
50.60978742920048,40.318495497729,0 50.60995894709846,40.31840199515158,0 50.61017281763576,40.3182822654691,0 50.6102432548811,40.31823928302907,0 50.61029713848852,40.31822127340562,0 50.61036839378656,40.31821946833269,0 50.6105498675926,40.3182440311472,0 50.61085922384207,40.31833701547664,0 50.61108905655723,40.31840509227899,0 50.61126209201701,40.31845919866795,0 50.61150807048585,40.31853979747422,0 50.61186336008685,40.31865474037465,0 50.61210052242208,40.31872259485908,0 50.6123004989792,40.31877004307782,0 50.61249595090584,40.31878480679659,0 50.6126582891885,40.3187958495234,0 50.61308988405304,40.31885489993098,0 50.61341770116938,40.3189079597152,0 50.6136585109614,40.31895309419399,0 50.61395625797946,40.31900718885913,0 50.61426783962552,40.31905209067465,0 50.61438744512901,40.31906943812884,0
</coordinates>
</LineString>
</Placemark>

Do I need to use placemark IDs instead of fclass in SHP file and id values (id="primary", etc.) similar to above?

Thanks!
 

MOUSY

Resource contributor
#2
In order to export to AGN files, scenproc must have first created autogen objects, buildings or trees, (using CREATEAGNLIBOBJECT, CREATEAGNPOLYVEG, CREATEAGNROWHOUSE, etc commands). You have extruded the polygons to lines but you have not created autogen features from them.
That being said, I'm not sure why (or how?) you're trying to create roads as autogen? A road is not really an object that can be placed as autogen as far as I know. Points along a road vector are, however, possible. Example street lights, avenue trees, or buildings. Maybe that is what you are trying to accomplish?
 
#3
Thank you, Mousy!

In order to export to AGN files, scenproc must have first created autogen objects, buildings or trees, (using CREATEAGNLIBOBJECT, CREATEAGNPOLYVEG, CREATEAGNROWHOUSE, etc commands). You have extruded the polygons to lines but you have not created autogen features from them.
Sounds logical but I don't quite understand the link between different autogen elements to be honest... So do you mean that to have autogen roads one has to have another autogen elements in place such as buildings, trees, etc.?

That being said, I'm not sure why (or how?) you're trying to create roads as autogen?
As I explained above, I'd like to test autogen roads since I cannot use default roads over the photoscenery - they're simply not visible unless I apply a blendmask to the bitmap image, in other words unless I delete the roads from the photoscenery.

A road is not really an object that can be placed as autogen as far as I know. Points along a road vector are, however, possible. Example street lights, avenue trees, or buildings. Maybe that is what you are trying to accomplish?
Actually, I took this idea after reading Gary's post here and the attached tutorial by LFT. Maybe I misunderstood smth but I thought I could make the roads from autogen the same way as the street lights are possible (although I know the point objects are a different animal anyway...). Maybe you can suggest another way of making the roads on top of the photoscenery?

Thanks!
 

MOUSY

Resource contributor
#4
If I understand correctly the link was referring to creating autogen vector excludes from lines.

Regardless, any "autogen road" that you create through scenproc (if possible) or otherwise, would indeed be a vector object and would automatically be covered up by any photoscenery. So, unless I am mistaken, you would be back to square one.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#5
Hi,

What you are trying to achieve would require that you make custom AGN library objects to represent roads, these can then be placed as autogen. I have heard of other people trying things like that.

But I don't think this is a practical approach and it won't look really good, as it is very hard to follow a road line accurately.
 
Top