Heerco
Heerco

Reputation: 21

Reproject EPSG:28992 to EPSG:3857 (defaults to EPSG:4326)

I am programming an application using Proj4 and OpenLayers to display the AHN map from the Netherlands from an external (open) WMS server. I've got it working, but the reprojection is still not quite correct. Now, reading online I've found out the issue is that the EPSG:28992 Proj4 string redirects coordinates to a system that's not the same as our view.

Our view is set to EPSG:3857 (most of our layers are) and the other layer apparently redirects to EPSG:4326. Is there some way to 'interject' at the projection level of the layer (when defining the 'projection' from the source) to make it use EPSG:3857 instead of EPSG:4326? Right now I'm applying the projection to use EPSG:28992.

*edit: Corrected the information.

Upvotes: 0

Views: 819

Answers (1)

Heerco
Heerco

Reputation: 21

It turned out that my Proj4 string was incorrect (and as such, the proj4 string at EPSG.io for EPSG:28992 is wrong as well). Using the following string:

+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs

Is perfect and shows the correct transformation of the map.

Upvotes: 2

Related Questions