[Tile-serving] [openstreetmap/osm2pgsql] Problem using custom projection EPSG:28992 (Issue #1672)
Just van den Broecke
notifications at github.com
Fri Apr 29 14:12:57 UTC 2022
Ok, thanks @joto. Sorry, more info here, but as all was working fine in EPSG:3857 including Mapnik rendering, but went wrong with EPSG:28992 (invalid coordinate values in PostGIS). Steps taken:
- downloaded Netherlands North-Holland pbf from geofabrik.de, cut out small area with Osmosis as ${DOWNLOAD_FILE}
- run:
`osm2pgsql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -H ${POSTGRES_HOST} -P ${POSTGRES_PORT} -s -S ${OSM2PGSQL_STYLE} ${DOWNLOAD_FILE}`
- OSM2PGSQL_STYLE: Style file is standard OpenTopoMap Style
- running the OpenTopoMap SQL files after
- this worked fine, could generate Mapnik image with the OpenTopoMap Mapnik Style, no problems at all.
- then trying to use custom projection EPSG:28992 (Dutch)
- `osm2pgsql -E 28992 -U ${POSTGRES_USER} -d ${POSTGRES_DB} -H ${POSTGRES_HOST} -P ${POSTGRES_PORT} -s -S ${OSM2PGSQL_STYLE} ${DOWNLOAD_FILE}`
- (or with `--proj=28992` same result).
- database tables (PG 14 with PostGIS 3.2 in postgis:postgis Docker, also proj 8.2) filled, geometry columns have SRID 28992 ok, but all coordinates are not even in EPSG:28992 range (but look like EPSG:3857 range in NL but negative values)
- like said I think the problem may be in proj, as projinfo EPSG:28992 does not contain the `+towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812` part normally found, line in proj v5 in the `epsg` file. Full proj-string (from v5.2.0) is:
`+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs`
Unless the `+towgs84` which is essential for any transform from/to WGS84 and other projections, somewhere else in proj. This happened more often in older proj/GDAL/PostGIS versions but we could always fix in the `epsg` file.
I will ask on the Proj Gitter chat first. I may be missing something essential.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1672#issuecomment-1113363280
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/issues/1672/1113363280 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20220429/02da1e95/attachment.htm>
More information about the Tile-serving
mailing list