- Messages
- 203
- Country

Hi, I'm finally jumping into trying to use Scenproc 
Here's my script so far. Now I freely admit I copied the base script from the manual because I haven't a clue where to start, and I'm trying to reverse engineer it in my head to understand it and make it work for me.
I'm first just loading in data (all in the correct WGS84 projection). Splitting the grid for the building shp file works fine.
Here's where it all goes pear shaped - The AddAttribute section is unchanged from the manual, yet results in no features having attributes added to them?
AddAttribute|FTYPE="POLYGON" And building="*"|Integer;BUILDTYPE|5
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FAREARAT>0.80|Integer;BUILDTYPE|1
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FNUMVERT<10 And FNUMPERPANG>3 And FNUMNOTPAR<2|Integer; BUILDTYPE|3
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FCONVEX=1|Integer;BUILDTYPE|4
#Then what I'm trying to do is add an attribute to parts of the buildings shpfile based on what kind of landuse polygon each building is in. Again no features have attributes added to them...
#
# CreateAGNGenBuild|FROMFILE="buildings.shp" And FWIDTH<20|{1b53277c-6d5c-49fa-bb92-5580950416cf};{cf7ca399-3773-49cb-aa64-d66573904c64};{1bbbfb93-e013-4f86-a790-16599e4fc68b};{32c41cad-2dd1-4e38-b9f1-befccd41d821};{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
# CreateAGNGenBuild|FROMFILE="buildings.shp" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
# ExportAGN|FSX|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\output texture
Can anyone help point out where I'm going wrong please? I don't see anywhere in the manual where is it demonstrated how to add an attribute to a feature from one dataset by specifying a polygon from another specific dataset? :S
Thanks K
Here's my script so far. Now I freely admit I copied the base script from the manual because I haven't a clue where to start, and I'm trying to reverse engineer it in my head to understand it and make it work for me.
I'm first just loading in data (all in the correct WGS84 projection). Splitting the grid for the building shp file works fine.
ImportOGR|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\SW_Building WGS84.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/211-212-231-241-242-243.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/231 Pasture.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/121 Industrial or commercial units.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/112 Discontinuous urban fabric.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/111 Continuous urban fabric.shp|*|*|NOREPROJ
ImportOGR|E:\Scenery Design Workshop/\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\SW_FunctionalSite WGS84.shp|*|*|NOREPROJ
#ImportOGR|E:\Scenery Design Workshop\OS Opendata\Uni Leicester Land Use Map 2012\Master\CLC12_UK.shp|*|*|NOREPROJ
#
SplitGrid|AGN|*|FROMFILE="SW_Building WGS84.shp"
#
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/211-212-231-241-242-243.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/231 Pasture.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/121 Industrial or commercial units.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/112 Discontinuous urban fabric.shp|*|*|NOREPROJ
ImportOGR|E:/Scenery Design Workshop/OS Opendata/OSOpenMapLocal (ESRI Shape File) SW/landuse 2012/111 Continuous urban fabric.shp|*|*|NOREPROJ
ImportOGR|E:\Scenery Design Workshop/\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\SW_FunctionalSite WGS84.shp|*|*|NOREPROJ
#ImportOGR|E:\Scenery Design Workshop\OS Opendata\Uni Leicester Land Use Map 2012\Master\CLC12_UK.shp|*|*|NOREPROJ
#
SplitGrid|AGN|*|FROMFILE="SW_Building WGS84.shp"
#
Here's where it all goes pear shaped - The AddAttribute section is unchanged from the manual, yet results in no features having attributes added to them?
AddAttribute|FTYPE="POLYGON" And building="*"|Integer;BUILDTYPE|5
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FAREARAT>0.80|Integer;BUILDTYPE|1
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FNUMVERT<10 And FNUMPERPANG>3 And FNUMNOTPAR<2|Integer; BUILDTYPE|3
AddAttribute|FTYPE="POLYGON" And building="*" And BUILDTYPE=5 And FCONVEX=1|Integer;BUILDTYPE|4
#
# Classify buildings
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12="*"|String;BUILDCAT|RURAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12=121|String;BUILDCAT|INDUSTRIAL_COMMERCIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12=112|String;BUILDCAT|DISC_URBAN
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12=111|String;BUILDCAT|CONT_URBAN
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|SITETHEME="Education"|String;BUILDCAT|FUNCTIONAL_SITE
I commented out the rest because I just want to get each stage working properly before moving on to the next...AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12="*"|String;BUILDCAT|RURAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12=121|String;BUILDCAT|INDUSTRIAL_COMMERCIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12=112|String;BUILDCAT|DISC_URBAN
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|CODE_12=111|String;BUILDCAT|CONT_URBAN
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|SITETHEME="Education"|String;BUILDCAT|FUNCTIONAL_SITE
#
# CreateAGNGenBuild|FROMFILE="buildings.shp" And FWIDTH<20|{1b53277c-6d5c-49fa-bb92-5580950416cf};{cf7ca399-3773-49cb-aa64-d66573904c64};{1bbbfb93-e013-4f86-a790-16599e4fc68b};{32c41cad-2dd1-4e38-b9f1-befccd41d821};{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
# CreateAGNGenBuild|FROMFILE="buildings.shp" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
# ExportAGN|FSX|E:\Scenery Design Workshop\OS Opendata\OSOpenMapLocal (ESRI Shape File) SW\data\output texture
Can anyone help point out where I'm going wrong please? I don't see anywhere in the manual where is it demonstrated how to add an attribute to a feature from one dataset by specifying a polygon from another specific dataset? :S
Thanks K

I think they'll get upset if my little problem takes up your time at this time of year - it can always wait