[postgis-users] How to match lines between two similar graphs?

Nicolas Ribot nicolas.ribot at gmail.com
Thu Jan 26 12:51:42 PST 2012


Hi Charles,

Yes indeed, finding the right segment to preserve direction and
driving characteristics is not easy at all. Fortunately in my case,
only statistical data on the routes were important, so some direction
errors were not that bad.

As far as I understand, shouldn't the self join in the query be
"table1 t1, table1 t2", in your example ?

Nicolas

On 26 January 2012 21:01, Charles Galpin <cgalpin at lhsw.com> wrote:
> Stephen, do you mind sharing what the source of the traffic disruption feed
> is? Mainly curious if it's one of the ones we use (email direct if needed).
>  I had tried to do something similar a while ago but honestly did not make
> good progress (this was before I found st_HausdorffDistance and need to give
> that a try too).  But I found that problems with both the input data being
> inaccurate and the Navteq data not always being complete caused all kinds of
> problems getting the matches accurate.  If the input data isn't accurate or
> you don't have proper direction info it's very easy to pick the wrong lane
> or side of the street. Express lanes, upper/lower levels, and complex
> geometries at intersections all contributed to making the matching hard.
>
> Nicolas,  I had to do something similar with a navteq version update. In my
> case we'd stored the link ids from the old data set for various reasons and
> needed to figure out what the new link ids were for ones that had changed.
> As you know Navteq "retires" the ids for any change, including geometry
>  changes.  I found a combination of  st_HausdorffDistance and things like
> making sure the direction matched got me a large portion of them matched in
> an automated fashion, and did the remainder semi-manually.
>
> Matej, when you asked before I didn't understand everything you were trying
> to do, but to answer your question about the data being in the same table,
> you just need to do a self join to compare each row to all the others.
>
> select <whatever that operation was>(t1.the_geom, t2.the_geom) from
> table1 t1, table2 t2
> where t1.id != t2.id
> and <some operation to determine if they are close>
> etc.
>
> charles
>
> On Jan 26, 2012, at 1:56 PM, Stephen Woodbridge wrote:
>
> Nicolas,
>
> I am still waiting on the actual data. The input is a traffic disruption
> feed with ids to one dataset and I need to map the identified segments to
> the equivalent segments in a Navteq data set. I suspect that I will have a
> combination of connected segments that form a sub-network and not a single
> path. But some of the sample feed data I do have references a single
> segment, like the location of an accident. In other cases, like a major
> construction project that affects multiple segments on multiple streets it
> will be a sub-net.
>
> -Steve
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list