- Messages
- 203
- Country

Code:
ImportOGR|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\SW_Building WGS84.shp|*|*|AUTODETECT
# ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/211-212-231-241-242-243.shp|*|*|AUTODETECT
# ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/231 Pasture.shp|*|*|AUTODETECT
# ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/121 Industrial or commercial units.shp|*|*|AUTODETECT
# ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/112 Discontinuous urban fabric.shp|*|*|AUTODETECT
# ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/111 Continuous urban fabric.shp|*|*|AUTODETECT
# ImportOGR|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\SW_FunctionalSite WGS84.shp|*|*|AUTODETECT
ImportOGR|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\SW_Woodland WGS84.shp|*|*|AUTODETECT
#
AddAttribute|FTYPE="POLYGON" And FROMFILE="SW_Woodland WGS84.shp" And FEATCODE=15999|Integer;BUILDTYPE|0
AddAttribute|FTYPE="POLYGON" And FROMFILE="SW_Woodland WGS84.shp" And FEATCODE=15999|String;ID|Woodland
AddAttribute|FTYPE="POLYGON" And FROMFILE="SW_Building WGS84.shp" And FEATCODE=15014|Integer;BUILDTYPE|1
AddAttribute|FTYPE="POLYGON" And BUILDTYPE=1 And FAREARAT>0.80|Integer;BUILDTYPE|2
AddAttribute|FTYPE="POLYGON" And BUILDTYPE=1 And FNUMVERT<12 And FNUMPERPANG>2 And FNUMNOTPAR<4|Integer;BUILDTYPE|3
AddAttribute|FTYPE="POLYGON" And BUILDTYPE=1 And FCONVEX=1|Integer;BUILDTYPE|4
# BUILDTYPE=1=General ALL Buildings
# BUILDTYPE=2=Almost Rectangular
# BUILDTYPE=3=Unsplit Complex Polygon
# BUILDTYPE=4=Convex Polygon
# BUILDTYPE=5=Split Complex Polygon
#
# Remove complex buildings
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.5;2.0;1.0|Integer;BUILDTYPE|5
#
SplitGrid|AGN|*|FROMFILE="SW_Woodland WGS84.shp"
SplitGrid|AGN|*|FROMFILE="SW_Building WGS84.shp"
# Classify buildings and vegetation areas
# AddAttributeIfInside|FTYPE="POLYGON"|CODE_12="*"|String;BUILDCAT|RURAL
# AddAttributeIfInside|FTYPE="POLYGON"|CODE_12="121"|String;BUILDCAT|INDUSTRIAL_COMMERCIAL
# AddAttributeIfInside|FTYPE="POLYGON"|CODE_12="112"|String;BUILDCAT|DISC_URBAN
# AddAttributeIfInside|FTYPE="POLYGON"|CODE_12="111"|String;BUILDCAT|CONT_URBAN
# AddAttributeIfInside|FTYPE="POLYGON"|SITETHEME="Education"|String;BUILDCAT|FUNCTIONAL_SITE
#
# ReplacePolygonByVegetationRectangles|Landuse="311Broad"|0.0001|0.0|0.0
# ReplacePolygonByVegetationRectangles|Landuse="312Conif"|0.0001|0.0|0.0
# ReplacePolygonByVegetationRectangles|Landuse="Null"|0.0001|0.0|0.0
# Create AGN buildings and vegetation
CreateAGNGenBuild|FTYPE="POLYGON" And BUILDTYPE=1|{458b6a30-7e33-4478-b378-223cefc83f07}|MAXRATIO=2
CreateAGNGenBuild|FTYPE="POLYGON" And BUILDTYPE=2|{458b6a30-7e33-4478-b378-223cefc83f07}|MAXRATIO=2
CreateAGNGenBuild|FTYPE="POLYGON" And BUILDTYPE=4|{458b6a30-7e33-4478-b378-223cefc83f07}|MAXRATIO=2
CreateAGNGenBuild|FTYPE="POLYGON" And BUILDTYPE=5|{458b6a30-7e33-4478-b378-223cefc83f07}|MAXRATIO=2
# CreateAGNPolyVeg|FTYPE="POLYGON" And ID="Forest" And Landuse="311Broad"|{9315fa6d-469d-11db-9654-00e08161165f}
# CreateAGNPolyVeg|FTYPE="POLYGON" And ID="Forest" And Landuse="312Conif"|{8CAD12A1-6635-4ccb-9E15-02D1E8ACF209}
# CreateAGNPolyVeg|FTYPE="POLYGON" And ID="Forest" And Landuse="Null"|{fe22dca8-460b-11db-9654-00e08161165f}
# Output AGN files
SetAGNBuildingTexture|*|ES_AG_11
ExportAGN|FSX|E:\VFRGenX\VFR-Gen-X-2.0\Volume1\Area1\2.4m Photo\Texture
MergeGrid
ExportOGR|FTYPE="POLYGON"|ESRI Shapefile|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\ScenProc_Buildings_Output2_271217.shp|ScenProc_Buildings_output
SP imports the two data sets SW_Building WGS84.shp and SW_Building WGS84.shp correctly.
There are 130812 polys in SW_Building WGS84.shp and 130812 have BUILDTYPE=1 added to them, so that step works correctly
There are 10282 polys in SW_Woodland WGS84.shp and 10282 have BUILDTYPE=0 and ID=Woodland added to them, so that step works correctly
120972 polys then get re-attributed to BUILDTYPE=2, which seems to be ok
The ReplacePolygonByBuildingRectangles seems to work ok, processing 7979 polys into 17564 polys
Using FROMFILE in combination with FEATCODE seems to differentiate between Woodland areas and Buildings

