Subtracting features

Image2014-02-04 2128.26.430One of the issues with creating autogen is that vegetation polygons might suppress buildings. When the vegetation overlaps the building the building will not be shown. This can be a bit annoying, since you would like the building to suppress the vegetation normally.

To work around this problem I have added a new step to scenProc. With this step you can subtract features from each other. So this allows you to subtract the buildings from the vegetation polygons. That way both of them will show up correctly in the autogen. As you can see on the picture the step also allows you to add a small buffer zone that removes vegetation that is near the building.

The syntax of the step is as shown below. The first argument is the filter to select the polygons you want to subtract from. In this case I’m selecting forest polygons. The second attribute is the filter to select the features that should be subtracted. In this case I select my buildings. The third argument is the scaling that should be applied to the features that are subtracted. So in this case I double their size to get a buffer area. The last argument is optional. If you provide MINAREAPOLY there the algorithm will subtract the minimum area polygon of the feature (the best fitting rectangle), instead of the feature itself. For buildings that is often what you want, since the autogen buildings are created from this minimum area polygon as well.

SUBTRACTFEATURES|type=forest|type=building|2.0|MINAREAPOLY

2 thoughts on “Subtracting features

  1. Gropied says:

    Hi Arno,

    Do you think that this new command is usable with road, highway, and river type ?

    Is this command usable twice or more in the same scenproc.spc ?

    Thanks

    • arno says:

      Hi,

      Yes, you can use it as often as you want in a configuration file.

      At the moment it only works for polygons. For line features like roads I could maybe add some step to turn them into polygons first.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.