• 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 replace polygons error

Messages
29
Country
switzerland
Hello Arno

In the latest Release v3.0 the Command "ReplacePolygonByVegetationRectangles|landuse="forest"|0.0001|0.5|0.3" dosnt works any more...

Kind Regards

Ramon
 

Attachments

  • ScenProc_Error.PNG
    ScenProc_Error.PNG
    73 KB · Views: 350
Hi,

This looks like a bug. I'll try to reproduce it here.
 
Hi,

It was a bug indeed. I have fixed it now. A new development release with the fix will be available later tonight.
 
Hi Arno

Now is following error occured, see picture. the osm file was downloaded from the Ortho4XP Program.

Command: ReplacePolygonByVegetationRectangles|natural="tree_row" And NOT landuse="forest"|0.0001|0|1

Kind Regards

Ramon
 

Attachments

  • ScenProc_Error_01.PNG
    ScenProc_Error_01.PNG
    52.1 KB · Views: 277
Hi,

I can't exactly see what causes this error. I think that maybe the problem is that some of the input data is not a polygon. Let me check if scenProc does check for the feature type correctly. In most steps I implemented this, but maybe not yet in this one.
 
Hi Arno

Thanks for your Answer. With this Command, i have no Errors.

ReplacePolygonByVegetationRectangles|FTYPE="POLYGON" And natural="tree_row" And NOT landuse="forest"|0.0001|0.5|0.3

Kind Regards

Ramon
 
I have modified scenproc as well by now, so that it automatically selects only polygon features.
 
Hi Arno

I have bushes on the taxiways at some airports, see picture. how can i remove it? are they scrub?

Thank you Arno
 

Attachments

  • Büsche_Roads.PNG
    Büsche_Roads.PNG
    353.5 KB · Views: 345
Hi,

That's hard to tell without knowing which data you are using of course. But you might need to filter out certain features from airports. You can do that with the FilterFeatures step.
 
Hi Arno

When i use this command to exclude scrub from the Airport: FilterFeatures|FTYPE="Scrub"|type="aerodrome"|OVERLAP_BBOX

following Error occured:

1581094305318.png


Thanks for your Answer
 
I'll have to check the code to see what could happen here.
 
Hi Arno

You can fix this Error?

Can i use the "CreateAGNPolyBuild" for Prepar3d v4.5 or is that only for FSX?

Kind Regards

Ramon
 
Hi,

You are missing the last argument in your step that specifies the distance threshold. There is a bug in the code, as you should get an error in the log about the incorrect number of arguments. I will fix that in the next development release. But if you add the threshold it will work.

Autogen polygonal buildings do already work in P3D v4. But I think they are not so useful, as they require you to have an inside courtyard, which not that many buildings have.
 
Hi Arno

Have a question about "FilterFeatures OVERLAP_BBOX | 1". in my script I load 2 files with "landuse = forest". I use FilterFeatures to avoid duplicates. did I understand correctly that only those are created that are not included in the respective file? are the two created together?

IMPORTOGR|C:\scenProc_2.0_x64\Switzerland\switzerland-latest.osm|8;9;47;48|aeroway;landuse|NOREPROJ
IMPORTOGR|C:\scenProc_2.0_x64\Corine\47+008\47+008_Forest.shp|*|landuse|NOREPROJ
#
SplitGrid|AGN|*|building="*"
#
FilterFeatures|landuse="forest"|FROMFILE="47+008_Forest.shp" And landuse="forest"|OVERLAP_BBOX|1
#
ReplacePolygonByVegetationRectangles|FTYPE="POLYGON" And FROMFILE="47+008_Forest.shp" And landuse="forest"|0.001|0|1
CreateAGNRectVeg|FTYPE="POLYGON" And FROMFILE="47+008_Forest.shp" And landuse="forest"|{c9dc45ae-f240-42a9-a137-b7617452a308}
#
ReplacePolygonByVegetationRectangles|FTYPE="POLYGON" And landuse="forest"|0.001|0|1
CreateAGNRectVeg|FTYPE="POLYGON" And landuse="forest"|{c9dc45ae-f240-42a9-a137-b7617452a308}
#

Many thanks for your Answer

Kind Regards Ramon
 
Hi,

In this case you will filter out any forest for which the rectangular bounding box overlaps with any feature in the specified file. So I think that will remove too much.
 
Hi Arno

I would like to ask you about overlaping vegetation and buildings. with my following script the forest is overwritten by the buildings. if I only create the vegetation it shows me all the trees, but not if I invite the buildings to it. try to adapt the script for several days but without success. what am I doing wrong? can you please give me a tip, thank you. scenproc is just great.


