gs_routeserver please return more way points

84 views
Skip to first unread message

cathal coffey

unread,
Oct 18, 2010, 11:48:27 AM10/18/10
to Graphserver
Hi,

I have taken the data returned by the gs_routserver example and
plotted it using OpenLayers. As you can see from the following image
http://dl.dropbox.com/u/11502389/redding.png the points returned by
gs_server are only the turn events. Is it possible to get
gs_routeserver to return all intermediate points along a path? This
way when I plot them the paths will look better.

Kind regards,
Cathal

P.S. Is there any documentation for gs_routeserver? It would be great
to have a better description of what each function does. As an example
I expected the function get_vertex_id() to take a lon and a lat and
return the closest vertex in the graph. It appears that this function
will only return a vertex if it is exactly at the co-ordinates (lon,
lat).

Brandon Martin-Anderson

unread,
Oct 18, 2010, 12:43:35 PM10/18/10
to graph...@googlegroups.com
There is an event class "GeomAtStreetEndEvent", a narrative
postprocessing directive which will emit an event containing the
street geometry at the terminating event. If you set it up in
handlers.py under the Vertex Handlers section:

- name: graphserver.ext.routeserver.events.GeomAtStreetEndEvent
args:
timezone_name: America/Los_Angeles

that should give you some street geometries.

-B

> --
> You received this message because you are subscribed to the Google Groups "Graphserver" group.
> To post to this group, send email to graph...@googlegroups.com.
> To unsubscribe from this group, send email to graphserver...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/graphserver?hl=en.
>
>

cathal coffey

unread,
Oct 19, 2010, 11:40:34 AM10/19/10
to Graphserver
Brandon,

that was exactly what I was looking for however I think I have found a
bug.
When I plot the points returned by gs_routserver I get a path that
contains a cycle.

Can you please take a look at this screenshot http://dl.dropbox.com/u/11502389/redding2.png
Here is the trimmed output that generates this path
http://dl.dropbox.com/u/11502389/path.json

Kind regards,
Cathal

cathal coffey

unread,
Oct 20, 2010, 7:17:58 AM10/20/10
to Graphserver
Guys,

here is the point list that is causing the cycle to be drawn.

