[postgis-users] Postgis 2.0 TopoGeo_AddPolygon

Sandro Santilli strk at keybit.net
Sun Sep 2 23:41:07 PDT 2012


On Mon, Sep 03, 2012 at 08:22:25AM +0200, Christophe Vergon wrote:
> Hi,
> 
> "
> 
> Glad to hear that:
> bug reports are usually the main subject "
> 
> Not a bug but the function behavior.
> 
> I've got to polygons
> 
> One with a hole, the second is the hole of the first.
> 
> The second is passed to the function at first. A face is created.
> 
> The first is passed to the function : no face created !
> Indeed this polygon had two rings, and the first ring was the hole ...
> I don't know if the OGC standards impose the first ring to be the envelope ... (my friend how write the wkb serializer deserializer for .Net is not here yet)

No, the TopoGeo_addPolygon would not care about that.

> I think that the topogeo_addpolygon, try to make a face with the first ring, if it fails than exit function without trying with the next ring  ...
> I'm wrong ?

If it fails with throwing an exception then you're right, it
won't go on. In this case, though, the expected behavior is that
it would _not_ create a _new_ face when adding the first ring
of the second polygon but rather return the ID of the already
created face (which should be equal to the first ring of the
second polygon). Maybe they are not exactly equal, or snapping
made them diverge (did you specify an high tolerance?).

--strk; 

 http://www.cartodb.com - Map, analyze and build applications with your data

                                       ~~ http://strk.keybit.net 




More information about the postgis-users mailing list