1

Trying to find the maximum of a several Shapefiles I execute a cascade of unions. Out of all the tools, so far GRASS v.overlay seems to be the one working the best. However I am running into trouble with a dataset and it seems to be a topology issue.

Consider this example: I have two Shapefiles/layers.

Input 1: input1 Input 2: input2 The resulting union: union

This first union works as expected, even if the resulting polyong is very small. Long diagonal of the yellow polygon is about 1mm. The field I want to maximise is an Integer called "int" and the resulting table is the upper one:

tables

However if I execute the next Union with another polygon which covers all the area displayed in the images completely with a single variable (so no more slivers, yellow polygon is identical) the table suddenly misses values of the Unions already made. E.g. a_a_int in the second table should be a_int of the first (0). All layers are in the same coordinate system. This happens only for a few polygons in the whole process and they seem to always be very small. How can I avoid this/work around?

QGIS 2.18.16 GRASS 7.4.0

1 Answer 1

1

There are advanced parameters to v.overlay, such as a snapping distance and a minimum area. Applying a drastic snapping distance eventually solved the problem. Interestingly enough, it does not result in the small polygon not being created (step 1), but it eliminates it in the second union. This is counter-intuitive to the description given in the GRASS manual for v.overlay:

Snapping is enabled by default and can be disabled by setting the snap option to a negative value. Recommended values are between 0.00000001 and 0.0001. Using larger values for snapping can have undesired side-effects, but may sometimes be necessary to get a clean output (see example below). In general, it is recommended to start with a small snapping threshold, gradually increasing the threshold until the result is reasonably clean. Snapping modifies only boundaries in binput, which are snapped to boundaries in ainput. Boundaries in ainput are not modified.

The layer containing the sliver polygons is always ainputand should therefore not be altered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.