"GeomAtStreetEndEvent", 
      {
        "when": null, 
        "what": "walk a bunch", 
        "geom": [
          [
            -122.44142150878906, 
            40.568099975585938
          ], 
          [
            -122.44140625, 
            40.568161010742188
          ], 
          [
            -122.44139099121094, 
            40.568218231201172
          ], 
          [
            -122.44136810302734, 
            40.56829833984375
          ], 
          [
            -122.44134521484375, 
            40.568363189697266
          ], 
          [
            -122.44119262695312, 
            40.568706512451172
          ], 
          [
            -122.441162109375, 
            40.568801879882812
          ], 
          [
            -122.44113922119141, 
            40.568881988525391
          ], 
          [
            -122.44111633300781, 
            40.569000244140625
          ], 
          [
            -122.44113159179688, 
            40.569477081298828
          ], 
          [
            -122.44111633300781, 
            40.569507598876953
          ], 
          [
            -122.44107818603516, 
            40.569538116455078
          ], 
          [
            -122.44103240966797, 
            40.569561004638672
          ], 
          [
            -122.44098663330078, 
            40.569568634033203
          ], 
          [
            -122.440673828125, 
            40.569534301757812
          ], 
          [
            -122.44056701660156, 
            40.569530487060547
          ], 
          [
            -122.44050598144531, 
            40.569534301757812
          ], 
          [
            -122.44046783447266, 
            40.569541931152344
          ], 
          [
            -122.44040679931641, 
            40.569561004638672
          ], 
          [
            -122.44033050537109, 
            40.569602966308594
          ], 
          [
            -122.44028472900391, 
            40.56964111328125
          ], 
          [
            -122.44023132324219, 
            40.569740295410156
          ], 
          [
            -122.44012451171875, 
            40.569984436035156
          ], 
          [
            -122.44007873535156, 
            40.570125579833984
          ], 
          [
            -122.44007873535156, 
            40.570163726806641
          ], 
          [
            -122.44008636474609, 
            40.57025146484375
          ], 
          [
            -122.44023895263672, 
            40.570594787597656
          ], 
          [
            -122.44025421142578, 
            40.570636749267578
          ], 
          [
            -122.44026184082031, 
            40.570674896240234
          ], 
          [
            -122.44025421142578, 
            40.570716857910156
          ], 
          [
            -122.44023132324219, 
            40.570751190185547
          ], 
          [
            -122.44020843505859, 
            40.570770263671875
          ], 
          [
            -122.43986511230469, 
            40.570941925048828
          ], 
          [
            -122.43982696533203, 
            40.570964813232422
          ], 
          [
            -122.43980407714844, 
            40.57098388671875
          ], 
          [
            -122.43978118896484, 
            40.571022033691406
          ], 
          [
            -122.43972778320312, 
            40.571128845214844
          ], 
          [
            -122.43971252441406, 
            40.571300506591797
          ], 
          [
            -122.43968963623047, 
            40.5714111328125
          ], 
          [
            -122.43952178955078, 
            40.571773529052734
          ], 
          [
            -122.43949890136719, 
            40.571868896484375
          ], 
          [
            -122.43947601318359, 
            40.572013854980469
          ], 
          [
            -122.43947601318359, 
            40.572086334228516
          ], 
          [
            -122.43948364257812, 
            40.572345733642578
          ], 
          [
            -122.43800354003906, 
            40.56793212890625
          ], 
          [
            -122.43816375732422, 
            40.567924499511719
          ], 
          [
            -122.438232421875, 
            40.567924499511719
          ], 
          [
            -122.43828582763672, 
            40.567924499511719
          ], 
          [
            -122.43840789794922, 
            40.567943572998047
          ], 
          [
            -122.43872833251953, 
            40.568019866943359
          ], 
          [
            -122.4388427734375, 
            40.568042755126953
          ], 
          [
            -122.43903350830078, 
            40.568073272705078
          ], 
          [
            -122.43920135498047, 
            40.568088531494141
          ], 
          [
            -122.43930053710938, 
            40.568088531494141
          ], 
          [
            -122.43948364257812, 
            40.568084716796875
          ], 
          [
            -122.43984985351562, 
            40.568046569824219
          ], 
          [
            -122.440185546875, 
            40.568000793457031
          ], 
          [
            -122.44039154052734, 
            40.5679931640625
          ], 
          [
            -122.44057464599609, 
            40.5679931640625
          ], 
          [
            -122.44072723388672, 
            40.567996978759766
          ], 
          [
            -122.44091796875, 
            40.568012237548828
          ], 
          [
            -122.44118499755859, 
            40.568046569824219
          ], 
          [
            -122.44142150878906, 
            40.568099975585938
          ], 
          [
            -122.43800354003906, 
            40.56793212890625
          ], 
          [
            -122.43755340576172, 
            40.567966461181641
          ], 
          [
            -122.43755340576172, 
            40.567966461181641
          ], 
          [
            -122.43754577636719, 
            40.567924499511719
          ], 
          [
            -122.43750762939453, 
            40.567829132080078
          ], 
          [
            -122.43746185302734, 
            40.567741394042969
          ], 
          [
            -122.43738555908203, 
            40.567638397216797
          ], 
          [
            -122.43731689453125, 
            40.567569732666016
          ], 
          [
            -122.43723297119141, 
            40.567508697509766
          ], 
          [
            -122.43707275390625, 
            40.567409515380859
          ], 
          [
            -122.43701934814453, 
            40.567386627197266
          ], 
          [
            -122.43689727783203, 
            40.567340850830078
          ], 
          [
            -122.43678283691406, 
            40.567310333251953
          ], 
          [
            -122.43665313720703, 
            40.567295074462891
          ], 
          [
            -122.43651580810547, 
            40.567287445068359
          ], 
          [
            -122.43498229980469, 
            40.567256927490234
          ], 
          [
            -122.43406677246094, 
            40.567245483398438
          ], 
          [
            -122.43387603759766, 
            40.567249298095703
          ], 
          [
            -122.43376159667969, 
            40.567272186279297
          ], 
          [
            -122.43364715576172, 
            40.567310333251953
          ], 
          [
            -122.43354797363281, 
            40.567356109619141
          ], 
          [
            -122.43300628662109, 
            40.567604064941406
          ], 
          [
            -122.43300628662109, 
            40.567604064941406
          ], 
          [
            -122.43313598632812, 
            40.567768096923828
          ], 
          [
            -122.43325042724609, 
            40.567935943603516
          ], 
          [
            -122.433349609375, 
            40.568111419677734
          ], 
          [
            -122.43339538574219, 
            40.568206787109375
          ], 
          [
            -122.43342590332031, 
            40.568286895751953
          ], 
          [
            -122.43342590332031, 
            40.568286895751953
          ], 
          [
            -122.43345642089844, 
            40.568412780761719
          ], 
          [
            -122.43347930908203, 
            40.568576812744141
          ], 
          [
            -122.43347930908203, 
            40.568801879882812
          ], 
          [
            -122.43346405029297, 
            40.568920135498047
          ], 
          [
            -122.43344116210938, 
            40.569019317626953
          ], 
          [
            -122.43338012695312, 
            40.569187164306641
          ], 
          [
            -122.43333435058594, 
            40.569282531738281
          ], 
          [
            -122.43321228027344, 
            40.569465637207031
          ], 
          [
            -122.43304443359375, 
            40.569671630859375
          ], 
          [
            -122.43281555175781, 
            40.569919586181641
          ], 
          [
            -122.43281555175781, 
            40.569919586181641
          ], 
          [
            -122.43253326416016, 
            40.569789886474609
          ], 
          [
            -122.43247985839844, 
            40.569766998291016
          ], 
          [
            -122.43236541748047, 
            40.569732666015625
          ], 
          [
            -122.43223571777344, 
            40.569713592529297
          ], 
          [
            -122.43203735351562, 
            40.569709777832031
          ], 
          [
            -122.43194580078125, 
            40.569713592529297
          ], 
          [
            -122.43177032470703, 
            40.569732666015625
          ], 
          [
            -122.43169403076172, 
            40.569751739501953
          ], 
          [
            -122.43161010742188, 
            40.569778442382812
          ], 
          [
            -122.43151092529297, 
            40.569820404052734
          ], 
          [
            -122.43151092529297, 
            40.569820404052734
          ], 
          [
            -122.43143463134766, 
            40.569858551025391
          ], 
          [
            -122.43128967285156, 
            40.569953918457031
          ], 
          [
            -122.4302978515625, 
            40.570808410644531
          ], 
          [
            -122.4302978515625, 
            40.570808410644531
          ], 
          [
            -122.43001556396484, 
            40.571117401123047
          ], 
          [
            -122.42997741699219, 
            40.5711669921875
          ], 
          [
            -122.42993927001953, 
            40.571247100830078
          ], 
          [
            -122.42990112304688, 
            40.571372985839844
          ], 
          [
            -122.42988586425781, 
            40.571571350097656
          ], 
          [
            -122.42991638183594, 
            40.572029113769531
          ], 
          [
            -122.42991638183594, 
            40.572029113769531
          ], 
          [
            -122.42935943603516, 
            40.572048187255859
          ], 
          [
            -122.42887115478516, 
            40.572052001953125
          ], 
          [
            -122.42887115478516, 
            40.572052001953125
          ], 
          [
            -122.42886352539062, 
            40.574478149414062
          ], 
          [
            -122.42886352539062, 
            40.574478149414062
          ], 
          [
            -122.42887115478516, 
            40.575294494628906
          ], 
          [
            -122.42887878417969, 
            40.575386047363281
          ], 
          [
            -122.42889404296875, 
            40.575416564941406
          ], 
          [
            -122.42890930175781, 
            40.575443267822266
          ], 
          [
            -122.42897033691406, 
            40.575511932373047
          ], 
          [
            -122.42905426025391, 
            40.575572967529297
          ], 
          [
            -122.42905426025391, 
            40.575572967529297
          ], 
          [
            -122.42898559570312, 
            40.575630187988281
          ], 
          [
            -122.42891693115234, 
            40.575698852539062
          ], 
          [
            -122.42886352539062, 
            40.575759887695312
          ], 
          [
            -122.42882537841797, 
            40.575817108154297
          ], 
          [
            -122.42879486083984, 
            40.575878143310547
          ], 
          [
            -122.4287109375
            40.576107025146484
          ], 
          [
            -122.42862701416016, 
            40.576282501220703
          ], 
          [
            -122.42857360839844, 
            40.576377868652344
          ], 
          [
            -122.42841339111328, 
            40.576641082763672
          ], 
          [
            -122.42841339111328, 
            40.576641082763672
          ], 
          [
            -122.42827606201172, 
            40.576869964599609
          ], 
          [
            -122.42827606201172, 
            40.576869964599609
          ], 
          [
            -122.42825317382812, 
            40.576911926269531
          ], 
          [
            -122.42813110351562, 
            40.577110290527344
          ], 
          [
            -122.42810821533203, 
            40.577152252197266
          ], 
          [
            -122.42810821533203, 
            40.577152252197266
          ], 
          [
            -122.42800903320312, 
            40.577320098876953
          ], 
          [
            -122.42793273925781, 
            40.577461242675781
          ], 
          [
            -122.42756652832031, 
            40.578090667724609
          ], 
          [
            -122.42756652832031, 
            40.578090667724609
          ], 
          [
            -122.42734527587891, 
            40.578426361083984
          ], 
          [
            -122.4271240234375, 
            40.578792572021484
          ], 
          [
            -122.4271240234375, 
            40.578792572021484
          ], 
          [
            -122.42688751220703, 
            40.579147338867188
          ], 
          [
            -122.42679595947266, 
            40.579303741455078
          ], 
          [
            -122.42662048339844, 
            40.579566955566406
          ], 
          [
            -122.42662048339844, 
            40.579566955566406
          ], 
          [
            -122.42653656005859, 
            40.579662322998047
          ], 
          [
            -122.42645263671875, 
            40.579738616943359
          ], 
          [
            -122.42625427246094, 
            40.579891204833984
          ], 
          [
            -122.42615509033203, 
            40.579952239990234
          ], 
          [
            -122.42604827880859, 
            40.580009460449219
          ], 
          [
            -122.42595672607422, 
            40.580051422119141
          ], 
          [
            -122.42583465576172, 
            40.580097198486328
          ], 
          [
            -122.42543029785156, 
            40.580215454101562
          ], 
          [
            -122.42515563964844, 
            40.580303192138672
          ], 
          [
            -122.42515563964844, 
            40.580303192138672
          ], 
          [
            -122.42573547363281, 
            40.581466674804688
          ], 
          [
            -122.42597198486328, 
            40.581966400146484
          ], 
          [
            -122.42615509033203, 
            40.582328796386719
          ], 
          [
            -122.42647552490234, 
            40.583084106445312
          ], 
          [
            -122.42666625976562, 
            40.583511352539062
          ], 
          [
            -122.42674255371094, 
            40.583686828613281
          ]
        ], 
        "where": null
      }
    ]

