Coordinates of cities returned are imprecise (not the city center)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 259
- Forks
- 169
- Avg merge
- 6h 15m
- Merged PRs (30d)
- 1
Description
Hello! We are considering to use Pelias API as general-purpose geocoding solution to search for countries, cities and places. We've deployed a self-hosted Pelias planet setup to tinker with it.
Describe the bug
The entries for some large cities returned by Pelias have imprecise locations (geometry point coordinates).
We expect the resulting coordinates to be around city center, but they are seems to be closer to just a bounding box center.
Steps to Reproduce
- Run the search query https://pelias.github.io/compare/#/v1/search?lang=en&text=Munich
- Find the result for Munich, Germany and note the location on the map, i. e. geometry point coordinates in JSON.
- Compare with the entry for Munich in Who's On First https://spelunker.whosonfirst.org/id/1377787805
Expected behavior
The location on the map and geometry point coordinates in JSON should be near Marienplatz, Munich, Germany, which is the city center. This is the behavior of many other geocoding search engines (e. g. Google, Mapbox).
Environment (please complete the following information):
https://api.geocode.earth and https://api.dev.geocode.earth hosts (the default values) are set in Pelias Compare Tool.
Our self-hosted setup:
OS: Linux, Ubuntu 22.04.1 LTS
Docker version 27.1.1, build 6312585
Docker Compose version v2.29.1
works similarly and has the same problem as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Munich search in the Pelias Compare Tool and inspect the returned geometry coordinates. Compare that result with the Who's On First Munich entry and the expected location near Marienplatz. Trace where the API obtains or transforms the city coordinates, then verify that the returned point represents the city center rather than a bounding-box center.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100