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

SubtractFeatures problem

dave hoeffgen

Resource contributor
Messages
1,439
Country
germany
Hi,
for building not to intersect a road I used the "line to poly" function and then the "SubtractFeatures" one.
After hours of processing and a result like there was no subtraction attempt applied I decided to make a test.

So I quickly made this shapefile in QGIS:
shapes.jpg


The yellow poly has the attribute "test=2", the two others have "test=1".
I used the following code:

Code:
ImportOGR|...\test.shp|*|*|AUTODETECT


SubtractFeatures|test=2|test=1|1.5

ExportOGR|*|ESRI Shapefile|...\test.shp|test

#paths are removed for privacy, they are not identical

The exported shapefile is written OK, but nothing is "subtracted", basically input and output files are identical.

Is this a limit to the feature, is This not how it is meant to be used? Is it limited to polygons which are completely inside each other?

Thanks in advance for any clarification.

Regards,
Dave
 
Hi Dave,

Nope, this should work. Are there any messages in the log from the subtract step? And can you attach the test shapefile so that I can try here?
 
I'll attach them later when i get home. The next step would be subtracting two polygons from each other which have the same attribute values. Should this work too?
 
Thanks, I'll have a look at them.

No, subtracting polygons with the same attributes won't work, since you can't select them in that case.
 
Oops, no, sorry completely forgot to check this issue.
 
Hi,

I found out what the issue was. Your test attribute has the type of string, not integer. So you filter should be like this:

Code:
SubtractFeatures|test="2"|test="1"|1.5

Then it works. With the new and improved tooltips you can now hover above a variable and see what the type is.
 
Back
Top