scenProc support to create cultivation files

#2
Fantastic Arno,

and many thanks for your support! :wave:

During my test phase of cultivation I used a GIS system for the OSM data, but your tool will enable more users to do this job.
Together with the airport design package for AC3D,
geoconvert and xref library access this is a really nice set for airport developers.

Regards
Rodeo
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#3
I have also been in contact with the developers of AeroFly about this now, they mention that the binary form of the cultivation files would be even better for performance. So I'll check if I can add support for that as well.
 
#7
Hi Arno, I made cultivation with big osm files. I tried uptodate scenproc with the last Crispy's template v6. I have a trouble with ramdomness for forest in PLACEPOINTSINPOLYGON (randomness argument are 1.0;1.0) . When I make forest with a small osm file, ramdomness works. When I try with big osm file, trees made lines (like ramdomness to zéro) I splited big file with spiltgrid argument (0.25 or 0.1) but same result. Could you help me. Thanks you.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#8
Hi,

At first though the randomness should not depend on your import file, it is done per polygon. But let me check in the code if I missed something.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#10
Hi,

I just double checked in the source code, but I can't understand why the randomness would behave different. What the step does is go over the bounding box of the polygon with the size between the points as given. The randomness is added at that stage as well. But this should not depend on the file that you loaded the polygons from.

Are there other differences between the two sources you imported?
 
#11
Hi,
I used this files :
OSM France
I tried with ain_latest_osm and rhone_latest_osm with randomness ok but when I tried with loire_latest_osm or ardeche_latest_osm , trees are in line with the same template.
I downloaded a square of forest in loire with openstreetmap and the randomness was ok.


Thanks you.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#12
Actually the ones that work are bigger in file size than those that don't work.

Can you show your script? Maybe I can see something from it.
 
#13
Here my template for vegetation

Code:
# AeroFly FS 2 scenProc script - Ver 6
# with function to filter out objects on airport
# Author of scenProc Arno Gerretsen
# Script amended, modified and enhanced by Rodeo
# Script updated by Crispy136
# Street lighting update provide by Kenventions
# - This script creates cultivation for night lighting, plants and buildings (incl. high rise)
# --------------------------------------------------------------------------------------------
#
# LOAD OPENSTREETMAP DATA of the area to work on
ImportOGR|F:\AA_sceneproc\travail\loire.osm|*|*|NOREPROJ
#
# LOAD SHAPEFILE that will be excluded from processing.
# - By default this script loads all .kml exclude files in the folder.  If you only want specific files, then use
#   the filename in place of "*.kml", You may also need to do the same for any of the "AddAttributeIfInside"
#   lines you are using in the FILTER section below.
# - Buildings in airport areas are now automatically excluded, so no exclude file is required for these.
#ImportOGR|F:\AA_sceneproc\travail\.kml|*|*|NOREPROJ
#ImportOGR|F:\AA_sceneproc\travail\.kml|*|*|NOREPROJ
#
# SPLITGRID
# Split the features into a grid of 0.25 x 0.25 degrees, Do not split buildings, but filter them into the
# right grid cells.
# - This command enables concurrent processing of the grid cells, speeding up the process.
SplitGrid|0.25|*|*
#
# LIGHTS

# PLANTS
# - For greater realism different tree densities are required for different vegetation areas.
#   The lower the value the denser the vegetation.  Densities greater than .0001 gave little
#   benefit when viewed in FS2.
#   - Forests & woods use a high density of 0.0001. Reduce to 0.00015 or 0.00025 for faster processing times.
#   - Nature reserves, scrubs & wetlands use medium density of 0.00015. Reduce to 0.00025 for faster
#     Processing times or increase to 0.0001 for greater density but slower processing.
#   - Parks, trees and tree rows use a low density of 0.00025. 0.0001 or 0.00015 result in unrealistic parks.
#   - Golf courses use a very sparse density of 0.00055 to reduce trees appearing in fairways.
#   - Denser tree settings increase running time if you have large plant areas in your source file.
# - Where an area has values in 2 or more vegetation types it fails to appear in FS2.  As a result
#   a decision needed to be made as to which category it belonged to.  So "landuse" was given preference
#   over "natural" which in turn has preference over "leisure". So an area which is listed in the source
#   data as natural = "wood AND leisure = "nature_reserve" would be treated as "wood". So any new
#   "landuse" type you add would have to be added as an "And NOT" value for the "natural" and
#   "leisure" lines. While any new "natural" type would need to be added as an "And NOT"
#   value only in the "leisure" lines.
PlacePointsInPolygon|landuse="forest"|0.0001;0.0001|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|natural="wood" And NOT landuse="forest"|0.0001;0.0001|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|natural="tree" And NOT landuse="forest"|0.00015;0.00015|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|natural="tree_row" And NOT landuse="forest"|0.00015;0.00015|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|natural="wetland" And NOT landuse="forest"|0.00015;0.00015|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|natural="scrub" And NOT landuse="forest"|0.00015;0.00015|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|leisure="park" And NOT landuse="forest" And NOT natural="wood" And NOT natural="tree*" And NOT natural="wetland" And NOT natural="scrub"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|leisure="nature_reserve" And NOT landuse="forest" And NOT natural="wood" And NOT natural="tree*" And NOT natural="wetland" And NOT natural="scrub" And NOT name="*Marine*" And NOT name="MNP*"|0.00015;0.00015|1.0;1.0|INHERITPARENTATTR
PlacePointsInPolygon|leisure="golf_course" And NOT landuse="forest" And NOT natural="wood" And NOT natural="tree*" And NOT natural="wetland" And NOT natural="scrub"|0.00055;0.00055|1.0;1.0|INHERITPARENTATTR
# Adding the 'And NOT name="*marine*"' to the leisure = "nature_reserve" line above filters out marine
# national parks wordwide, which usually causes "Trees in the sea". Marine parks not using the word
# Marine in their name may still need to be excluded using an exclusion file. Adding 'And NOT name="MNP*"'
# filters out additional marine parks in Australia.
#
# FILTER out buildings
# The line below automatically removes buildings within your airport area for the majority of airports worldwide.

