[postgis-users] topology example

Denis Rouzaud denis.rouzaud at gmail.com
Fri Feb 24 06:20:11 PST 2012


Ok, I added ORDER BY
https://github.com/3nids/qWat/blob/3c0c6728b940dd4ab2921dee104cd054a711d60f/sql/topology.sql

You effectively read correctly that the loop is ended as soon as an 
exception is raised, since I still didn't manage to do it properly.

I filled ticket 1611, http://trac.osgeo.org/postgis/ticket/1612 Sorry, 
for the lack of info in, but I don't really understand the matter.

Also, I noticed something strange. Nothing is filled into the topogeom 
column. When ordered, first error is raised at id 102, but the first 100 
lines have empty topogeom. In the function, if an error is raised 
nothing is committed?

I wrote a small SQL with two geometries where I have the error.
https://github.com/3nids/qWat/blob/38cde48d509d9b9a179eea1fd4db5bbd67121dcf/sql/strk.demo.sql
I putted a some " !!! " in front of drop schema to prevent any harm to 
some of your schemas....just in case!

Greetings,

Denis

On 02/24/2012 02:08 PM, Sandro Santilli wrote:
> On Fri, Feb 24, 2012 at 01:52:44PM +0100, Denis Rouzaud wrote:
>> To be sure, we understand each others, here is the few lines of SQL
>> I am using:
>> https://github.com/3nids/qWat/blob/7bc65b5a43ffb9ae5947ede683ff1f2274807972/sql/topology.sql
> It seems good to me. Do I read it correctly that it exits
> the loop on first error ?
> May I suggest you ORDER BY id in the loop ?
> Or the order would not be predictable.
>
>> I know I have errors in topology in my pipes. So, is this correct
>> than I can use toTopoGeom for geometries that have incorrect
>> topology?
> Well, they should be fine for the population of primitives,
> may give problems in the mapping between original features
> and topology primitives. In any case the exception you got
> doesn't reveal such problem.
>
>> Here is the result of validate topology when a part of my pipes is
>> in the topology column:
>> SELECT topology.ValidateTopology('distrib_topo');
>>       validatetopology
>> ---------------------------
>>   ("face without edges",0,)
>> (1 row)
> Uhm, that's a false positive, I tought I fixed it.
> Evidently I didn't. Want to file a ticket about it ?
>
>> I can dump the db, this will be a few megas, but I would like to be
>> sure I am not doing anything stupid, first....
> It would help me as well if you reduce it.
> The important thing is that insertion of your offending geometry
> keeps hitting the exception.
> You could for example try dropping edges and then nodes
> which do not intersect the offending geometry's bounding box.
> And see if the problem still occurs.
>
> Best to backup the whole set first.
>
> --strk;
>
>    ,------o-.
>    |   __/  |    Delivering high quality PostGIS 2.0 !
>    |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>    `-o------'
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120224/a762d482/attachment.html>


More information about the postgis-users mailing list