[postgis-devel] a slight error in postgis TopologySummary

Sandro Santilli strk at keybit.net
Thu Sep 26 08:09:15 PDT 2013


On Thu, Sep 26, 2013 at 05:00:28PM +0200, RĂ©mi Cura wrote:

> when using summary on a topology where there is an empty layer (meaning it
> has yet no topogeom inside), this layer is not counted in summary :
> As you can see on the output, I have 3 layers, yet summary count 2.
> 
> 
> Topology demo_zone_test (11), SRID 931008, precision 0.1, has Z
> 88 nodes, 105 edges, 49 faces, 76 topogeoms in  2 layers
> Layer 1, type Lineal (2), 48 topogeoms
>  Deploy: demo_zone_test.route_demo.tg
> Layer 4, type Polygonal (3), 28 topogeoms
>  Deploy: demo_zone_test.bati_demo.tg
> Layer 5, type Polygonal (3), 0 topogeoms
>  Deploy: demo_zone_test.chaussee.tg

Ah, now I get it. That's really by design. The text reads:

 "76 topogeoms in 2 layers"

Which means all of the 76 topogeoms are in 2 of the layers.

You may be looking for something like this instead:

 "76 topogeoms, 3 layers" 

As we give more info for each layer I agree the latter may
be more useful than the former...

> Anyway what you propose is equivalent ( If there is no more than 1 topology
> per schema, but I think this is the case by construction), so do as you
> please. I was trying to imitate your way of coding to blend in.
> 
> I'm stopping to work on topology for the moment anyway as it is very
> unstable in this version, so I'll install the new version before going on.

Make sure to also upgrade GEOS, which makes a difference.

--strk;



More information about the postgis-devel mailing list