osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
2.99k stars 701 forks source link

Possible trouble with 180th meridian #3377

Closed s-lipatov closed 3 months ago

s-lipatov commented 3 months ago

After installing Nominatim version 4.4, everything starts and works well. However, there seems to be a problem with polygonal features crossing the 180th meridian. If we take the source:

PBF_URL=https://download.geofabrik.de/russia/far-eastern-fed-district-latest.osm.pbf

then after installation the request

http://127.0.0.1:7070/lookup?osm_ids=R151231&limit=1&format=json&polygon_geojson=1

returns an empty array, for comparison

https://nominatim.openstreetmap.org/lookup?osm_ids=R151231&limit=1&format=json&polygon_geojson =1

returns expected.

If you look at the import tables:

SELECT FROM place WHERE osm_id = 151231 AND osm_type = 'R' -- no results SELECT FROM planet_osm_rels WHERE id = 151231 -- ok

Is there a problem with osm2pgsql or what?