• 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.

P3D v5 Any advice on why I can't get any vegetation autogen please?

Messages
542
Country
australia
I have just recently started to learn Scenproc to make some autogen for photoreal areas I have. I have downloaded some shapefiles for Spain, where I am currently trying to make the autogen for. The shapefiles are split up by region, which is handy because the photoscenery I have is also split up by region. I am currently trying to make some autogen for Andalucia. For a start, I am just trying to get basic buildings and trees placed, so that the ground doesn't look so flat. I had some success with generating some buildings fairly quickly, but every script I have tried so far has created zero vegetation, and I can't figure out why. I have stripped down a script to just the bare vegetation requirements, but everything I have tried has been unsuccessful. The shapefiles appear to contain polygons, and they have a tag (eg fclass = forest). This particular shapefile is named landuse (gis_osm_landuse_a_free_1.shp). The script I am using is:

ImportOGR|C:\Program Files\scenProc_3.0_x64\gdal-data\andalucia-latest-free\gis_osm_landuse_a_free_1.shp|*|*|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
# creation de la vegetation
CreateAGNPolyVeg|FTYPE = POLYGON and fclass="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 fclass="orchard"|{56a4998d-c1e5-416c-a37b-c35ce16504b6}
CreateAGNPolyVeg|FTYPE = POLYGON and fclass="nature_reserve"|{72e37d90-824e-4e97-9187-a60491864a49};{ad0c30b6-5b47-4d96-9bab-38f58e251c5e};{b7c05b80-45e9-4faf-9548-6a3e59c02dd6};{bc6396b0-6e51-4a4f-ab4f-5386c84609a6}
CreateAGNPolyVeg|FTYPE = POLYGON and fclass="farmland"|{2368c260-177d-4af7-94d4-da882778108f}
CreateAGNPolyVeg|FTYPE = POLYGON and fclass="scrub"|{acd89c1c-2a87-4168-8cb6-a1ca8e2859ac};{1cdb2a6c-b20f-4923-9e12-4aa636441d4d};{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
CreateAGNPolyVeg|FTYPE = POLYGON and fclass="park"|{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}
#
ExportAGN|FSX|F:\Photoreal\Spain_PR\Andalucia\TEXTURE


and the log from the last failed attempt is:

11:53 PM ImportOGR Information Reading file C:\Program Files\scenProc_3.0_x64\gdal-data\andalucia-latest-free\gis_osm_landuse_a_free_1.shp
11:53 PM ImportOGR Information Read 112280 features from file
11:53 PM SplitGrid Information Splitting features in 0.0146484375 x 0.010986328125 grid...
11:54 PM SplitGrid Information Features divided in 110538 cells
11:54 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = POLYGON and fclass="forest")...
11:54 PM CreateAGNPolyVeg Information Created 0 autogen objects
11:54 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = POLYGON and fclass="orchard")...
11:54 PM CreateAGNPolyVeg Information Created 0 autogen objects
11:54 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = POLYGON and fclass="nature_reserve")...
11:54 PM CreateAGNPolyVeg Information Created 0 autogen objects
11:54 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = POLYGON and fclass="farmland")...
11:54 PM CreateAGNPolyVeg Information Created 0 autogen objects
11:54 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = POLYGON and fclass="scrub")...
11:54 PM CreateAGNPolyVeg Information Created 0 autogen objects
11:54 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = POLYGON and fclass="park")...
11:54 PM CreateAGNPolyVeg Information Created 0 autogen objects
11:54 PM ExportAGN Information Writing AGN files to folder F:\Photoreal\Spain_PR\Andalucia\TEXTURE
11:54 PM ExportAGN Information Written 0 autogen files
11:54 PM SceneryProcessor Information scenProc finished processing
11:54 PM SceneryProcessor Information 3.68 seconds for ImportOGR
11:54 PM SceneryProcessor Information 25.86 seconds for SplitGrid
11:54 PM SceneryProcessor Information 7.46 seconds for CreateAGNPolyVeg
11:54 PM SceneryProcessor Information 0.12 seconds for ExportAGN
11:54 PM SceneryProcessor Information 37.12 seconds total


No_Veg_pic.jpg




Thanks
 

Attachments

Looking at the log it seems no polygons match the filter, as no autogen is made. But that is weird as the SHP file seems to contain the attribute you check for. Let me try to download the data and see if I can reproduce it.
 
Hi,

I downloaded the SHP files and I had another look at the issue. I have found the problem in your script now, it is in the filter. At the moment you use:

Code:
FTYPE = POLYGON and fclass="forest"

But with this script you are comparing the value of the FTYPE attribute with the value of the POLYGON attribute. That last one does not exist, so no features are selected. What you intend to do is test if the FTYPE attribute has the value of POLYGON, but for that you need to put quotes around the value. So the filter should be:

Code:
FTYPE = "POLYGON" and fclass="forest"

Or you could do it even shorter, as the steps that take polygons as input automatically will add a condition for the feature type to the filter. So you could also just write:

Code:
fclass="forest"
 
SUCCESS! Thanks Arno. Much appreciated!

1:26 PM ImportOGR Information Reading file C:\Program Files\scenProc_3.0_x64\gdal-data\andalucia-latest-free\gis_osm_landuse_a_free_1.shp
1:26 PM ImportOGR Information Read 112280 features from file
1:26 PM SplitGrid Information Splitting features in 0.0146484375 x 0.010986328125 grid...
1:27 PM SplitGrid Information Features divided in 110538 cells
1:27 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = "POLYGON" and fclass="forest")...
1:27 PM CreateAGNPolyVeg Information Created 22623 autogen objects
1:27 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = "POLYGON" and fclass="orchard")...
1:27 PM CreateAGNPolyVeg Information Created 27040 autogen objects
1:27 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = "POLYGON" and fclass="nature_reserve")...
1:27 PM CreateAGNPolyVeg Information Created 12375 autogen objects
1:27 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = "POLYGON" and fclass="farmland")...
1:27 PM CreateAGNPolyVeg Information Created 24342 autogen objects
1:27 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = "POLYGON" and fclass="scrub")...
1:27 PM CreateAGNPolyVeg Information Created 17891 autogen objects
1:27 PM CreateAGNPolyVeg Information Creating autogen polygon vegetation with filter FTYPE="POLYGON" AND (FTYPE = "POLYGON" and fclass="park")...
1:27 PM CreateAGNPolyVeg Information Created 13426 autogen objects
1:27 PM ExportAGN Information Writing AGN files to folder F:\Photoreal\Spain_PR\Andalucia\TEXTURE
1:27 PM ExportAGN Information Created 117697 polygonal vegetation objects
1:27 PM ExportAGN Information Written 22496 autogen files
1:27 PM SceneryProcessor Information scenProc finished processing
1:27 PM SceneryProcessor Information 3.60 seconds for ImportOGR
1:27 PM SceneryProcessor Information 25.95 seconds for SplitGrid
1:27 PM SceneryProcessor Information 8.71 seconds for CreateAGNPolyVeg
1:27 PM SceneryProcessor Information 3.06 seconds for ExportAGN
1:27 PM SceneryProcessor Information 41.31 seconds total
 
Back
Top