Need help with lines of code for scenproc to remove houses & trees from runway
-
-
something like this... no tested but it should work
Code
Display More#Load your exclude polygon ImportOGR|airport.shp|*|*|NOREPROJ AddAttribute|FTYPE="POLYGON"|Integer;Exclude|1 #Load OSM Data ... #Load Tree Data ... #load all other Data ... # Split the features into a grid of 0.25 x 0.25 degrees SplitGrid|0.25|*|building="*" #ADD attribute "skip" if a feature is inside this exclude polygon AddAttributeIfInside|*|Exclude=1|String;skip|yes ...
-
Thanks vogel69, but I am too much of a novice at this.
Regards,
Ray
-
so you could try with Arno first script:
just replace:
annemasse.osm by your osm filename and path >> example: C:\Temp\Hawai.osm
airport.shp by your area exclusion file >> example: C:\Temp\airport.kml
Code
Display More# Example AeroFly FS 2 scenProc script # with function to filter out objects on airport # -------------------------------------------------------- # # Load OpenStreetMap data of the area to work on # Only load highway, landuse and builidng to save memory ImportOGR|annemasse.osm|*|highway;landuse;building|NOREPROJ # # Load Shapefile that contains the area of aiports that # should be filtered out ImportOGR|airport.shp|*|*|NOREPROJ # # Split the features into a grid of 0.25 x 0.25 degrees # Do not split buildings, but filter them into thee # right grid cells SplitGrid|0.25|*|building="*" # # Place point features for the lights along roads of # type primary at 50 meter interval PlacePointsAlongLine|highway="primary"|SINGLE|50;50|0;0|25|String;point|light|hdg # # Place point features for the plants in forest polygons # using spacing of 0.00025 degrees and no randomness PlacePointsInPolygon|landuse="forest"|0.00025;0.00025|0.0;0.0 # # Filter out the buldings, lights and plants that are within # the airport polygons AddAttributeIfInside|building="*"|FROMFILE="airport.shp"|String;skip|yes AddAttributeIfInside|point="light"|FROMFILE="airport.shp"|String;skip|yes AddAttributeIfInside|FTYPE="POINT" And landuse="forest"|FROMFILE="airport.shp"|String;skip|yes UnloadFeatures|skip="yes" # # Create AF2 plants CreateAF2Plant|landuse="forest"|10;20|0|broadleaf # # Create AF2 lights CreateAF2Light|point="light"|0.8;0.8;0.8|3|0;0;1|10 # # 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 < 12|2|1|gable|residential|0 CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 12 And FLENGTH < 25|3|1|gable|residential|0 CreateAF2Building|building="*" And FAREARAT>0.7 And FLENGTH >= 25|2|1|flat|industrial|0 # # Export the AF2 TOC file ExportTOC|out|annemasse
-
Thanks. I will read up some more and come back to it.
Regards,
Ray