<div dir="ltr">On 10 May 2013 10:34, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Thu, May 09, 2013 at 02:53:29PM -0400, Stephen Woodbridge wrote:<br>
> On 5/9/2013 1:27 PM, Nicolas Ribot wrote:<br>
> >Steve,<br>
> ><br>
> >I modified your script to include the final step gathering all needed<br>
> >input lines in the results table.<br>
> >I also corrected the linestring ends insertion queries:<br>
> ><br>
> >...quote_ident(n_geom) || ') <> ''LINESTRING'' '; to become:<br>
> >...quote_ident(n_geom) || ') = ''LINESTRING'' ';<br>
> ><br>
> >which inserted null values for geom column as st_startpoint(geom) is<br>
> >null for any geometry <> LINESTRING.<br>
><br>
> Duh, my bad on that and you even mentioned it. I'm pleading a nasty<br>
> sinus cold which has scramble my brains.<br>
><br>
> I would like to include this in pgRouting, if that is OK with you. I<br>
> would also like to credit you for your effort to develop this tool,<br>
> so if you would like to add a comment and copyright that would be<br>
> great.<br>
><br>
> >It seems to work well on bdaways dataset and costa rica highways.<br>
> ><br>
> >I will add some snapping operations as suggested by Sandro and try to<br>
> >see if all segments are noded.<br>
> >(Topology still creating after 4270 ms)<br>
><br>
> The snapping would be nice. I'm wondering if Sandro could possible<br>
> use a variant of this to speed up the topology creation?<br>
<br>
</div>Possibly. But topology building also has to setup explicit edge linking<br>
(which edge comes next by walking on each side of the edge) and handle<br>
face creation.<br>
<br>
I've actually a big refactor in mind for topology building, in that the<br>
current model of snapping new-comers to pre-existing primitives has a<br>
conceptual bug (there's no way for existing edges to be immutable).<br>
<br>
But anyway ST_CreateTopoGeo would have all input at once so shouldn't<br>
suffer from that bug. It'd be great if Nicolas wanted to take a look :)<br>
IIRC that function wasn't optimized as I tought it wasn't as useful as<br>
the ones building the topology incrementally... I'm pretty sure there's<br>
performance to squeeze out of it.<br></blockquote><div><br></div><div style>I Sandro,</div><div style><br></div><div style>I canceled the topology creation on costa rica dataset after 1 hour of run.</div><div style>I will try with Steve dataset, which is smaller.</div>

<div style><br></div><div style>Nicolas </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--strk;<br>
</blockquote></div><br></div></div>