# The line below removes buildings that are in the area covered by your exclude file. This should only be needed
# if you want to exclude buildings outside an airport area.

#
# FILTER out plants
# - Using this script to generate plants and lighting should generally negate the need to exclude them using
#   the lines below.
# - CAUTION - Using any of the 'AddAttributeIfInside|FTYPE="POINT"' lines will dramatically increase processing
#   time if the plant type uses a dense setting ie 0.0001.
# AddAttributeIfInside|FTYPE="POINT" And landuse="forest"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And natural="wood"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And natural="tree"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And natural="tree_row"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And natural="wetland"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And leisure="park"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And leisure="nature_reserve"|FROMFILE="*.kml"|String;skip|yes
# AddAttributeIfInside|FTYPE="POINT" And leisure="golf_course"|FROMFILE="*.kml"|String;skip|yes
#
# - The line below excludes trees from sporting areas usually found inside areas designated as parks. This
#   will prevent trees appearing inside football ovals, baseball diamonds, hockey fields etc, but has
#   a small processing time penalty.
AddAttributeIfInside|FTYPE="POINT" And leisure="park"|leisure="pitch"|String;skip|yes
#
# This next line removes anything identified in the AddAttributeIfInside lines above.
UnloadFeatures|skip="yes"
#
# CREATE AF2 PLANTS
CreateAF2Plant|landuse="forest" And FRAND < 0.5|8;20|0|broadleaf
CreateAF2Plant|landuse="forest" And FRAND > 0.5|10;20|0|conifer
CreateAF2Plant|natural="wood" And FRAND < 0.5|8;20|0|broadleaf
CreateAF2Plant|natural="tree" And FRAND < 0.5|8;20|0|broadleaf
CreateAF2Plant|natural="tree_row" And FRAND < 0.5|8;20|0|broadleaf
CreateAF2Plant|natural="wetland" And FRAND < 0.5|5;6|0|shrub|T00
CreateAF2Plant|natural="scrub" And FRAND < 0.5|8;20|0|broadleaf
CreateAF2Plant|leisure="park" And FRAND < 0.5|8;20|0|broadleaf
CreateAF2Plant|leisure="nature_reserve" And FRAND < 0.5|8;20|0|conifer
CreateAF2Plant|leisure="golf*" And FRAND < 0.5|8;20|0|broadleaf
#
# CREATE AF2 BUILDINGS
#
# HOUSES

# MERGEGRID joins cells spilt by SplitGrid.  These 2 commands provide shorter running times for denser areas.
#MergeGrid
#
# EXPORT THE AF2 TOC FILE
# Enter a folder/file name as required.
ExportTOC|F:\AA_sceneproc\travail|loire_vege
 
#14
I tried with another template but same issus. I tried with a lod 11 Josm landuse, natural tile (8 Mo) : randomness OK. I tried with 4 merged tiles (30 Mo) : randomness not ok.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#15
Really weird, could you tell me where to get some test data that shows the problem in a simple test case? Then I'll try to reproduce.
 
#17
Hi Arno,
I made some tests with differents osm file sizes.
I added 1 josm tile for each test.
Randomness was OK until 4 tiles.
The last test with a 5 tiles osm file had inactive randomness with trees inline.
I made a .rar file with test results :
cultivation folder for the 5 tests ;
template used with scenproc ;
osm files used ;
log.txt for each cultivation ;
airport folder next to the cultivation ;

You can download the .RAR : ESSAI/TEST

Thx for your help.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#20
Hi,

Sorry, this one slipped through my mind. I'll try to have a look tonight (if I don't forget again....)
 
Top