[pgrouting-users] PgRouting-Problems with own OSM-data

Kai Behncke Kai-Behncke at gmx.de
Mon Apr 20 03:49:19 EDT 2009


Hi Anton,


I will put it in the Wiki in a couple of hours.
Indeed it`s a really interesting topic because meanwhile I found out that there a less failures if I take OSM-XML and use osm2pgrouting (the data with the many, many failures were taken from out of a shape via shp2pgsql)  , I will do some more tests and set it in the wiki in the afternoon.

Best regards, Kai
-------- Original-Nachricht --------
> Datum: Mon, 20 Apr 2009 10:50:47 +0900
> Von: Anton Patrushev <anton at orkney.co.jp>
> An: pgrouting-users at lists.postlbs.org
> Betreff: Re: [pgrouting-users] PgRouting-Problems with own OSM-data

> Kai, Steve,
> 
> It sounds like a very good example of data validation and for sure
> will be interesting for other users.
> Can someone of you please put it to pgRouting wiki?
> 
> Anton.
> 
> On Sat, Apr 18, 2009 at 8:25 PM, Kai Behncke <Kai-Behncke at gmx.de> wrote:
> > Dear users,
> >
> > maybe the following screenshot helps fo find out what is wrong with my
> geodata:
> >
> >
> > http://www.selbstverwaltung-bundesweit.de/weird_numbers.png
> >
> >
> >
> > The three numbers (blcak on grey backround) show the gid of the
> geometry,the source-id and the target-id.
> >
> > The blue figure shows the id of the vertices (no dead end) and the red
> number is the number of the dead-end-vertices.
> >
> > As you cann see some are correct and some are not.
> > This should happen at SELECT assign_vertex_id('my_table', 0.001,
> 'the_geom', 'gid');
> >
> >
> > ....but why? I cant`t see the system of that failure?
> >
> > Best regards, Kai
> > -------- Original-Nachricht --------
> >> Datum: Sat, 18 Apr 2009 00:57:30 +0200
> >> Von: "Kai Behncke" <Kai-Behncke at gmx.de>
> >> An: Stephen Woodbridge <woodbri at swoodbridge.com>,
> pgrouting-users at lists.postlbs.org
> >> Betreff: Re: [pgrouting-users] PgRouting-Problems with own OSM-data
> >
> >> Hi Stephen, Hi mailinglist,
> >>
> >> thank you very much for that hint. With that way I was able to find out
> >> that there are far too many "dead ends" in my data, so I think this is
> the
> >> proof that it`s really a data problem?
> >>
> >> http://www.selbstverwaltung-bundesweit.de/too_many_dead_ends.png
> >>
> >> I made this test also with the victoria-data, there everything is
> correct.
> >>
> >> To get a step further I work now with a very small dataset (just 35
> >> geometries) (as you can see in the screenshot above) but without
> success
> >> so far.
> >>
> >> >If you have a lot of red dots between segments
> >> >that should be joined, you probably need to rebuild your vertices tmp
> >> >table with a larger tolerance.
> >>
> >> I did that, I changed 0.001 in
> >>
> >> SELECT assign_vertex_id('auswahl_os', 0.001, 'the_geom', 'gid');
> >>
> >> with the values 0.005, 0.01, 0.05, 0.5, 5, 50 and so on
> >>
> >> The values <50 still show very many "dead ends". If I have higher
> values
> >> then
> >> the amount of vertices in general decreases, so a routing is also not
> >> possible anymore, you can see it here:
> >>
> >>
> >> http://www.selbstverwaltung-bundesweit.de/not_enough_vertices.png
> >>
> >>
> >> Maybe the following is a hint:
> >>
> >> If I use
> >> SELECT assign_vertex_id('auswahl_os', 0.001, 'the_geom', 'gid');
> >>
> >> with my data I get 54 entries in the vertices_tmp-table.
> >> (an extract of the victorie-data (50 geometries) just gives 42 entries
> in
> >> vertices_tmp).
> >>
> >> What could be the reason that I get so many entries mith my data?
> >>
> >> What exactly stands the value 0.001 for?
> >>
> >> I really don`t understand what could be wrong with my geodata :-(
> >>
> >> Might it be possible that someone would have a look to these 54
> geometries
> >> (4 eyes see more than two) ??
> >>
> >> Puh....if I get it I will really write a huge tutorial in the
> >> pgrouting-wiki.
> >>
> >> Best regards, Kai
> >>
> >>
> >>
> >> -------- Original-Nachricht --------
> >> > Datum: Wed, 15 Apr 2009 13:24:21 -0500
> >> > Von: Stephen Woodbridge <woodbri at swoodbridge.com>
> >> > An: Kai Behncke <Kai-Behncke at gmx.de>
> >> > CC: pgrouting-users at lists.postlbs.org
> >> > Betreff: Re: [pgrouting-users] PgRouting-Problems with own OSM-data
> >>
> >> > Kai,
> >> >
> >> > First off you probably need to build some diagnostic tools to help
> you
> >> > understand the problem better, especially to help you determine if it
> is
> >> > a data problem. I find two tools that are easy to build and help a
> lot.
> >> > You can see them in action here:
> >> > http://imaptools.com/leaddog/routing/dd.html
> >> > Zoom into a city, open the layerswitcher and select "Just the
> Streets"
> >> > and "Dead Ends"
> >> >
> >> > 1) create a mapfile that displays the street segments from the
> routing
> >> > database and add this as an optional base layer. You might want to
> add
> >> > color oneway streets a different color, but in general keep the
> display
> >> > simple and probably single pixel lines. You might label the segments
> >> > with their UID so you can go back to the database and query them in
> >> > detail.
> >> >
> >> > 2) add a column cnt integer to the vertices_tmp table and update it
> with
> >> > the count of segments that reference that node. Maybe something like
> >> this:
> >> >
> >> > alter table vertices_tmp add column cnt integer;
> >> > update vertices_tmp set cnt=0;
> >> > update vertices_tmp set cnt=cnt+1 where streets.source=id;
> >> > update vertices_tmp set cnt=cnt+1 where streets.target=id;
> >> >
> >> > Now create a mapfile layer for points and display the vertices_tmp
> >> >
> >> > LAYER
> >> >    NAME "deadends"
> >> >    TYPE POINT
> >> >    CONNECTIONTYPE "postgis"
> >> >    CONNECTION ...
> >> >    DATA ...
> >> >    CLASSEXPRESSION "cnt"
> >> >    CLASS
> >> >      EXPRESSION "cnt=1"
> >> >      STYLE
> >> >        SYMBOL "circle"
> >> >        SIZE 5
> >> >        COLOR 255 0 0
> >> >      END
> >> >    END
> >> >    CLASS
> >> >      EXPRESSION "cnt>2"
> >> >      STYLE
> >> >        SYMBOL "circle"
> >> >        SIZE 3
> >> >        COLOR 0 255 0
> >> >      END
> >> >    END
> >> > END
> >> >
> >> > This will display red dots at dead ends and green dots as good
> >> > connections be segments. If you have a lot of red dots between
> segments
> >> > that should be joined, you probably need to rebuild your vertices tmp
> >> > table with a larger tolerance.
> >> >
> >> > It is very hard to debug a large black box like a router without
> having
> >> > some tools that can give you some better insight as to what is going
> on.
> >> >
> >> > -Steve
> >> >
> >>
> >> --
> >> Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate +
> >> Telefonanschluss für nur 17,95 Euro/mtl.!*
> >> http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a
> >> _______________________________________________
> >> Pgrouting-users mailing list
> >> Pgrouting-users at lists.postlbs.org
> >> http://lists.postlbs.org/mailman/listinfo/pgrouting-users
> >
> > --
> > Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
> allen: http://www.gmx.net/de/go/multimessenger01
> > _______________________________________________
> > Pgrouting-users mailing list
> > Pgrouting-users at lists.postlbs.org
> > http://lists.postlbs.org/mailman/listinfo/pgrouting-users
> >
> 
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.postlbs.org
> http://lists.postlbs.org/mailman/listinfo/pgrouting-users

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01



More information about the Pgrouting-users mailing list