[postgis-users] Need a method for "noding" a street network

Sandro Santilli strk at keybit.net
Fri May 10 01:34:32 PDT 2013


On Thu, May 09, 2013 at 02:53:29PM -0400, Stephen Woodbridge wrote:
> On 5/9/2013 1:27 PM, Nicolas Ribot wrote:
> >Steve,
> >
> >I modified your script to include the final step gathering all needed
> >input lines in the results table.
> >I also corrected the linestring ends insertion queries:
> >
> >...quote_ident(n_geom) || ') <> ''LINESTRING'' '; to become:
> >...quote_ident(n_geom) || ') = ''LINESTRING'' ';
> >
> >which inserted null values for geom column as st_startpoint(geom) is
> >null for any geometry <> LINESTRING.
> 
> Duh, my bad on that and you even mentioned it. I'm pleading a nasty
> sinus cold which has scramble my brains.
> 
> I would like to include this in pgRouting, if that is OK with you. I
> would also like to credit you for your effort to develop this tool,
> so if you would like to add a comment and copyright that would be
> great.
> 
> >It seems to work well on bdaways dataset and costa rica highways.
> >
> >I will add some snapping operations as suggested by Sandro and try to
> >see if all segments are noded.
> >(Topology still creating after 4270 ms)
> 
> The snapping would be nice. I'm wondering if Sandro could possible
> use a variant of this to speed up the topology creation?

Possibly. But topology building also has to setup explicit edge linking
(which edge comes next by walking on each side of the edge) and handle
face creation.

I've actually a big refactor in mind for topology building, in that the
current model of snapping new-comers to pre-existing primitives has a
conceptual bug (there's no way for existing edges to be immutable).

But anyway ST_CreateTopoGeo would have all input at once so shouldn't
suffer from that bug. It'd be great if Nicolas wanted to take a look :)
IIRC that function wasn't optimized as I tought it wasn't as useful as
the ones building the topology incrementally... I'm pretty sure there's
performance to squeeze out of it.

--strk;


More information about the postgis-users mailing list