Here is a video (http://dl.dropbox.com/u/11502389/out.ogv) that I created by drawing the path with a pause before each new point is added.
This video shows that the points returned by GeomAtStreetEndEvent are not sequential. Is this a bug or am I miss using the data returned by gs_routeserver?

Kind regards,
Cathal 

William Lachance

unread,
Oct 21, 2010, 11:40:03 AM10/21/10
to graph...@googlegroups.com
This is just a shot in the dark, but it my guess is that the street
data you're using is not properly connected and/or contains duplicate
vertices. Try looking at it closely with an osm viewer like josm.

Will

2010/10/19 cathal coffey <coffey...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "Graphserver" group.
> To post to this group, send email to graph...@googlegroups.com.
> To unsubscribe from this group, send email to graphserver...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/graphserver?hl=en.
>
>

--
William Lachance
wrl...@gmail.com

cathal coffey

unread,
Oct 22, 2010, 6:19:36 AM10/22/10
to graph...@googlegroups.com
Will,

I have examined the osm data in JOSM and it looks fine. I think the problem might be that I don't understand the handlers.yaml file.
Would you be willing to provide me with a handlers.yml file that has been customized to return paths with many waypoints?

Regards,
Cathal

Brandon Martin-Anderson

unread,
Oct 22, 2010, 1:32:24 PM10/22/10
to graph...@googlegroups.com
Nah, it's probably just a bug. There's no way you could mess up
handlers.yaml to produce this particular behavior.

-B

Reply all
Reply to author
Forward
0 new messages