[postgis-users] topology overlapping of edges

Sandro Santilli strk at keybit.net
Fri Sep 28 06:31:58 PDT 2012


On Fri, Sep 28, 2012 at 02:50:03PM +0200, Mario Jurcevic wrote:
> 
> On 09/27/2012 10:06 AM, Sandro Santilli wrote:
> >You can always skip all tests and insert the edges straight away, if
> >you know exactly what's expected as the structure. It will be faster.
> >You can then check with ST_ValidateTopology what's missing
> >(theoretically). That's what the TIGER loader does, for example, but
> >the input is already topological, no need to check.
> My input data are already topological ( only lines are given ) so
> inserting straight  to table edge_data will work without noding and
> checking for intersections
>  but what about next_left, next_right, etc pointers?

You'll need to set them up yourself, or you could rely on standard
ISO population methods ST_AddIsoNode for each of your nodes,
ST_AddEdgeModFace for each edge.

The code will still run many tests to ensure there's no edge-edge or
edge-node crossing, but noding would be skipped and those items
will be appropriately set.

I've been thinking for some time that we could expose some functions
that perform less check (delegating all checks to ST_ValidateTopology)
but so far the whole focus has been on correctness more than speed.

--strk;

 http://www.cartodb.com - Map, analyze and build applications with your data

                                       ~~ http://strk.keybit.net 




More information about the postgis-users mailing list