[postgis-users] Fwd: postgis topology strange behavior

Gonçalo Revez goncalorevez at gmail.com
Mon Feb 24 07:20:38 PST 2014


In fact, those geometry were already derived from a previous postgis
topological model. Only the the third polygon was edited.

I could try that, but shouldn't the tolerance meaning consider some kind of
the trim of the values?

Is there any function in postgis to do that automatically?

If i'm aware there isn't any set of precision model in postgis as exists in
JTS.

Thanks
Regards
Gonçalo




On Mon, Feb 24, 2014 at 12:13 PM, Rémi Cura <remi.cura at gmail.com> wrote:

> I cannot test your data, but maybe you should trim your digit number :
> -99095.34929557323630434 , could be
> 99095.35
>
> Cheers,
> Rémi-C
>
>
> 2014-02-24 13:08 GMT+01:00 Gonçalo Revez <goncalorevez at gmail.com>:
>
>> another image explaining the error attach
>>
>> ---------- Forwarded message ----------
>> From: Gonçalo Revez <goncalorevez at gmail.com>
>>  Date: Mon, Feb 24, 2014 at 12:05 PM
>> Subject: Fwd: postgis topology strange behavior
>> To: postgis-users at lists.osgeo.org
>>
>>
>> forgot to attach the files.
>>
>>
>> ---------- Forwarded message ----------
>> From: Gonçalo Revez <goncalorevez at gmail.com>
>> Date: Mon, Feb 24, 2014 at 12:01 PM
>> Subject: postgis topology strange behavior
>> To: postgis-users at lists.osgeo.org
>>
>>
>> Hello,
>>
>> I'm using the postgis topology with the following example below.
>>
>> It inserts three contiguous polygons, but the third has a strange
>> behavior.
>>
>> It seems that the polygon doesn't snap totally to the other polygon (with
>> model tolerance of 0.1), where he should split the edges and create a node.
>>
>> The problem raises two edges "overlapped". (I attach an image showing the
>> topology error).
>>
>> In fact, using the jts viewer, the third polygon overlaps the first
>> polygon, but below the topology model tolerance.
>>
>> How is it possible to solve this type of situation or what could be the
>> error in example?
>>
>>
>> Thanks
>> Gonçalo
>>
>> --x--
>>
>> --drop topology
>> select topology.DropTopology('test_topo');
>>
>> --create topology
>> SELECT CreateTopology('test_topo', 20791,0.1);
>>
>> --create topo geometries table
>> create table test_topo.area_topo(id serial primary key, bottom boolean);
>>
>> --create topo geometry column
>> select topology.AddTopoGeometryColumn('test_topo','test_topo',
>> 'area_topo', 'topo_geom', 'POLYGON');
>>
>> SET search_path TO topology, public, test_topo;
>>
>> --insert polygon 1
>> insert into test_topo.area_topo(id,topo_geom, bottom)
>> select
>> 1,topology.toTopoGeom(ST_GeomFromEWKT('SRID=20791;POLYGON((-99221.0688378750346601
>> -99577.07580991843133233,-99192.60793616733280942
>> -99686.85357364814262837,-99288.83288956005708314
>> -99727.51200465914735105,-99380.99199985167069826
>> -99768.17043567015207373,-99433.84796016597829293
>> -99700.4063839851442026,-99435.20324119967699517
>> -99571.6546857836219715,-99349.8205360765568912
>> -99570.29940474992326926,-99221.0688378750346601
>> -99577.07580991843133233))'), 'test_topo',1,0), true;
>>
>> --insert polygon 2
>> insert into test_topo.area_topo(id,topo_geom, bottom)
>> select
>> 2,topology.toTopoGeom(ST_GeomFromEWKT('SRID=20791;POLYGON((-99105.19230949365010019
>> -99703.11694605252705514,-99192.60793616733280942
>> -99686.85357364814262837,-99221.0688378750346601
>> -99577.07580991843133233,-99169.56815859441121574
>> -99535.06209787368425168,-99095.02770174089528155
>> -99582.49693405319703743,-99017.09904230313259177
>> -99629.25412971586047206,-99034.04005522439547349
>> -99715.99211587267927825,-99105.19230949365010019
>> -99703.11694605252705514))'), 'test_topo',1,0), true;
>>
>> --insert polygon 3
>> insert into test_topo.area_topo(id,topo_geom, bottom)
>> select
>> 3,topology.toTopoGeom(ST_GeomFromEWKT('SRID=20791;POLYGON((-99095.34929557323630434
>> -99874.08768260208307765,-99180.89702985195617657
>> -99864.18215547507861629,-99285.8180822192953201
>> -99726.23814240249339491,-99192.60793616733280942
>> -99686.85357364814262837,-99105.19230949365010019
>> -99703.11694605252705514,-99071.31028365115344059
>> -99810.86178823169029783,-99095.34929557323630434
>> -99874.08768260208307765))'), 'test_topo',1,0), true;
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140224/6029b31f/attachment.html>


More information about the postgis-users mailing list