- Messages
- 107
- Country
Hello I use FSET with scenproc option where I have default script. I`m not satisfied with results to much . Missing trees and buildings in some places especially small village. Some buildings were on each other. I know I can use QGIS and make it properly and accurate but looking for something simple because my expectations are moderate. Could you share your experience and upload modified default script that works for you ? Would be more than thankfull and many people I believe. I give some examples of scripts: 1 is default second is little modified and works also and third is found on FSdeveloper but doesn`t work so if somebody could check it and tell what is wrong in the code.
Chears for all !
ImportOGR|@0@|*|building;landuse;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
SetAGNBuildingHeight|*|1.0;0.5;0.0;0.0
#
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="conservation"|{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="tree"|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="tree_row"|{a4a30975-075c-49ec-87fb-7e0931cb5004}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="golf"|{2fbf9f8d-6ba2-4cc1-8d8e-af218f65d0e8}
#
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
#
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL
#
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
#
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
#
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}
#
CreateAGNGenBuild|building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
ExportAGN|FSX|@1@
I have changed it a little it`s second and works so so :
IMPORTOGR|@0@|*|building;landuse;natural;highway;leisure;residential|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
AddCellAttribute|*|String;area|rural
AddCellAttributeIfInside|*|residential="urban"|String;area|urban
AddCellAttribute|*|String;fclass|building
AddCellAttribute|*|String;type|house
AddCellAttribute|*|String;type|apartments
AddCellAttribute|*|String;type|roof
AddCellAttribute|*|String;type|industrial
#
SetAGNBuildingHeight|area="rural"|1.0;0.0;0.0;0.0
SetAGNBuildingHeight|area="urban"|0.8;0.5;0.1;0.0
SetAGNBuildingHeight|fclass="building"|0.0;0.6;0.6;0.2
SetAGNBuildingHeight|type="residential"|0.0;0.5;0.8;0.3
SetAGNBuildingHeight|type="house"|0.0;0.8;0.5;0.2
SetAGNBuildingHeight|type="roof"|0.0;0.5;0.4;0.1
SetAGNBuildingHeight|type="industrial"|0.5;0.5;0.0;0.0
#
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="conservation"|{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree"|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree_row"|{a4a30975-075c-49ec-87fb-7e0931cb5004}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="golf"|{2fbf9f8d-6ba2-4cc1-8d8e-af218f65d0e8}
#
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
#
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL
#
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
#
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
#
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
#
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}
#
CreateAGNGenBuild|building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
ExportAGN|FSX|@1@
And found that one on Fsdeveloper:
# Credit to Harry Otter for the default ScenProc script!
IMPORTOGR|@0@|*|building;landuse;highway;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
#SETAGNBUILDINGHEIGHT|*|1.0;0.5;0.0;0.0
AddCellAttribute|*|String;fclass|building
AddCellAttribute|*|String;type|residential
AddCellAttribute|*|String;type|house
AddCellAttribute|*|String;type|apartments
AddCellAttribute|*|String;type|roof
AddCellAttribute|*|String;type|industrial
#
SetAGNBuildingHeight|fclass="building"|0.0;0.6;0.6;0.2
SetAGNBuildingHeight|type="residential"|0.0;0.5;0.8;0.3
SetAGNBuildingHeight|type="house"|0.0;0.8;0.5;0.2
SetAGNBuildingHeight|type="roof"|0.0;0.5;0.4;0.1
SetAGNBuildingHeight|type="industrial"|0.5;0.5;0.0;0.0
#creation de la vegetation
#CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
#CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="conservation"|{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree"|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree_row"|{a4a30975-075c-49ec-87fb-7e0931cb5004}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
#creation de la vegetation
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{a91a9e12-d0ae-433b-9153-c6c2e8143f3d};{64da6e09-6d2c-4eac-bf32-f79cbaddcffb};{f92dfb07-9e9d-4db9-a936-4dde2ece3fbf};{46537aa4-0f85-4840-ac15-bb1198111254};{51abd43d-294d-4fbb-93b1-61f35ac8891c};{b39919c5-083e-4be0-a5df-cfb43cee439d};{0a85e154-6aff-4ec6-9640-8d46758d9c55};{bcf582df-fe10-43a1-bf91-74cb004451d0};{e738b5f2-0b4e-42af-955f-96f24fc50043};{5fc298b3-6a99-40be-a6d2-51d49a1f6310};{d9139817-a733-4609-8b91-cccb3bda8528};{88a689ae-958f-4588-8805-0c48ae8d923d};{494e699d-5f5e-4191-85c9-8ed41b96aa3e};{13c6b576-38a1-4daf-bbfd-99a3da908a54};{7337b46a-4e7c-4167-85d4-31a08794317d};{08eafa28-5200-4e5e-aa76-2cbd934108aa};{3fff1747-e528-472e-a5e5-e7dfc44240b6};{cc321ca5-c258-4584-996e-0dd3f3bc531d};{f423294e-5624-499e-80ef-73d8cefe61c1};{5b87d25c-f98e-4401-a3f7-ee667749f7c3};{95dc5b85-13ca-4c36-8c90-1124b71a5769};{e258071f-4026-447a-8227-fdd1e16f5097};{6b0ae83d-41bc-4171-9f04-45b4694b43f3};{9683c859-7b37-41fb-9d40-828477713f06};{9d2d1501-9135-4b2d-808f-5c6a8d0c3ce7};{59413a8e-065d-4706-ba20-d1756f0f25e2};{c4378eea-8d57-4afc-abb6-d63eb6da9c15};{2957ebf1-5ef6-47ce-aa79-31a3d0fa849a};{64b9ff09-f918-4e96-9262-57b07629f6c0};{3daebd73-10e7-41a3-b57a-4bc9e646ac5f};{98c043f3-661a-4ac0-8239-712948a602ec}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="conservation"|{72e37d90-824e-4e97-9187-a60491864a49};{ad0c30b6-5b47-4d96-9bab-38f58e251c5e};{b7c05b80-45e9-4faf-9548-6a3e59c02dd6};{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="nature_reserve"|{dc5c8dcb-551e-4980-867d-ee6d12695c50}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree"|{acd89c1c-2a87-4168-8cb6-a1ca8e2859ac};{1cdb2a6c-b20f-4923-9e12-4aa636441d4d};{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree_row"|{51abd43d-294d-4fbb-93b1-61f35ac8891c};{b39919c5-083e-4be0-a5df-cfb43cee439d};{e738b5f2-0b4e-42af-955f-96f24fc50043};{8fa52b1e-4d35-428c-9adc-dea62fc92bab};{34126b61-fee1-4343-bdf9-1bd65ae91ae7};{5fc298b3-6a99-40be-a6d2-51d49a1f6310}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wetland"|{0533d2b5-2a93-4c4a-9660-069a3f73b921};{224fafba-241a-4dbb-b36f-280bcead2110};{ad0c30b6-5b47-4d96-9bab-38f58e251c5e};{0f069be1-b5ef-4a03-9455-b8507846ea73}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="golf"|{2fbf9f8d-6ba2-4cc1-8d8e-af218f65d0e8}
# Add attribute to indicate the type of building
# 1 = ALMOST RECTANGLE (BASED ON AREA RATIO)
# 3 = REGULAR SHAPED (MANY PARALLEL EDGES)
# 4 = CONVEX POLYGONS
# 5 = CONCAVE POLYGONS
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 industrial/commercial buildings
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL
# Add attribute for roof type
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
# Remove complex buildings
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
# Create buildings autogen
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}
#
CreateAGNGenBuild|building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
# lights
# GCC roads
LineToPoint|FTYPE="LINE" And highway="secondary"|CONTINUOUS|150;150|5;5|0|String;type|light|hdg
#
PointToPolygon|type="light"|8;8|hdg|String;type|lightpoly
#
CreateAGNLibObject|type="lightpoly"|{0017a263-464f-14fd-f77f-2996fed44864}
EXPORTAGN|FSX|@1@
Thank you
Chears for all !
ImportOGR|@0@|*|building;landuse;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
SetAGNBuildingHeight|*|1.0;0.5;0.0;0.0
#
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="conservation"|{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="tree"|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="tree_row"|{a4a30975-075c-49ec-87fb-7e0931cb5004}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
CreateAGNPolyVeg|FTYPE="POLYGON" And leisure="golf"|{2fbf9f8d-6ba2-4cc1-8d8e-af218f65d0e8}
#
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
#
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL
#
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
#
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
#
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}
#
CreateAGNGenBuild|building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
ExportAGN|FSX|@1@
I have changed it a little it`s second and works so so :
IMPORTOGR|@0@|*|building;landuse;natural;highway;leisure;residential|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
AddCellAttribute|*|String;area|rural
AddCellAttributeIfInside|*|residential="urban"|String;area|urban
AddCellAttribute|*|String;fclass|building
AddCellAttribute|*|String;type|house
AddCellAttribute|*|String;type|apartments
AddCellAttribute|*|String;type|roof
AddCellAttribute|*|String;type|industrial
#
SetAGNBuildingHeight|area="rural"|1.0;0.0;0.0;0.0
SetAGNBuildingHeight|area="urban"|0.8;0.5;0.1;0.0
SetAGNBuildingHeight|fclass="building"|0.0;0.6;0.6;0.2
SetAGNBuildingHeight|type="residential"|0.0;0.5;0.8;0.3
SetAGNBuildingHeight|type="house"|0.0;0.8;0.5;0.2
SetAGNBuildingHeight|type="roof"|0.0;0.5;0.4;0.1
SetAGNBuildingHeight|type="industrial"|0.5;0.5;0.0;0.0
#
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="conservation"|{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree"|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree_row"|{a4a30975-075c-49ec-87fb-7e0931cb5004}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="golf"|{2fbf9f8d-6ba2-4cc1-8d8e-af218f65d0e8}
#
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
#
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL
#
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
#
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
#
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
#
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}
#
CreateAGNGenBuild|building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
ExportAGN|FSX|@1@
And found that one on Fsdeveloper:
# Credit to Harry Otter for the default ScenProc script!
IMPORTOGR|@0@|*|building;landuse;highway;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
#SETAGNBUILDINGHEIGHT|*|1.0;0.5;0.0;0.0
AddCellAttribute|*|String;fclass|building
AddCellAttribute|*|String;type|residential
AddCellAttribute|*|String;type|house
AddCellAttribute|*|String;type|apartments
AddCellAttribute|*|String;type|roof
AddCellAttribute|*|String;type|industrial
#
SetAGNBuildingHeight|fclass="building"|0.0;0.6;0.6;0.2
SetAGNBuildingHeight|type="residential"|0.0;0.5;0.8;0.3
SetAGNBuildingHeight|type="house"|0.0;0.8;0.5;0.2
SetAGNBuildingHeight|type="roof"|0.0;0.5;0.4;0.1
SetAGNBuildingHeight|type="industrial"|0.5;0.5;0.0;0.0
#creation de la vegetation
#CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
#CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="conservation"|{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="nature_reserve"|{82f0282d-f82d-484c-a640-aac21a69be03}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree"|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree_row"|{a4a30975-075c-49ec-87fb-7e0931cb5004}
#CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wetland"|{89ed8548-e54f-40ef-9837-7653885d409c}
#creation de la vegetation
CreateAGNPolyVeg|FTYPE="POLYGON" And landuse="forest"|{a91a9e12-d0ae-433b-9153-c6c2e8143f3d};{64da6e09-6d2c-4eac-bf32-f79cbaddcffb};{f92dfb07-9e9d-4db9-a936-4dde2ece3fbf};{46537aa4-0f85-4840-ac15-bb1198111254};{51abd43d-294d-4fbb-93b1-61f35ac8891c};{b39919c5-083e-4be0-a5df-cfb43cee439d};{0a85e154-6aff-4ec6-9640-8d46758d9c55};{bcf582df-fe10-43a1-bf91-74cb004451d0};{e738b5f2-0b4e-42af-955f-96f24fc50043};{5fc298b3-6a99-40be-a6d2-51d49a1f6310};{d9139817-a733-4609-8b91-cccb3bda8528};{88a689ae-958f-4588-8805-0c48ae8d923d};{494e699d-5f5e-4191-85c9-8ed41b96aa3e};{13c6b576-38a1-4daf-bbfd-99a3da908a54};{7337b46a-4e7c-4167-85d4-31a08794317d};{08eafa28-5200-4e5e-aa76-2cbd934108aa};{3fff1747-e528-472e-a5e5-e7dfc44240b6};{cc321ca5-c258-4584-996e-0dd3f3bc531d};{f423294e-5624-499e-80ef-73d8cefe61c1};{5b87d25c-f98e-4401-a3f7-ee667749f7c3};{95dc5b85-13ca-4c36-8c90-1124b71a5769};{e258071f-4026-447a-8227-fdd1e16f5097};{6b0ae83d-41bc-4171-9f04-45b4694b43f3};{9683c859-7b37-41fb-9d40-828477713f06};{9d2d1501-9135-4b2d-808f-5c6a8d0c3ce7};{59413a8e-065d-4706-ba20-d1756f0f25e2};{c4378eea-8d57-4afc-abb6-d63eb6da9c15};{2957ebf1-5ef6-47ce-aa79-31a3d0fa849a};{64b9ff09-f918-4e96-9262-57b07629f6c0};{3daebd73-10e7-41a3-b57a-4bc9e646ac5f};{98c043f3-661a-4ac0-8239-712948a602ec}
CreateAGNPolyVeg|FTYPE="POLYGON" And natural="scrub"|{2fde0277-1697-4dab-b481-c3985c80596f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And landuse="conservation"|{72e37d90-824e-4e97-9187-a60491864a49};{ad0c30b6-5b47-4d96-9bab-38f58e251c5e};{b7c05b80-45e9-4faf-9548-6a3e59c02dd6};{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wood"|{dcf543b7-c0d5-4fd4-b970-83965c2911c9}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="nature_reserve"|{dc5c8dcb-551e-4980-867d-ee6d12695c50}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="garden"|{2368c260-177d-4af7-94d4-da882778108f}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree"|{acd89c1c-2a87-4168-8cb6-a1ca8e2859ac};{1cdb2a6c-b20f-4923-9e12-4aa636441d4d};{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="tree_row"|{51abd43d-294d-4fbb-93b1-61f35ac8891c};{b39919c5-083e-4be0-a5df-cfb43cee439d};{e738b5f2-0b4e-42af-955f-96f24fc50043};{8fa52b1e-4d35-428c-9adc-dea62fc92bab};{34126b61-fee1-4343-bdf9-1bd65ae91ae7};{5fc298b3-6a99-40be-a6d2-51d49a1f6310}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And natural="wetland"|{0533d2b5-2a93-4c4a-9660-069a3f73b921};{224fafba-241a-4dbb-b36f-280bcead2110};{ad0c30b6-5b47-4d96-9bab-38f58e251c5e};{0f069be1-b5ef-4a03-9455-b8507846ea73}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="park"|{e04669c0-9f7b-42e8-a2c7-eee870c59d8e}
CREATEAGNPOLYVEG|FTYPE="POLYGON" And leisure="golf"|{2fbf9f8d-6ba2-4cc1-8d8e-af218f65d0e8}
# Add attribute to indicate the type of building
# 1 = ALMOST RECTANGLE (BASED ON AREA RATIO)
# 3 = REGULAR SHAPED (MANY PARALLEL EDGES)
# 4 = CONVEX POLYGONS
# 5 = CONCAVE POLYGONS
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 industrial/commercial buildings
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=16|String;BUILDCAT|INDUSTRIAL
AddAttributeIfInside|FTYPE="POLYGON" And building="*"|LUCODE=15|String;BUILDCAT|COMMERCIAL
# Add attribute for roof type
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5|String;ROOFTYPE|PEAKED_ALL
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>5 And FLENGTH<12|String;ROOFTYPE|PEAKED_SIMPLE
AddAttribute|FTYPE="POLYGON" And building="*" And FWIDTH>20|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="INDUSTRIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
AddAttribute|BUILDCAT="COMMERCIAL"|String;ROOFTYPE|PEAKED_LOW_PITCH
# Remove complex buildings
ReplacePolygonByBuildingRectangles|BUILDTYPE=3|0.8;4;4|0.25;2.0;0.5|Integer;BUILDTYPE|2
# Create buildings autogen
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_ALL"|{c05c5106-d562-4c23-89b8-a4be7495b57c}|MAXRATIO=2
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_SIMPLE"|{d4ee02a2-ed47-4f10-b98c-502516983383}
CreateAGNGenBuild|BUILDTYPE<3 And ROOFTYPE="PEAKED_LOW_PITCH"|{a9b0e686-0758-4294-a760-9bb4fd341621}
#
CreateAGNGenBuild|building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
# lights
# GCC roads
LineToPoint|FTYPE="LINE" And highway="secondary"|CONTINUOUS|150;150|5;5|0|String;type|light|hdg
#
PointToPolygon|type="light"|8;8|hdg|String;type|lightpoly
#
CreateAGNLibObject|type="lightpoly"|{0017a263-464f-14fd-f77f-2996fed44864}
EXPORTAGN|FSX|@1@
Thank you