• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Scenproc default script development.

Messages
100
Country
poland
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 :)
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,632
Country
netherlands
Hi,

It is very hard to make a default script that works everywhere, as it depends a lot on the data you are using. And that data will vary with the location on the world you are working for. So I assume that you want to use OSM data with your default script. In that case you need to realize that the quality of OSM data varies with location. So that might explain why the results are sometimes not as good.

The last two scripts check for an attribute named LUCODE to set building type. That will never work with OSM. That was taking from another sample where land use data was used which had such an attribute. Also the steps at the start of the last two scripts to add cell attributes make no sense: 1) each step overwrites the attribute of the previous, 2) the attributes are never used.

The way the buildings are made looks OK in the scripts, that is based on a sample in the manual. And that approach should be quite robust.
 
Messages
100
Country
poland
Tkank you Arno . I will try in last script change what you said. If I will not be satisfied I will work with QGIS. I`ve download from openstret Geofabrik data that I will use in scenproc ?. I assume I will have to follow your tutorials on how create separete steps for building, trees and so on.. But if someone have any script please share I will chack if it will meet my expectations.
 
Messages
100
Country
poland
Last time I try to download autogen I get this message even on default script so scensript don`t start to create anything.
 

Attachments

  • Przechwytywanie.JPG
    Przechwytywanie.JPG
    280.3 KB · Views: 14
Messages
100
Country
poland
Right now code looks like that: Correct me what is wrong if is. Wondering what role # has and if not placed in right place will terminate script. If co please Arno check if everything looks good.



IMPORTOGR|@0@|*|building;landuse;highway;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
SETAGNBUILDINGHEIGHT|*|1.0;0.5;0.0;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
#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

# 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@
 
Last edited:
Messages
100
Country
poland
After downloading OSM data for asia I changed script but FSET still trying to download data. I guess I missed something...

IMPORTOGR|map.osm|*|building;landuse;highway;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
SETAGNBUILDINGHEIGHT|*|1.0;0.5;0.0;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
#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

# 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|C:\AUTOGEN
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,632
Country
netherlands
Hi,

# just means that a line is a comment and is ignored. It should only be used at the start of a line.

I have cleaned up your last script a bit, as it contained checks for attributes that OSM data does not have or checks that are not useful to have.

I see you used a sample where roofs are classified in different pitch levels. Depending on the area you work on it might be more realistic to include flat roofs in there as well. I have not done so, as I don't know where you are working.

I have not checked if all GUIDs used are correct.

Code:
IMPORTOGR|map.osm|*|building;landuse;highway;natural;leisure|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
SetAGNBuildingHeight|*|1.0;0.5;0.0;0.0
#
# 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
#
# 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
#
# 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}
#
# 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|C:\AUTOGEN
 
Messages
100
Country
poland
I assume that scenproc can read directly from .osm file and I have to point a path at the first string and output at the last like in script above. I don`t know what is a difference between FSET and scenproc itselft but FSET is no going to download data from file instead from online api and endless connection I see.
 

Attachments

  • Przechwytywanie.JPG
    Przechwytywanie.JPG
    237.2 KB · Views: 17

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,632
Country
netherlands
Hi,

I have no clue how ESET gets the OSM data, but it looks like the server it uses has some timeout or problem. scenProc has no ability to download the data, the user has to do that himself.
 
Messages
100
Country
poland
FSET mod 1.2 uses scenproc with script from OrthoXP and creates AGN files depending on the script. It`s not perfect but works.
 

Attachments

  • Przechwytywanie.JPG
    Przechwytywanie.JPG
    196.1 KB · Views: 11
Messages
526
Country
us-california
FSET itself is still not used to do any OSM work, it is scenProc!
the same area which is processed in FSET is likely passed as boundary area to generate .agn files with scenProc,
still it is not FSET doing the work when it comes to .agn files, FSET only contribution is the area boundary and photoreal .bgl files,
Ortho4XP is likely managing running the scripts in each application,

what you see in the command window you posted is FSET trying to connect to image service to download tiles which is currently failing,
this is not OSM data connection and has nothing to do with scenProc but FSET server settings you currently run in your FSEarthTiles.ini (or maybe some other configuration file in Ortho4XP),
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,632
Country
netherlands
Sorry Chris, but the messages about the overpass API do look like trying to download OSM data. So it seems this version of FSET does download OSM data (which it then feeds to scenProc).
 
Messages
526
Country
us-california
yes youre right, i see the first line now,
at first glance it looked like normal tile request that was failing,
i didn't realize they integrated osm requests with FSET workflow,
server info and connect string should still be in the FSEarthTiles.ini i think, maybe connect string changed?
 
Last edited:
Messages
100
Country
poland
Hi there ! ;)

I`m learning scenproc ( it is not easy stuff ).

I used script above that Arno checked. I loaded map.osm of Georgia and no errors and waiting. After 1.5h nothing changes and I have this:


1634230610958.png






When I open scenproc once again I see some messages and think it`s still processing .osm file :

1634230640906.png
1634230610958.png1634230640906.png

Is it ok ? My map.osm ( of Georgia ) is 1.1GB . How long it will take to finish reading and writings agn files ? I`ve also downloaded SHP files and loaded to QGIS and exported and will try to make it like in tutorial on wiki with first step like this ?


IMPORTSHP|natural.shp|NOREPROJ
#
SPLITGRID|AGN
#
CREATEAGNPOLYVEG|FTYPE=POLYGON;type=forest|{e8b937fd-a1f2-4bd5-8548-2c80d30102af}
#
WRITEAGNFILES|FSX|C:\flightsim\belgium_photo\texture

Is it correct and up the time script and will work ? What after any suggestions ?

Thanks for any reply.

Script I`m processing for last 2h looks like below:


ImportOGR|C:\Users\rafal\Desktop\scenproc\georgia-latest-free\map.osm|*|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|C:\AUTOGEN\texture
 
Messages
526
Country
us-california
it appears that the data was read under one minute,
it is processing splitgrid step which may take time depending on your data and split lod selected,
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
30,632
Country
netherlands
Hi,

Processing an entire country at once can take long. You need to remember that a country like Georgia will result in tenthousands of agn file already. In general it is better to process smaller areas at a time.
 
Messages
100
Country
poland
But I believe so far it`s ok and there is no mistakes and I will have to wait... It doesn`t matter if scenproc will create nice autogen. Maybe I should run batch mode..
 
Top