[Tile-serving] [openstreetmap/osm2pgsql] Importing with Dutch "Rijksdriehoekstelsel" projection (SRID 28992) fails (extremely slow) (Issue #1876)

mboeringa notifications at github.com
Fri Jan 6 08:05:25 UTC 2023


<!-- Please don't use screenshots. Copy and paste the *text* output here if that's needed for context. -->

osm2pgsql version: 1.7.1 (1.7.0-75-g6a5d2500)

<!-- Paste output of `osm2pgsql --version` here. Please use the [latest
release](https://osm2pgsql.org/releases/) of osm2pgsql if at all
possible. -->


## What operating system and PostgreSQL/PostGIS version are you using?

Ubuntu 22.04.1 LTS, PostgreSQL 15.1, PostGIS 3.3.2

## Tell us something about your system

Bare metal 2x Xeon E5-2680 v4, 256GB RAM


## What did you do exactly?

Tried to import the Geofabrik "Netherlands" extract using osm2pgsql and a LUA flex output style, setting the projection to SRID 28992 for the Dutch "Rijksdriehoekstelsel" (RD New) projection. 

Note that I have used exactly(!) the same style and Geofabrik extract before to import in Web Mercator (3857) and WGS 1984 (4326) without issues. With these projections set, the import finishes in less than 15 minutes.


## What did you expect to happen?

 The import finishes in less than 15 minutes.


## What did happen instead?

Contrary to what I see happening with 3857 or 4326 projection import, the 28992 projection import seems to import normally to up to about the progress showing 730k ways loaded, then progressively and continuously slows down to now 0.06k/s ways loaded, where it normally achieves about 55k/s way loading (tested with the entire planet as well). After more than 8 hours, the import is still not finished with the way loading stage.

I have never seen this behavior before, but this is the first time I tried using any other projection than Web Mercator or WGS 1984.

Note that the Dutch "Rijksdriehoekstelsel" 28992 projection, a stereographic projection, even though a very nice compromise projection for small regions and countries like the Netherlands, is actually quite unusual in an international context. If I recall well, there is maybe just one other country in the world using a similar projection. As a consequence, proper support for this projection in software has historically often been lacking.


## What did you do to try analyzing the problem?

I looked in pgAdmin, and see the following processes / queries listed as "active" when this issue occurs:
`COPY "planet_osm_ways" FROM STDIN`
`COPY "osm"."planet_osm_polygon" ("osm_id","way","tags","layer") FROM STDIN`
I was slightly expecting only to see the first statement? But I guess this is normal?

Double checked that 3857 and 4326 imports are fine by re-importing. As expected, they finish in less than 15 minutes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1876
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/issues/1876 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230106/c9f558ff/attachment.htm>


More information about the Tile-serving mailing list