[postgis-devel] [PostGIS] #1181: topology.TopologySummary is broken

Sandro Santilli strk at keybit.net
Fri Sep 9 05:09:12 PDT 2011


On Fri, Sep 9, 2011 at 1:50 PM, PostGIS <trac at osgeo.org> wrote:

>  SELECT tiger.topology_load_tiger('topo_boston', 'place', '2507000');
...
>  Topology topo_boston (6), SRID 2249, precision 1
>  19894 nodes, 30449 edges, 11109 faces, 0 topogeoms in 0 layers
...
>  ran ValidateTopology and got 484 errors.  I suspect my left right edge
>  logic is wrong because that was the only part not directly available in
>  tiger edges structure. Also was trying to avoid having to bring the whole
>  thing in so just set the left_ ... to - of the current edge where I
>  clipped the topology.
..
>  {{{
>  edge crosses edge;85695808;85695811
...
>  edge start node geometry mis-match;85695126;81043829
...
>  edge end node geometry mis-match;85695207;81043889
...
>  face without edges;0;
...
>  face within face;205874035;205862095
>  face overlaps face;205862471;227168671

Looks like you handled to exploit every possible invalidity :O
The "face without edges;0" makes me think you missed to use "0"
to represent the universal face (the outside world).

left_face and right_face are used by the validator.
next_left/right_edges are not even checked (and not that used either).

>  As far as speed -- it varied a lot on which box I was running it on (and
>  was way faster on my 9.1 install compared to 9.0) so will have to revisit
>  that.  Right now just focusing on correctness - making sure generated face
>  geometries match original face geometries of tiger and so forth.

The "edge crosses edge" error seems serious, I guess it may be due to rounding
issues. Try snapping the geoms on insertion.

--strk;

Free GIS & Flash consultant/developer
http://strk.keybit.net/services.html



More information about the postgis-devel mailing list