Union of shapefiles produces wrong results

Description

As mentioned here: https://github.com/MapWindow/MapWinGIS/issues/115

Unioning the two shapefiles results in 13 correct shapes en 2 wrong ones.

SoilTest:

UseTest:

Union result:

As you can see in the table editor the attributes of the last two shapes look weird.
And also the label of the second-last shape is out of the bounding box of rest and the last label is not shown.

Environment

None

Activity

Show:
Paul Meems
August 21, 2018, 8:36 PM

The Union() method is implemented as a Clip() followed by a Difference() of sf1 with sf2 and then a Difference() of sf2 with sf1.
The mentioned last two shapes come from the two Difference() method.
That's why they are added and only the fields of one shapefile is filled.


The yellow lines (small polygons) come from the difference between the soil and the use and the green lines come from the difference between the use and the soil.

To skip these small polygons you could change

https://www.mapwindow.org/documentation/mapwingis4.9/class_global_settings.html#a9ac2289cc40bf76950bbf81f6a1ba953

In this case setting globalSettings.MinAreaToPerimeterRatio to at least 0.021 skips the last two shapes.

Assignee

Paul Meems

Reporter

Paul Meems

Labels

None

Fix versions

Affects versions

Priority

Medium
Configure