Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinates of cities returned are imprecise (not the city center) #1677

Open
File5 opened this issue Sep 5, 2024 · 1 comment
Open

Coordinates of cities returned are imprecise (not the city center) #1677

File5 opened this issue Sep 5, 2024 · 1 comment
Labels

Comments

@File5
Copy link

File5 commented Sep 5, 2024

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

  1. Run the search query https://pelias.github.io/compare/#/v1/search?lang=en&text=Munich
  2. Find the result for Munich, Germany and note the location on the map, i. e. geometry point coordinates in JSON.
  3. 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.

@File5 File5 added the bug label Sep 5, 2024
@missinglink
Copy link
Member

missinglink commented Sep 6, 2024

There are actually a bunch of different Munich records in WhosOnFirst (on different layers (ie. placetype in WOF parlance):

These refer to different subdivisions of :

I'm not 100% familiar with the localadmin/county distinction.

Anyway... what seems to be happening is that the larger administrative divisions are using math centroids, I will ask the WOF team if we can copy the city center centroid across to the larger administrative regions.

This is the one you were referring to above: https://pelias.github.io/compare/#/v1/search?layers=neighbourhood&size=1&text=munich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants