[postgis-devel] topology expectations?

Jose Carlos Martinez jomarlla at cgf.upv.es
Mon Mar 26 06:19:36 PDT 2012


On 26/03/2012 14:23, Sandro Santilli wrote:
> On Mon, Mar 26, 2012 at 12:12:23PM +0200, Jose Carlos Martinez wrote:
>
>> 4.- I did many many tests with different variations to the JTS
>> algorithm even designing new algorithms (checking validity and
>> according to that moving the selected vertex or segments).  The
>> tests told me that these algorithm had a better behaviour but they
>> still couldnt work in 100% of the cases (*)
> For the use I make of ST_Snap it'd be acceptable to introduce
> geometries with collapsed portions, as I know about them and I
> do clean them afterwards. What is unacceptable is for A snapping
> to self introducing changes. I think always snapping to the closest
> vertex would do fine, assuming the input is valid.
>
> Did you try doing that ?
yes Sandro I already tried that, snapping to the closest vertex can make 
invalid geometries too. You can use makevalid afterwards but the cleaned 
geometry can lose his original spatial relation ship. Anyways you can 
check when you move a vertex or segment the validity conditions and then 
dont move or split the vertex/segment and chose another one (I just 
studied that situation a little bit).

ArcGIS snaps geometries to themselves, one of the conclusion I got is 
that could be a good idea. Anyways your approach can be different 
because you want to use snap for persistent topology what is not exactly 
my case (i wanted to find best solution for a simple feature model among 
geometries stored in different layers).

Maybe one can think the cases that can make invalid geometries can be a 
few but when you are working with real cartography one can notice its a 
really normal situation and segments which are shorter that tolerance 
are common too.

Time ago I tried to involve Martin DAvis about this problem, for sure he 
knows the problem much better than me, at that time Martin was kind of 
busy with other JTS improvements though but maybe he could help you. Not 
sure if he already improves snap functionality.

Hope I can help you even just a little bit.


>
> --strk;
>
>    ,------o-.
>    |   __/  |    Delivering high quality PostGIS 2.0 !
>    |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>    `-o------'
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list