[postgis-users] The "bow tie" error

Stephen Woodbridge woodbri at swoodbridge.com
Fri Mar 22 11:15:26 PDT 2013


On 3/22/2013 1:53 PM, Hugues François wrote:
> Hello,
>
> Thanks for your answer Stephen. Of course dumping the multipolygons
> works well with qgis. But for our users we need to keep the unique id
> attached to each object, simple or multipolygon. They might need to
> export data to their gis software for their work and all our database
> is built based on this uniqueness constraint .

Well it is an attempt to work around a problem that is not related to 
postgis. Another alternative might be to require your users to explode 
multipolygons before getting to this point so the new records all have a 
unique id.

> In fact, I really don't understand why qgis see these as an error.
> they seem topologically correct to me, especially since unioning the
> dumped part in qgis create the same error ! Definitely, it sounds
> like the error comes from qgis and the error seems impossible to
> solve.

Right, if the bug is in qgis, then you can not expect postgis to fix it. 
Sounds like you need to raise this as a bug on the qgis list and ask 
them when you can expect a fix. For simplicity in conveying the problem 
leave postgis out of it, as you can reproduce the problem without 
postgis being involved.

-Steve W

> Hugues.
>
> -----Message d'origine----- De :
> postgis-users-bounces at lists.osgeo.org
> [mailto:postgis-users-bounces at lists.osgeo.org] De la part de Stephen
> Woodbridge Envoyé : jeudi 21 mars 2013 22:11 À :
> postgis-users at lists.osgeo.org Objet : Re: [postgis-users] The "bow
> tie" error
>
> On 3/21/2013 5:06 PM, Stephen Woodbridge wrote:
>> Francois,
>>
>> Can you dump the polygons in the multiplyogon and create separate
>> records for them. So in you example graphic, you would end up with
>> two separate polygons the touch at a point. I think this would be
>> OK for qgis.
>
> This might be helpful:
>
> http://www.bostongis.com/postgis_dump.snippet
> http://postgis.17.n6.nabble.com/converting-multipolygon-to-polygon-td3530291.html
>
>
>> -Steve W
>>
>> On 3/21/2013 4:57 PM, Francois Hugues wrote:
>>> Hello,
>>>
>>> I have to deal with a dataset with a lot of errors. I ran a
>>> st_makevalid which seems to give me good results (all polygons
>>> then appear to be valid, closed and simple). But, when I open
>>> this table as a layer in qgis it still throws me a lot of errors.
>>> The image attached to this message provide you with an example
>>> and the error said : Le segment 0 de l'anneau 16 du polygone 6
>>> est intersecté au segment 0 de l'anneau 1 du polygone 7 à
>>> 933828.8196, 6261164.472 (in english this may be something like :
>>> line 0 of ring 16 is intersected by line 0 of ring 1 of polygon 7
>>> at point...).
>>>
>>> As the rings of the multipolygon share one point, I tried to dump
>>> it and then to union the rings to build a single polygon but I
>>> got a multipolygon back and still an error.
>>>
>>> The dataset have a lot of "bow ties" and it seems that
>>> st_makevalid change them to multipolygon but that do not correct
>>> all errors in qgis.
>>>
>>> Does anyone have an idea to find any solution ?
>>>
>>> Hugues
>>>
>>> --
>>>
>>>
>>>
>>> Hugues FRANÇOIS
>>>
>>> hugues.francois at irstea.fr
>>>
>>>
>>>
>>> _______________________________________________ postgis-users
>>> mailing list postgis-users at lists.osgeo.org
>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>>>
>>
>> _______________________________________________ postgis-users
>> mailing list postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
> _______________________________________________ postgis-users mailing
> list postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________ postgis-users mailing
> list postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list