# AeroFly FS 2 scenProc script - Ver 4 # with function to filter out objects on airport # Author of scenProc Arno Gerretsen # Script amended, modified and enhanced by Rodeo # Script updated by Crispy136 # This script creates cultivation for night lighting, plants and buildings (incl. high rise) # and by default allows buildings to be excluded from airport areas. You can enable the exclusion # of plants or lights in the FILTER section below. # -------------------------------------------------------------------------------------------- # # LOAD OPENSTREETMAP DATA of the area to work on ImportOGR|E:\Aerofly_FS2\Cultivation\map.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 would also # need to do the same for any of the "AddAttributeIfInside" lines you are using in the FILTER section below. ImportOGR|E:\Aerofly_FS2\Cultivation\*.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 code is used in conjunction with the filter lines below, but omitting it has no # impact on the total cultivation content created. However using the SplitGrid line results in multiple output # files but saves time. Commenting it out results in 1 output file but requires longer scenProc # running time. ie 3mins vs 13mins. # If you are keeping SplitGrid to save time, you will need to add multiple TOC filenames into your TSC file. SplitGrid|0.25|*|building="*" # # LIGHTS # Place point features for the lights along roads PlacePointsAlongLine|highway="motorway"|SINGLE|45;55|6;6|25|String;point|plight|hdg PlacePointsAlongLine|highway="primary"|SINGLE|45;55|6;6|25|String;point|plight|hdg PlacePointsAlongLine|highway="secondary"|SINGLE|40;40|4;4|20|String;point|slight|hdg PlacePointsAlongLine|highway="tertiary"|SINGLE|30;35|4;4|10|String;point|tlight|hdg PlacePointsAlongLine|highway="residential"|SINGLE|30;30|4;4|10|String;point|rlight|hdg PlacePointsAlongLine|highway="living_street"|SINGLE|30;30|4;4|10|String;point|rlight|hdg # # PLANTS # Place point features for the plants in forest polygons using spacing of 0.00025 degrees # and full randomness. # Lowering value from 0.00025 to 0.0001 will result in denser forests but increases # scenProc running time. ie 3mins vs 33mins. Values in between can also be used or different # values for different plant types. PlacePointsInPolygon|landuse="forest"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR PlacePointsInPolygon|natural="wood"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR PlacePointsInPolygon|natural="tree"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR PlacePointsInPolygon|natural="tree_row"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR PlacePointsInPolygon|leisure="park"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR PlacePointsInPolygon|leisure="nature_reserve" And NOT name="*Marine*"|0.00025;0.00025|1.0;1.0|INHERITPARENTATTR # Adding the "And NOT name="*marine*" to the line above filters out marine national parks, which # usually cause "Trees in the sea". Marine parks not using the word Marine in their name may # still need to be excluded using an exclusion file. # # FILTER out the buildings, lights and plants that are within the exclude polygons AddAttributeIfInside|building="*"|FROMFILE="*.kml"|String;skip|yes # Using this script to generate plants and lighting should generally negate the need to exclude them, so # this script only excludes buildings by default. Just remove the "# " from the lines below if you want # to also exclude lights or plants from your exclude polygons. # AddAttributeIfInside|point="light"|FROMFILE="*.kml"|String;skip|yes # 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 leisure="park"|FROMFILE="*.kml"|String;skip|yes # AddAttributeIfInside|FTYPE="POINT" And leisure="nature_reserve"|FROMFILE="*.kml"|String;skip|yes UnloadFeatures|skip="yes" # # CREATE AF2 PLANTS CreateAF2Plant|landuse="forest" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|landuse="forest" And FRAND > 0.5|10;40|0|conifer CreateAF2Plant|natural="wood" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|natural="tree_row" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|leisure="park" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|leisure="nature_reserve" And NOT name="MNP*" And FRAND < 0.5|8;40|0|conifer CreateAF2Plant|natural="tree" And FRAND < 0.5|8;25|0|broadleaf CreateAF2Plant|landuse="meadow" And FRAND < 0.5|5;12|0|shrub|plant_type_shrub_T00 CreateAF2Plant|landuse="meadow" And FRAND < 0.5|3;8|0|shrub|plant_type_shrub_T01 # Adding "And NOT name="MNP*" to the line above filters out additional marine national parks in Australia. # # CREATE AF2 LIGHTS CreateAF2Light|point="plight"|0.9;0.8;0.7|5|0;0;1|10 CreateAF2Light|point="slight"|0.9;0.7;0.5|3|0;0;1|8 CreateAF2Light|point="tlight"|0.6;0.6;0.7|3|0;0;1|6 CreateAF2Light|point="rlight"|0.9;0.6;0.3|3|0;0;1|6 # # CREATE AF2 BUILDINGS # # HOUSES - FLENGTH point was set to 24 to split single/multi level houses for areas with a greater # use of single story houses like Australia, where residential house rarely exceed 2 levels. CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH < 24|1|1|gable|residential|0 CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 24 And FLENGTH < 28|2|1|gable|residential|0 # For houses for European scenery try replacing the 2 lines above with the 2 lines below as this will give # a greater proportion of 2 and 3 story houses. Change to "2;3" to "2;5" for a mix of 2 to 5 story houses. # - CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH < 18|1|1|gable|residential|0 # - CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 18 And FLENGTH < 28|2;3|1|gable|residential|0 # # The entries below use the "building_level" value to set building height for larger buildings. Using the # building_level value gives a good result for city high rise and large residential apartments. # # APARTMENT AND RESIDENTIAL HIGH RISE # - Building = "apartments" has been set to type "|residential|" to allow for gable roofs and different # colouring, and thus greater differentiation between these and office/commerical/retail tall buildings. # - Building = "Residential" has been set to "commercial" to give some variety to residential apartments overall. # - Change "|gable|" to "|flat|" if you prefer flat topped residential high rise. # - Change "|residential|" to "|commercial|" if you don't like brown colouring of some buildings. Note this # change also disables the gable roof, giving you a flat roof even if gable is still used. # - Any buildings with no "building_level" value will be randomly set to 5 to 12 levels. This is suitable for # Australian city and surburban areas, adjust values to suit your area. eg Hong Kong might use "50;100" CreateAF2Building|building="apartments" And FAREARAT>0.7 And building_levels="*" And FLENGTH >= 28|building_levels|1|gable|residential|0 CreateAF2Building|building="apartments" And FAREARAT>0.7 And NOT building_levels="*" And FLENGTH >= 28|5;12|1|gable|residential|0 CreateAF2Building|building="residential" And FAREARAT>0.7 And building_levels="*" And FLENGTH >= 28|building_levels|1|flat|commercial|0 CreateAF2Building|building="residential" And FAREARAT>0.7 And NOT building_levels="*" And FLENGTH >= 28|5;12|1|flat|commercial|0 # # COMMERCIAL, RETAIL AND OFFICE including HIGH RISE # Any buildings with no "building_level" value will be randomly set to 2 to 5 levels. Adjust to suit your area. CreateAF2Building|building="commercial" And FAREARAT>0.7 And building_levels="*" And FLENGTH >= 28|building_levels|1|flat|commercial|0 CreateAF2Building|building="commercial" And FAREARAT>0.7 And NOT building_levels="*" And FLENGTH >= 28|2;5|1|flat|commercial|0 CreateAF2Building|building="retail" And FAREARAT>0.7 And building_levels="*" And FLENGTH >= 28|building_levels|1|flat|commercial|0 CreateAF2Building|building="retail" And FAREARAT>0.7 And NOT building_levels="*" And FLENGTH >= 28|2;5|1|flat|commercial|0 CreateAF2Building|building="office" And FAREARAT>0.7 And building_levels="*" And FLENGTH >= 28|building_levels|1|flat|commercial|0 CreateAF2Building|building="office" And FAREARAT>0.7 And NOT building_levels="*" And FLENGTH >= 28|2;5|1|flat|commercial|0 # # INDUSTRIAL AND OTHER BUILDINGS # - Building area is used to spilt building heights in industrial areas to give a more realistic appearance, # as most buildings do not come with any building_level value and are rarely very tall. # - Buildings under 6000 area are set as 2 story and buildings with an area of 6000 and over are set as # 4 story. # - 2 & 4 levels were used instead of 1 & 2 levels as industrial building floor heights are generally # greater than other building types. CreateAF2Building|building="yes" And FAREARAT>0.7 And FLENGTH >= 28 And FAREA <6000|2|1|flat|commercial|0 CreateAF2Building|building="yes" And FAREARAT>0.7 And FLENGTH >= 28 And FAREA >=6000|4|1|flat|commercial|0 CreateAF2Building|building="industrial" And FAREARAT>0.7 And FLENGTH >= 28 And FAREA <=6000|2|1|flat|industrial|0 CreateAF2Building|building="industrial" And FAREARAT>0.7 And FLENGTH >= 28 And FAREA >6000|4|1|flat|industrial|0 # #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|E:\Aerofly_FS2\Cultivation|YBBN-map