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

Ian Turton ijturton at gmail.com
Mon May 21 08:44:19 PDT 2018


When I load both of them into QGIS they align pretty well, with the output
being slightly smaller than the input file.

[image: Screenshot from 2018-05-21 16-40-32.png]

I suspect this is due to  the pixel size changing, but I'm not sure why it
is so large as QGis is using GDAL internally to reproject the input to 3857
here.

Ian


On Mon, 21 May 2018 at 16:17, Ian Hannah <ihannah at meniscus.co.uk> wrote:

> 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
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
Ian Turton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180521/6f0b0c8b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2018-05-21 16-40-32.png
Type: image/png
Size: 55892 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180521/6f0b0c8b/attachment-0001.png>


More information about the gdal-dev mailing list