Given a starting point and a travel time, I would like to produce a travel distance polygon. Can I request this from osm2po via http?


What kind of polygons are you thinking of? ConvexHull, Alphashapes, IsoLines? ... osm2po returns either a cloud of visited vertexes or the convex hull. Here is the exact copy from the osm2po-online-help-page:

It is possible to calculate a route in osm2po,
output the result as GeoJson and to add it as
a layer in QuantumGIS.

* Convert the graph file with [cmd=g]
  and start osm2po with [cmd=r] (Service)

* If you need the street-types (-class)
  enable them by setting
  [graph.support.edgeflags=true] either in the
  osm2po.config file or as additional parameter
  on the commandline.

* Instead of opening the WebGUI in your Browser
  with e.g. [http://localhost:8888/Osm2poService]
  add these Parameters to the address above


* The Browser should show you the routing result
  as plain text in geojson format (UTF8).

* If this works, copy the complete address,
  open your QuantumGIS and add the layer under
  A Dialog opens. Set the [protocol] to
  [GeoJSON] and the [Encoding] to [UTF8]
  Finally paste the address into the [URI] Field and
  click [Open]

* The same works with driving circle distance.
  Here osm2po creates a cloud of points (in geojson-format)
  which are reachable in either time or distance from a given
  starting point (source). e.g.:

  1) Show each point which can be reached within a distance of
     5 km from starting point (53.5,10.0):


  2) Show each point which can be reached within a distance of
     12 Minutes (0.2 hours) from starting point (53.5,10.0).


cmd=fx returns the cloud of points. Replace it with cmd=fh to receive the hull.

See also Is it possible to get the points used for the convex hull in osm2po?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.