IMPORTOGR|C:\scenProc_2.0_x64\Switzerland\46+006\OSM\46+006_ORTHO4XP.osm|*|aeroway;building;landuse|NOREPROJ
IMPORTOGR|C:\scenProc_2.0_x64\Corine\46+006\46+006_Corine.shp|*|Code_06|NOREPROJ
#
SplitGrid|AGN|*|Code_06="*"
#
SetAGNBuildingHeight|*|1.0;0.5;0.1;0.0
#
#================================================================================================
#Code 312 -- ag forest conifer
PlacePointsInPolygon|Code_06="312"|0.001;0.001|1.0;1.0|String;type|312|INHERITPARENTATTR
PointToPolygon|FTYPE="POINT" And type="312"|8;8|hdg|String;polygons|312
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_Corine.shp" And polygons="312"|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
#=================================================================================================
#Code 313 -- Mixed Forest
PlacePointsInPolygon|Code_06="313"|0.001;0.001|1.0;1.0|String;type|313|INHERITPARENTATTR
PointToPolygon|FTYPE="POINT" And type="313"|8;8|hdg|String;polygons|313
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_Corine.shp" And polygons="313"|{c9dc45ae-f240-42a9-a137-b7617452a308}
#=================================================================================================
#Code 322 --ag Bushes Wet Short
PlacePointsInPolygon|Code_06="322"|0.001;0.001|1.0;1.0|String;type|322|INHERITPARENTATTR
PointToPolygon|FTYPE="POINT" And type="322"|8;8|hdg|String;polygons|322
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_Corine.shp" And polygons="322"|{ad040bc2-14c8-4df0-a7cb-e67984e0f667}
#=================================================================================================
#Code 324 -- ag Forest Broadleaf 3-15m Short
PlacePointsInPolygon|Code_06="324"|0.001;0.001|1.0;1.0|String;type|324|INHERITPARENTATTR
PointToPolygon|FTYPE="POINT" And type="324"|8;8|hdg|String;polygons|324
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_Corine.shp" And polygons="324"|{b6c1e623-abcb-4fc5-9f2d-59c5234b9a0b}
#
#******************************************************************************************************
# - Create Vegetation landuse
# broadleaf forest
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_ORTHO4XP.osm" And polygons="forest" And FRAND < 0.5|{7dc6ef4e-92a5-4d0d-b94b-212dd1fa936d}
# conifer forest
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_ORTHO4XP.osm" And polygons="forest" And FRAND > 0.5|{0053b63d-b2c0-4bd9-9853-d9d21c9ad1fa}
#
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_ORTHO4XP.osm" And landuse="orchard" And NOT landuse="forest" And FRAND < 0.5|{1d1df1ef-5aa2-47db-b7ab-05b83e806dcd}
CreateAGNPolyVeg|FTYPE="POLYGON" And FROMFILE="46+006_ORTHO4XP.osm" And natural="wood" And NOT landuse="forest" And FRAND < 0.5|{f6501d40-5ab2-41d6-b67b-a682ca953485}
#
# **************************************************************************************************************************************
# REMOVE PLANTS FROM AIRPORTS
AddAttributeIfInside|Code_06="*"|aeroway="aerodrome"|String;skip|yes
AddAttributeIfInside|landuse="*"|aeroway="aerodrome"|String;skip|yes
# This next line removes any plants or buildings identified in the AddAttribute lines above.
UnloadFeatures|skip="yes"
#
# **************************************************************************************************************************************
# REMOVE PLANTS FROM BUILDINGS
# - Identify any trees to be excluded which are located inside a building footprint
AddAttributeIfInside|FTYPE="POLYGON" And Code_06="*"|building="*"|String;skip|yes
AddAttributeIfInside|FTYPE="POLYGON" And landuse="forest"|building="*"|String;skip|yes
# - This next line removes anything identified in the lines above that needs to be excluded.
UnloadFeatures|skip="yes"
#
CreateAGNGenBuild|FTYPE="POLYGON" And FROMFILE="46+006_ORTHO4XP.osm" And building="*" And FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CreateAGNGenBuild|FTYPE="POLYGON" And FROMFILE="46+006_ORTHO4XP.osm" And building="*" And FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
ExportAGN|P3D v2|C:\scenProc_2.0_x64\Switzerland\46+006\texture



Many thanks and greetings Ramon
 
Hi,

I see a couple of weird things in your script:

  1. Why do you first place points and then create rectangles from these points? You can place autogen trees from point features directly if you use the CreateAGNRectVeg step instead of CreateAGNPolyVeg.
  2. At the bottom of your script you attempt to unload trees on airports and buildings, but that won't work, since you made the AGN objects above that already. You would need to do the filtering before you make the AGN objects.
  3. What do you mean when you say the forest is overwritten by the buildings? Do you mean that the buildings remove forest around them? Overlapping buildings and vegetation polygons can indeed give issues, but I thought it was the other way around. Best is to make sure they don't overlap.
 
Thanks arno for the quick reply. how can I check the overlap, can you do it in QGIS or with a command directly in scenproc. found this entrys:

FilterFeatures | type = "building" | type = "vegetation" | OVERLAP_BBOX

or

BooleanFeatures | DIFFERENCE | landuse = "forest" | building = "*" | 1

I adapted the other one and will test it, thanks

kind regards

Ramon

in the Corine SHP File I found it to be polygons.
 
Hi,

Have a look at section 9.2.8 in the manual, it explains how the BooleanFeatures step can be used to subtract buildings from vegetation (including a picture to illustrate it).
 
Back
Top