# 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|C:\Users\colin\Downloads\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 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. # # 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|*|building="*" # # LIGHTS # Place point features for the lights along roads # Interstates, tollways, freeways PlacePointsAlongLine|highway="motorway"|SINGLE|200;250|6;6|0|String;point|mlight|hdg CreateAF2Light|point="mlight"|1.0;0.6;0.0|100|0;0;1|20 # Major city roads PlacePointsAlongLine|highway="primary"|SINGLE|300;350|0;0|0|String;point|plight|hdg CreateAF2Light|point="plight"|0.8;0.5;0.0|50|0;0;1|15 # Minor city roads PlacePointsAlongLine|highway="secondary"|SINGLE|300;350|0;0|0|String;point|slight|hdg CreateAF2Light|point="slight"|0.7;0.6;0.5|30|0;0;1|10 # Minor city roads PlacePointsAlongLine|highway="tertiary"|SINGLE|300;350|0;0|0|String;point|tlight|hdg CreateAF2Light|point="tlight"|0.6;0.36;0.0|20|0;0;1|7 # Residential roads PlacePointsAlongLine|highway="residential"|SINGLE|50;100|0;0|0|String;point|rlight|hdg CreateAF2Light|point="rlight"|0.4;0.24;0.0|10|0;0;1|5 # Residential roads PlacePointsAlongLine|highway="living_street"|SINGLE|50;100|0;0|0|String;point|llight|hdg CreateAF2Light|point="llight"|0.4;0.24;0.0|10|0;0;1|5 # Traffic signals CreateAF2Light|highway="traffic_signals" And FRAND<=0.5 |1.0;0.0;0.0|2|0;0;1|5 CreateAF2Light|highway="traffic_signals" And FRAND>0.5 |0.0;1.0;0.0|2|0;0;1|5 # # 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.00025;0.00025|1.0;1.0|INHERITPARENTATTR PlacePointsInPolygon|natural="tree_row" And NOT landuse="forest"|0.00025;0.00025|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. AddAttributeIfInside|building="*"|aeroway="aerodrome"|String;skip|yes # 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. AddAttributeIfInside|building="*"|FROMFILE="*.kml"|String;skip|yes # # 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;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" And FRAND < 0.5|8;25|0|broadleaf CreateAF2Plant|natural="tree_row" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|natural="wetland" And FRAND < 0.5|5;6|0|shrub|T00 CreateAF2Plant|natural="scrub" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|leisure="park" And FRAND < 0.5|8;40|0|broadleaf CreateAF2Plant|leisure="nature_reserve" And FRAND < 0.5|8;40|0|conifer CreateAF2Plant|leisure="golf*" And FRAND < 0.5|8;25|0|broadleaf # # CREATE AF2 BUILDINGS # # HOUSES # - Building area was split at 400 for houses to separate single/multi level houses for areas with a greater # use of single story houses like Australia, where residential house rarely exceed 2 levels. Building = # "roof" has been disabled as shaded parking in shopping centre carparks are listed as building = "roof". CreateAF2Building|NOT building ="roof" And FAREARAT>0.7 And FAREA <400|1|1|gable|residential|0 CreateAF2Building|NOT building ="roof" And FAREARAT>0.7 And FAREA >=400 And FAREA <700|2|1|gable|residential|0 # - 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 level houses. Change "|2;3|" to whatever values you desire. # - CreateAF2Building|NOT building ="roof" And FAREARAT>0.7 And FAREA <200|1|1|gable|residential|0 # - CreateAF2Building|NOT building ="roof" And FAREARAT>0.7 And FAREA >=200 And FAREA <700|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. CreateAF2Building|building="apartments" And FAREARAT>0.7 And building_levels="*" And FAREA >=700|building_levels|1|gable|residential|0 CreateAF2Building|building="apartments" And FAREARAT>0.7 And NOT building_levels="*" And FAREA >=700|5;12|1|gable|residential|0 CreateAF2Building|building="residential" And FAREARAT>0.7 And building_levels="*" And FAREA >=700|building_levels|1|flat|commercial|0 CreateAF2Building|building="residential" And FAREARAT>0.7 And NOT building_levels="*" And FAREA >=700|5;12|1|flat|commercial|0 # # COMMERCIAL, RETAIL, OFFICE & HOTEL including HIGH RISE # - Any buildings with no "building_level" value will be randomly set to 2 to 5 levels. Adjust values to suit your area. CreateAF2Building|building="commercial" And FAREARAT>0.7 And building_levels="*" And FAREA >=700|building_levels|1|flat|commercial|0 CreateAF2Building|building="commercial" And FAREARAT>0.7 And NOT building_levels="*" And FAREA >=700|2;5|1|flat|commercial|0 CreateAF2Building|building="retail" And FAREARAT>0.7 And building_levels="*" And FAREA >=700|building_levels|1|flat|commercial|0 CreateAF2Building|building="retail" And FAREARAT>0.7 And NOT building_levels="*" And FAREA >=700|2;5|1|flat|commercial|0 CreateAF2Building|building="office" And FAREARAT>0.7 And building_levels="*" And FAREA >=700|building_levels|1|flat|commercial|0 CreateAF2Building|building="office" And FAREARAT>0.7 And NOT building_levels="*" And FAREA >=700|2;5|1|flat|commercial|0 CreateAF2Building|building="hotel" And FAREARAT>0.7 And building_levels="*" And FAREA >=700|building_levels|1|flat|commercial|0 CreateAF2Building|building="hotel" And FAREARAT>0.7 And NOT building_levels="*" And FAREA >=700|10;20|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 FAREA >=700 And FAREA <6000|2|1|flat|commercial|0 CreateAF2Building|building="yes" And FAREARAT>0.7 And FAREA >=700 And FAREA >=6000|4|1|flat|commercial|0 CreateAF2Building|building="industrial" And FAREARAT>0.7 And FAREA >=700 And FAREA <6000|2|1|flat|industrial|0 CreateAF2Building|building="industrial" And FAREARAT>0.7 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|C:\Users\colin\Desktop\cult|map