# AeroFly FS 2 scenProc script # Author of scenProc Arno Gerretsen # Script created by Crispy136 # This template is designed to create houses using available non building OSM data for areas # where no housing data is available. # # Version 1 # -------------------------------------------------------------------------------------------- # # LOAD INCLUDE POLYGON # - Use of an include file prevents isolated streets in rural areas being unrealistically lined with houses. # This does require you create a polygon in Google Earth to define your urban area, and export it for use # here. It is a lot easier to create an include polygon for urban areas than it is to create an exclude # polygon for rural areas surrounding urban areas of towns/cities. # - Enter folder/file name as required. # # IMPORTANT - If you are NOT USING AN INCLUDE FILE you should comment out the 1st line below AND must # comment out the 'UnloadFeatures|area="rural"' line located towards the end of the template. ImportOGR|E:\Aerofly_FS2\Cultivation\include.kml|*|*|NOREPROJ AddAttribute|*|String;include|yes # # LOAD OPENSTREETMAP DATA of the area to work on # - NOTE - Only attributes being used are imported as using * can result in very long run times for denser areas. # - Enter a folder/file name as required ImportOGR|E:\Aerofly_FS2\Cultivation\map.osm|*|aeroway;amenity;bridge;building;embankment;highway;landuse;leisure;name;natural;waterway|NOREPROJ # # SPLIT DATA FOR FASTER PROCESSING SplitGrid|0.01|*|building="*" # # GENERATE HOUSE POINTS # - Uses residential streets to generate house points AddAttributeIfInside|FTYPE="LINE" And highway="unclassified"|landuse="residential"|String;resi|yes AddAttributeIfInside|FTYPE="LINE" And highway="tertiary"|landuse="residential"|String;resi|yes PlacePointsAlongLine|FTYPE="LINE" And highway="residential"|SINGLE|16;18|20;21|0|String;type|build1|hdg PlacePointsAlongLine|FTYPE="LINE" And highway="residential"|SINGLE|16;18|-20;-21|0|String;type|build1|hdg PlacePointsAlongLine|FTYPE="LINE" And highway="unclassified" And resi="yes"|SINGLE|16;18|20;21|0|String;type|build1|hdg PlacePointsAlongLine|FTYPE="LINE" And highway="unclassified" And resi="yes"|SINGLE|16;18|-20;-21|0|String;type|build1|hdg PlacePointsAlongLine|FTYPE="LINE" And highway="tertiary" And resi="yes"|SINGLE|16;18|20;21|0|String;type|build1|hdg PlacePointsAlongLine|FTYPE="LINE" And highway="tertiary" And resi="yes"|SINGLE|16;18|-20;-21|0|String;type|build1|hdg # # IDENTIFY EXISTING BUILDINGS IN OSM DATA AND REMOVE HOUSE POINTS FROM THOSE AREAS # - This creates exclude polygons for building footprints already recorded in OSM data PlacePointAtCenterPolygon|FTYPE="POLYGON" And building="*"|String;type|build2|hdg PointToPolygon|type="build2"|40;40|hdg|String;building|remove # - Marks house points for removal from existing building locations AddAttributeIfInside|FTYPE="POINT" And type="build1"|building="*"|String;skip|yes # # IDENTIFY HOUSES NOT REQUIRED # - Marks house points for removal from excluded areas AddAttributeIfInside|FTYPE="POINT" And type="build1"|amenity="school"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|amenity="hospital"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|amenity="college"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|landuse="construction"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|landuse="recreation_ground"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|landuse="industrial"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|landuse="retail"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|landuse="commercial"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|leisure="*"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|aeroway="aerodrome"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And type="build1"|waterway="riverbank"|String;skip|yes # # REMOVES ALL HOUSE POINTS IDENTIFIED AS NOT REQUIRED UnloadFeatures|skip="yes" # # REMOVE HOUSE POINTS FROM STREET INTERSECTIONS FilterFeatures|type="build1"|type="build1"|DISTANCE_FEATURE|14 FilterFeatures|type="build1"|highway="motorway"|DISTANCE_FEATURE|25 FilterFeatures|type="build1"|highway="primary"|DISTANCE_FEATURE|25 FilterFeatures|type="build1"|highway="secondary"|DISTANCE_FEATURE|25 FilterFeatures|type="build1"|highway="tertiary"|DISTANCE_FEATURE|18 FilterFeatures|type="build1"|highway="unclassified"|DISTANCE_FEATURE|18 FilterFeatures|type="build1"|highway="residential"|DISTANCE_FEATURE|18 FilterFeatures|type="build1"|highway="cycleway"|DISTANCE_FEATURE|14 FilterFeatures|type="build1"|highway="footway"|DISTANCE_FEATURE|14 FilterFeatures|type="build1"|bridge="*"|DISTANCE_FEATURE|25 FilterFeatures|type="build1"|embankment="*"|DISTANCE_FEATURE|25 FilterFeatures|type="build1"|natural="*"|DISTANCE_FEATURE|15 # # REMOVE ALL HOUSES NOT INSIDE THE INCLUDE POLYGON # - This prevents isolated streets in rural areas being lined with houses. # IMPORTANT - If your whole OSM map area has no rural areas you will not need an include file, but must # comment out the 'UnloadFeatures|area="rural"' line below. AddAttribute|type="build1"|String;area|rural AddAttributeIfInside|type="build1"|include ="yes"|String;area|urban UnloadFeatures|area="rural" # # CREATE HOUSE FOOTPRINTS # - This creates different house sizes for generated houses. (15;10 is a house 15m deep and 10m wide when # viewed from the street). # - The auto generation of houses works best where there are a greater proportion of houses deeper than they # are wide. As a result only the 6th line below are houses wider than they are deep and represents # 10% of the houses generated. # - The house sizes below were optimised for the house separation distances established earlier. Increasing # house sizes can cause overlapping houses. PointToPolygon|type="build1" And FRAND <= 0.1|15;11|hdg|String;newres|extra1 PointToPolygon|type="build1" And FRAND > 0.1 And FRAND <= 0.4|15;10|hdg|String;newres|extra2 PointToPolygon|type="build1" And FRAND > 0.4 And FRAND <= 0.6|17;12|hdg|String;newres|extra3 PointToPolygon|type="build1" And FRAND > 0.6 And FRAND < 0.8|21;12|hdg|String;newres|extra4 PointToPolygon|type="build1" And FRAND >= 0.8 And FRAND <0.9|11;14|hdg|String;newres|extra5 PointToPolygon|type="build1" And FRAND >= 0.9|12;13|hdg|String;newres|extra6 # # MERGEGRID joins cells spilt by SplitGrid. These 2 commands are essential for faster processing times. MergeGrid # # CREATE BUILDINGS FROM HOUSE FOOTPRINTS # - Here you can adjust the ratio of single story houses and roof types. Only "extra2" is set to 2 levels in # this template but you can change values to suit your area. eg Change "|2|" to "|2;3|" to produce a # combination of 2 and 3 level homes instead of just 2 level houses. CreateAF2Building|newres="extra1"|1|1|gable|residential|0 CreateAF2Building|newres="extra2"|1|1|gable|residential|0 CreateAF2Building|newres="extra3"|2|1|gable|residential|0 CreateAF2Building|newres="extra4"|1|1|gable|residential|0 CreateAF2Building|newres="extra5"|1|1|gable|residential|0 CreateAF2Building|newres="extra6"|1|1|gable|residential|0 # - The houses above are optimized for Australia where there is a larger proportion of single level houses. For # European areas where there is a higher proporation of multi level houses, comment out the CreateAF2Building # lines above and uncomment the CreateAF2Building lines below #CreateAF2Building|newres="extra1"|1;2|1|gable|residential|0 #CreateAF2Building|newres="extra2"|1;3|1|gable|residential|0 #CreateAF2Building|newres="extra3"|2;4|1|gable|residential|0 #CreateAF2Building|newres="extra4"|1;3|1|gable|residential|0 #CreateAF2Building|newres="extra5"|1;2|1|gable|residential|0 #CreateAF2Building|newres="extra6"|1;2|1|gable|residential|0 # # EXPORT THE AF2 TOC FILE # Enter a folder/file name as required. ExportTOC|E:\Aerofly_FS2\Cultivation|PHNL-fill