[OSRM-talk] Some questions

Daniel Patterson daniel at mapbox.com
Wed Nov 22 19:34:40 UTC 2017


Hi Gandalf,

  1) If you edit `car.lua`, you can turn off the "exclusions",
      which will save some memory (perhaps 20%).  Other than that,
      not really.  If you pre-process using `car.lua`, you'll only get
      datafiles that are useful for car driving, it doesn't care about
      truck/walk/other restrictions.  In theory yes, much of the data
      isn't needed, but OSRM currently doesn't support *not* loading
      everything.

  2) There is no built-in isochrone service.  I assume you're looking
       for GeoJSON polygons that contour away from the start point?
      There are some WIP pull requests for isochrones (take a look
      at the active pull requests), but nothing in the main codeline yet.
      You can also generate them client-side using an approach like this:

https://blog.mapbox.com/add-isochrones-to-your-next-application-e9e84a62345f
      which uses the `table` plugin, instead of the route plugin.

      In general though, consider simply requesting the actual routes from
OSRM -
      they're generated pretty fast, even for interactive use.

    3) The simplest way is to pre-merge the OSM datafiles using something
like
        http://docs.osmcode.org/osmium/latest/osmium-merge.html

        The only alternative would be to run several OSRM servers on
different
        HTTP ports, and create a proxy in front that looks at the request
coordinates
        and directs each request to the appropriate map.  No such thing
comes
        with OSRM however, you'll need to build it yourself.

    4) The osrm-routed memory usage depends on the size of your map.  For
the planet,
         with the car profile, it's in the order of 60-70GB.

    5) Yes, `osrm-routed` supports seamless dataswaps.  Use `osrm-datastore
<filename.osrm>`
        to load your data into shared memory, then run `osrm-routed -s` to
tell `osrm-routed`
        to look in shared memory instead of loading files itself.
        You can then replace the shared memory data with another invocation
of
        `osrm-datastore <newfiles.osrm>`, and `osrm-routed` will seamlessly
swap to the
        new dataset.
        Note that you will need sufficient RAM to hold both sets of data in
memory during
        the swapover.

daniel

On Wed, Nov 22, 2017 at 11:09 AM, Gandalf Corvotempesta <
gandalf.corvotempesta at gmail.com> wrote:

> Hi to all
> for a project, I have to calculate distance and travel time between 2
> points.
> I've tried, with success, OSRM. Some questions:
>
> 1) can I strip down as much as possible to keep the memory usage low ?
> I don't need any restricted turns for trucks and so on,
> the only needed profile is "car" and I only need to fetch distance and
> time, even directions are not needed.
>
> 2) would be possible to return a GeoJSON (or any other format) with
> isochrones from a defined point ? I would use this to pre-calculate an
> estimated travel time between points.
>
> 3) how can I load multiple maps with osrm-routed ?
>
> 4) which is the memory usage for osrm-routed ? I've pre-processed the
> maps on a huge computer and then i'm running osrm-routed on a server.
> Is that the sum of all *.osrm.* files ?
>
> 5) in case of map updates, can I "reload" osrm-routed without restarting
> it ?
>
> Thank you in advange.
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20171122/036c2135/attachment.html>


More information about the OSRM-talk mailing list