# AeroFly FS 2 scenProc script # with function to filter out objects on airport # Author of scenProc Arno Gerretsen # Script amended, modified and enhanced by Rodeo # -------------------------------------------------------- # # Load OpenStreetMap data of the area to work on # Load highway, landuse and building to save memory ImportOGR|f:\map.osm|*|highway;landuse;building|NOREPROJ # # # 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 # 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 PlacePointsInPolygon|landuse="forest"|0.00025;0.00025|1.0;1.0 PlacePointsInPolygon|natural="wood"|0.00025;0.00025|1.0;1.0 PlacePointsInPolygon|natural="tree"|0.00025;0.00025|1.0;1.0 PlacePointsInPolygon|natural="tree_row"|0.0000005;0.00025|1.0;1.0 PlacePointsInPolygon|leisure="park"|0.00025;0.00025|1.0;1.0 PlacePointsInPolygon|leisure="nature_reserve"|0.00025;0.00025|1.0;1.0 # # Filter out the buldings, lights and plants # that are within the exclude polygons AddAttributeIfInside|building="*"|FROMFILE="exclude.kml"|String;skip|yes AddAttributeIfInside|point="light"|FROMFILE="exclude.kml"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And landuse="forest"|FROMFILE="exclude.kml"|String;skip|yes UnloadFeatures|skip="yes" # # # Create AF2 plants # CreateAF2Plant|landuse="forest"|10;20|broadleaf CreateAF2Plant|landuse="forest" And FRAND >= 0.1|8;40|0|broadleaf CreateAF2Plant|landuse="forest" And FRAND < 0.1|10;40|0|conifer CreateAF2Plant|natural="wood" And FRAND >= 0.1|8;40|0|broadleaf CreateAF2Plant|natural="tree_row" And FRAND >= 0.1|8;40|0|broadleaf CreateAF2Plant|leisure="park" And FRAND >= 0.1|8;40|0|broadleaf CreateAF2Plant|leisure="nature_reserve" And FRAND >= 0.1|8;40|0|conifer CreateAF2Plant|natural="tree"|8;25|0|broadleaf CreateAF2Plant|landuse="meadow" And FRAND >= 0.4|5;12|0|shrub|plant_type_shrub_T00 CreateAF2Plant|landuse="meadow" And FRAND >= 0.4|3;8|0|shrub|plant_type_shrub_T01 # # 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 for polygons that are almost rectanguar # Make longer buildings industrial with a flat roof CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH < 14|1|flat|industrial|0 CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 14 And FLENGTH < 28|1|gable|residential|0 CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 28|3|flat|industrial|0 # # Export the AF2 TOC file ExportTOC|f:\|map