pelias / pelias/api

Feature Request: Support for polygon boundary with configurable buffer (boundary.gid + distance)

Open
#1,702 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
259
Forks
169
Avg merge
6h 15m
Merged PRs (30d)
1

Description

We are evaluating Pelias as a geocoding service to replace Nominatim and Photon in our projects. One of our key use cases is bicycle routing within specific regions. For that reason, we handle most geocoding ourselves and need to restrict results strictly to certain areas.

Currently, boundary.gid allows us to filter results to administrative boundaries (e.g., city, county, state). However, in our use case the required search area does not align exactly with existing administrative boundaries. Instead, we would like to restrict results to:

  • an administrative boundary (via boundary.gid)
  • plus a configurable buffer distance (e.g., 30 km) around that boundary

This would allow us to cover adjacent areas close to the boundary without including unrelated, distant results.

Two possible approaches we see:

  1. Extend the existing boundary.gid parameter with an optional buffer argument, for example:
    boundary.gid=whosonfirst:locality:101748617&boundary.buffer=30000
    (where buffer is defined in meters).

  2. Allow users to upload or configure a custom polygon (not tied to existing WOF administrative boundaries) that acts as a global filter for all queries.

Both options would make Pelias significantly more flexible for mobility and routing services where administrative boundaries alone are too restrictive. Would this be feasible to add to Pelias API, or is there an existing workaround we could already use?

Thanks a lot for your great work on Pelias!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the Pelias API currently handles the boundary.gid parameter and applies administrative-boundary filtering. Compare the requested configurable buffer with the alternative custom-polygon approach, then define which API behavior and configuration would constitute a complete implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.