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

mboeringa notifications at github.com
Fri Jan 6 21:36:13 UTC 2023


> I just realized that I have a PR open (#1873) that might have something to do with your problem. @lonvia didn't have a chance yet to look at it, but you can try it and see whether it makes a difference.

I have little doubt you nailed it. This was the same issue affecting PostGIS once it switched from using PROJ4 to 5? or 6?, where initializing the projection object was no longer trivial, but _much_ more expensive. It caused a similar 50 to 100x slow down of some of my code calling ST_Transform, and was fixed in a subsequent release of PostGIS by also caching the projection object.

So this patch seems right.

Maybe it is good to document on the osm2pgsql website though, unless you intend to backport this fix to all versions from the moment osm2pgsql flex started technically supporting arbitrary projections, that unfortunately this functionality cannot yet be practically used with flex output due to this issue in these earlier releases of osm2pgsql with flex output support, and only 3857 and 4326 can be reasonably used. Once the new release is out, the proper support for it can be documented again.

I am actually a bit surprised I am the first to report this issue, would have expected someone else to have tried it as well.

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

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


More information about the Tile-serving mailing list