[postgis-users] topology example
Denis Rouzaud
denis.rouzaud at gmail.com
Fri Feb 24 04:52:44 PST 2012
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
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?
Or should I check them first?
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)
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....
On 02/24/2012 12:35 PM, Sandro Santilli wrote:
> On Fri, Feb 24, 2012 at 12:03:10PM +0100, Denis Rouzaud wrote:
>> Okay,
>>
>> So I am looping over my 25000 pipes and soon as there is a topology
>> error, the
>> UPDATE distribution.pipes SET topogeom = toTopoGeom(wkb_geometry,
>> ''distrib_topo'', layer) WHERE id = pi.id;
>> throws an error:
>> ERROR: SQL/MM Spatial exception - point not on edge
> Excellent. So a _single_ geometry is enough to reproduce the error.
> Save both the new geometry (WHERE id = pi.id) and the topology
> status (dump the schema).
>
> If you can, attach the dump and the new input into a ticket.
>
> May be worth checking the topology built so far for correctness
> with ValidateTopology. Any invalidity would be a bug in PostGIS.
> But not all invalidities are cought by ValidateTopology so there
> may be a need to do more eyebased checking (linking isn't checked).
>
> Usually the invalidity, if any, is within the bounding box
> of the geometry that fails being installed.
>
>> I would like to list all the errors by raising the ids, what is the
>> exception to catch?
> A loop _outside_ the database wouldn't need to catch.
> If you're looping inside, with pl/pgsql, catch OTHERS.
>
> --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/61e96f68/attachment.html>
More information about the postgis-users
mailing list