[gdal-dev] Using GDalWarp from EPSG:27700 to EPSG:3857 does not create correct image

Ian Hannah ihannah at meniscus.co.uk
Mon May 21 08:16:45 PDT 2018


I am using the C# GDAL interfact to create a GeoTiff file ( test.tiff
<http://osgeo-org.1560.x6.nabble.com/file/t383179/test.tiff>  ).

This file has the EPSG:27700 projection set within it and a GeoTransform as
follows:

                    double[] transform = new double[6];
                    transform[0] = -24000;
                    transform[1] = 1000;
                    transform[2] = 0;
                    transform[3] = 996000;
                    transform[4] = 0;
                    transform[5] = -1000;
                    dataset.SetGeoTransform(transform);

So the GeoTiff image goes from -24000 to 679000 in the Eastings and 996000
to -14000 in the Northings.

I then use the GDAL warp application using this command:

gdalwarp -s_srs EPSG:27700 -t_srs EPSG:3857 -overwrite test.tiff output.tiff

This creates me the output  output.tiff
<http://osgeo-org.1560.x6.nabble.com/file/t383179/output.tiff>  . The large
square in the middle should be over Leeds when placed onto a map but it is
not. The right hand side does not extend out far enough and I have no idea
why.

I just want to know if anyone has had any experience in doing this
transformation or can see anything that I am not doing correctly.

Thanks
Ian




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list