Opened 14 years ago

Last modified 13 years ago

#2497 new bug

ftools: difference tool (asymmetrical difference) does not work with multipolygon geometries

Reported by: lutra Owned by: cfarmer
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: fTools Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

When trying to make a "difference" operation between polygon layers and both are multipolygon then the following warning is issued

Warnings:
GEOS geoprocessing error: One or more input features have invalid geometry.
Some output geometries may be missing or invalid.

and the resulting geometry is wrong (empty).

The same happens if the diffence layer is multipart and the input layer singlepart, while otherwise -or with both input/difference layers as singlepart- acceptable results are given and no GEOS error messages are thrown.

In general I would suggest to add a control and don't allow to use multipart geometries in this operation in order to avoid problems.

Change History (9)

comment:1 by cfarmer, 14 years ago

Difference between multipolygon (and multiline) features works ok for me here, could you please attach a test dataset to replicate this error?

-Carson

comment:2 by lutra, 14 years ago

Hi Carson, thanks for looking into this.

Yes I can attach the problematic data but not right now: the input vectors were obtained along a geoprocessing exercise and I need to create them again. I'll do it tomorrow.

thanks in advance

in reply to:  1 comment:3 by lutra, 14 years ago

Replying to cfarmer:

Difference between multipolygon (and multiline) features works ok for me here, could you please attach a test dataset to replicate this error?

-Carson

Hi Carson,

here I am again.

So you can test the following shapes:

http://mapserver.uevora.pt/~mapserver/viaria_evora_buffer_shp.zip

http://mapserver.uevora.pt/~mapserver/interdita2_shp.zip

Use the first as input layer and the second as difference layer.

The first one was obtained by buffering a line vector. The second one was obtained by unioning 3 shapes obtained by buffering (2) a line vector and a point vector plus a polygon vector. This line, point and polygon were obtained initially by clipping bigger vectors.

Only ftools was used for this exercise.

comment:4 by lutra, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:5 by jef, 14 years ago

Summary: ftools: difference tool (asymmetrical difference) does not work with moltipolygon geometriesftools: difference tool (asymmetrical difference) does not work with multipolygon geometries

comment:6 by borysiasty, 13 years ago

Component: Python plugins and bindingsfTools

comment:7 by alexbruy, 13 years ago

Samples are not available anymore

comment:8 by lutra, 13 years ago

I'll give new links asap, not before testing again the problem.

comment:9 by anitagraser, 13 years ago

Must Fix for Release: YesNo
Note: See TracTickets for help on using tickets.