0

I have an interpolated raster image with EPSG:27700 (British National Grid), after I warp it using gdalwarp into EPSG:3857 (WGS84 Web Mercator (Auxiliary Sphere)):

gdalwarp -s_srs EPSG:27700 -t_srs EPSG:3857 input.tif output.tif

which works fine (GDAL 1.10.1), (including a little bit of twisting (black cells) in the output one which is understandable as I guess there must be a little bit of distortion).

Then, if I create a Web Map Service (wms) in Geoserver using the output file as datastore, when I display the wms in a web page, by using OpenLayers and Google Maps as background, the image is not perfectly located, as it is misplaced about 90-100 meters LEFT where it should be in the British National Grid projection.

My question is whether gdalwarp does not the right transformation and/or OpenLayers does its best and does not adjust it, or it is definitely impossible to transform 27700 into 3857 accurately.

  • 1
    Which GDAL version? Do you use some open data image from Ordnance Survey so others can make a try with the same image? Do you know that using gdalwarp is not necessary because GeoServer can reproject on-the-fly from EPSG:27700? That is actually a good test. Make another WMS layer from the original image and see if original and reprojected versions are placed into same place in your OpenLayers application. – user30184 Aug 23 '14 at 16:53
  • 1
    Maybe a duplicate of gis.stackexchange.com/questions/40461/…. Older versions of GDAL may contain an outdated datum shift parameterset. – AndreJ Aug 23 '14 at 17:10
  • GDAL 1.10.1. I have tried not to use gdalwarp and use the geoserver reprojection on-the-fly from epsg:27700 and the result is the same as before, which makes me happy partially as now I know that gdalwarp and geoserver reproject in the same way. – Web-GIS entrepreneur Aug 23 '14 at 18:07
0

It did work but using EPSG:102113 instead, not EPSG:3857.

This post helped me a lot:

Reprojecting WGS 1984 Web Mercator (EPSG:3857) in Python with GDAL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.