[Qgis-user] Re: Clipping overlapping polygons with QGIS?

Alexandre Leroux alexandreleroux at gmail.com
Wed Sep 21 07:21:26 PDT 2011


Thanks Micha and Manfred - you solved my problem! The overlapping polygons were cleaned and became topological by importing them into GRASS GIS (directly from within QGIS) and exporting them back to shapefile. Great community support and thanks!

Alex - slashgeo.org


Le 2011-09-21 à 8:50, Manfred Berger a écrit :

> Michas proposal ist right. I am doing it the same way with GRASS. If you are not familiar with GRASS: http://www.youtube.com/watch?v=rb4iqRmcxHY  will show how it works. By the way: if you import a layer into GRASS, the data will be cleaned automaticly. Then you can export the clean dataset back into QGIS as e.g. shapefile. This workaround should help in many cases.  
> Manfred
> 
> Am 21.09.2011 10:34, schrieb Micha Silver:
>> 
>> I'm not sure what you and Alex are asking, exactly.  But if you import a vector layer into GRASS, cleaning is done and topology automatically created. The GRASS topological vector model does not allow overlapping polygons. So new boundaries are created everywhere that polygons overlap - what you called "cookie-cutting". If the process is successful (not always: sometimes impossible situations like self-intersecting boundaries cause it to fail), the new GRASS vector will be a kind of "merge" of all the polygons in the original. That is, every point covered by the vector will be in at most 1 polygon. And all intersecting boundaries will have a node at every intersection. Maybe that will help?
>> -- 
>> Micha
>>    
>> On 21/09/2011 09:11, Michael Werner Maur wrote:
>>> 
>>> Hi Alex,
>>> 
>>> I have the same problem ! I can't find a way to detect selfintersections with 
>>> QGis. There is a vector analysis tool, but it don't find and show the invalid 
>>> geometry. Up to date I use the easy OpenJump   to find this situations in 
>>> vector data ! ...Is there anybody, who knows how it works with QGis ?
>>> 
>>> Thanks
>>> 
>>> michael.
>>> 
>>> 
>>> Am Dienstag 20 September 2011 22:43:50 schrieb Alexandre Leroux:
>>>> Hi list -
>>>> 
>>>> I quick update. What I've been trying to do may possibly be done by the
>>>>  Intersection function of my layer with itself. I tried applying the
>>>>  intersection geoprocessing function via both QGIS and gvSIG and both
>>>>  failed to generate a full cookie cutting of all the polygons in my layer
>>>>  by themselves. The larger polygons are simply not cut by the smaller ones
>>>>  (the "empty space" polygon in my example below is never created).
>>>> 
>>>> If I look at gvSIG's documentation (QGIS's pdf documentation is not as
>>>>  detailed):
>>>>  http://www.gvsig.org/web/projects/gvsig-desktop/docs/user/gvsig-desktop-1-
>>>> 11-manual-de-usuario/gvsig-desktop-1-11-manual-de-usuario-en/gvsig_freemind
>>>> _toc_view?doc=gvSIG%201.11%20User%20manual/Analysis%20and%20data%20processi
>>>> ng/Vector/Geoprocessing%20tools/Intersection/Introduction it seems like
>>>>  it's exactly what I want to do. But running the command just doesn't
>>>>  create the expected result (as I said, the larger polygons are not cut by
>>>>  the smaller ones). I'm wondering if the problem is not with my shapefile
>>>>  (but I don't see why that would be the case).
>>>> 
>>>> If anyone has a clue, that would be great -
>>>> 
>>>> Thanks -
>>>> Alex
>>>> 
>>>> Le 2011-09-18 à 3:05, Alexandre Leroux a écrit :
>>>>> Hi list,
>>>>> 
>>>>> I tried to find an answer through The Google, QGIS's wiki, QGIS's plugins
>>>>> and elsewhere, but failed, so here I am.
>>>>> 
>>>>> I have a single layer with multiple polygons. Some polygons includes
>>>>> smaller polygons, thus the larger polygons overlap with some smaller
>>>>> polygons which do not entirely fill the larger polygons. What I need is a
>>>>> layer consisting of the cookie cutting of all polygons by all the
>>>>> polygons of that layer.
>>>>> 
>>>>> Consider this example, a single layer includes a Polygon A, a Polygon B1
>>>>> and a Polygon B2. "Polygon A" consists of "Polygon B1" + "Polygon B2" +
>>>>> "empty space". I want to clip Polygon A and get the resulting "Polygon
>>>>> B1", "Polygon B2" and "Polygon C", where "Polygon C" is equal to "Polygon
>>>>> A" minus ("Polygon B1" plus "Polygon B2"). In other words, the result
>>>>> that I need are the original polygons cookie cutted by all the lines
>>>>> present in the shapefile.
>>>>> 
>>>>> (my real dataset has thousands of polygons, doing this manually is out of
>>>>> question :-)
>>>>> 
>>>>> * The "Vector -> Geoprocessing Tools -> Clip" feature does not create
>>>>> that "Polygon C" that I need. * I can't seem to be able to use the
>>>>> "Difference" feature either since all my polygons are on a single layer.
>>>>> * I tried the Clip feature with lines (i.e. polygon outlines), but the
>>>>> result is empty.
>>>>> 
>>>>> Anyone has a clue how to do that? Am I just dumb? :-)
>>>>> 
>>>>> 
>>>>> Thanks a lot!
>>>>> 
>>>>> Alex - slashgeo.org
>>>> _______________________________________________
>>>> Qgis-user mailing list
>>>> Qgis-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>> 
>> 
>> 
>> 
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> -- 
> Manfred Berger
> Dipl.-Geogr.
> Responsable GIS - Cartographie
> 
> VBD Lëtzebuerg SA
> 1, rue Wakelter L-9160 Ingeldorf
> Tel: +352 26 80 33 22   Fax: +352 26 80 33 13
> m.berger at vbd.lu   www.vbd.lu
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110921/afa0fd2b/attachment.html>


More information about the Qgis-user mailing list