Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.

Add support for Pelias geocoder #485

@barbeau

Description

@barbeau

Mapzen offers an open-source geocoder named Pelias:
https://github.com/pelias/pelias

Pelias is used in Eraser Map, an Android app, which would be a good reference for adding Pelias to OTP Android (although from a glance it appears much of it is written using Kotlin).

I'd like to switch to this as our primary geocoding provider by default, even to potentially use this before the Android geocoder in our geocoding hierarchy.

So new geocoding hierarchy would probably look like:

  • Pelias
    • Android native geocoder
      • Nominatim (based on user preference - default)
      • Google Places API (based on user preference)

...or:

  • Pelias (based on user preference - default)
  • Android native geocoder (based on user preference)
    • Nominatim (based on user preference - default)
    • Google Places API (based on user preference)

...with failover cascading to the next level when results from the previous level aren't available. We should probably have a fail safe setting to turn off Pelias geocoding in case it's not very good in some areas - I'll need to think a bit more which hierarchy makes the most sense.

Reasoning for switching to Pelias as a default is that we can use OTP Android as a sandbox to better understand what users are searching for in context of multimodal travel. This will hopefully lead to improved transit search. Mapzen is committed to open data and open-source for their systems, and we're potentially looking towards gathering more information from user's queries (with user permission) to assist in the process of building a better transit geocoder. Mapzen can also leverage the Transitland datastore for building better transit geocoding.

Transit geocoding is currently primitive at best - currently none of the geocoders we're using in OTP Android support transit data. In OneBusAway Android we have search only for stop and route IDs, which users complain about. Bottom line is we need a better way to support search for addresses, points of interest, and transit information, and I think in the long-term Pelias is our best chance to get there.

There are currently rate limits on a Mapzen API key (6 requests/sec or 30k per day) - I don't see us hitting these anytime soon for OTP Android alone, but from discussions with @dianashk we would be able to work with Mapzen to bump the limit if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions