<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.Shkpostityyli20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Yes, envelopes should grow every time when the raster is rotated, but they should overlap. If they move like they do in your case, something seems to go wrong. I can only say that obviously
 Proj is seeing some difference between the projection that is stored into your GeoTIFF and what it thinks that EPSG:27573 means. By comparing the WKT text from your mail with the printout of “projinfo epsg:27573” (with Proj version 6.3.2) I can see these differences:<br>
<br>
Image<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">--------<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">CONVERSION["unnamed",<br>
PARAMETER["Latitude of natural origin",54.4444444444445,<br>
<br>
Proj<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-----<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">CONVERSION["Lambert zone III",<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">PARAMETER["Latitude of natural origin",49,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Experts on the French coordinate systems and Proj may continue from this, I fear I can’t help more than this. And you are right that using “-s_srs” in gdalwarp overrides the projection
 that is stored into GeoTIFF tags. If the result is good you can use that as a workaround. It is also possible to update the geotiff tags with “gdal_edit -a_srs epsg:27573” but before that you should be sure that it is the right thing to do.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> Evert Etienne (SITEMARK) <evert.etienne@sitemark.com>
<br>
<b>Lähetetty:</b> torstai 12. marraskuuta 2020 10.00<br>
<b>Vastaanottaja:</b> Rahkonen Jukka (MML) <jukka.rahkonen@maanmittauslaitos.fi><br>
<b>Aihe:</b> Re: [gdal-dev] Location change on gdalwarp reprojection<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your response Jukka!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Your first explanation about the bounds make sense, but shouldn’t they still be in the same area (overlapping)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">When specifying the source epsg as EPSG:27573, there is indeed no changes anymore as visible in the following logs:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">(Am I correct for thinking this is actually just equivalent to overwriting the CRS included in the tif?)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">```<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">orig.tif<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:27573<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">bounds [828662.0710931281, 3203193.9700861075, 829595.8710931281, 3204344.6700861077]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:27573 bounds [828662.0710931281, 3203193.9700861075, 829595.8710931281, 3204344.6700861077]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:3857 bounds [578066.9358574335, 5479808.142856716, 579420.0775091586, 5481457.907968456]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:4326 bounds [5.192863637248721, 44.09275933293886, 5.205019115521942, 44.103402376252255]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">gdalwarp -s_srs EPSG:27573 -t_srs EPSG:27573 orig.tif from_27573_into_27573.tif<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">from_27573_into_27573.tif<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:27573<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">bounds [828662.0710931281, 3203193.9700861075, 829595.8710931282, 3204344.6700861077]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:27573 bounds [828662.0710931281, 3203193.9700861075, 829595.8710931282, 3204344.6700861077]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:3857 bounds [578066.9358574335, 5479808.142856716, 579420.0775091586, 5481457.907968456]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">EPSG:4326 bounds [5.192863637248721, 44.09275933293886, 5.205019115521945, 44.103402376252255]<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">```<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So you’re suggesting the included CRS in orig.tif does not match <span style="color:black">EPSG:27573 perfectly then? Would this be a mismatch in the WKT string then?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I am still a bit lost how this would cause that in QGIS the orig.tif and repro.tif show up in a totally different location where <span style="color:black">orig.tif</span> is where I would expect it to be. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">And as well why rasterio reads the CRS as being <span style="color:black">EPSG:27573 (see logs), but that might be a separate issue?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Many thanks</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 11 Nov 2020, at 22:38, jratike80 <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">Hi,<br>
<br>
The bounds do not mean exactly what you think. Re-projecting a rectangular<br>
image from EPSG:27573 into EPSG:4326 rotates the image somewhat<br>
counter-clockwise. This image is from another context<br>
</span><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.usgs.gov%2Fmedia%2Fimages%2Flandsat-1-8-landsatlook-image-examples&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=IIj2gHAu18%2Fd%2F%2BJyxHQxutxFg%2F0cqzNwSgIhNkEyNF8%3D&amp;reserved=0"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.usgs.gov%2Fmedia%2Fimages%2Flandsat-1-8-landsatlook-image-examples&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=IIj2gHAu18%2Fd%2F%2BJyxHQxutxFg%2F0cqzNwSgIhNkEyNF8%3D&amp;reserved=0</span></a><span class="apple-converted-space"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"> </span></span><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">but<br>
you can get the idea. The new bounds report the min-max coordinates of the<br>
envelope that contains that rotated image. The corners of the original image<br>
are not at the corners of the warped image. That explains why WGS 84 bounds<br>
in EPSG:3857 are different.<br>
<br>
The difference when you warp to EPSG:27573  may mean that the coordinate<br>
system of the original image is not EPSG:27573, at least not for the Proj<br>
library. What happens with command:<br>
<br>
gdalwarp -s_srs EPSG:27573 -t_srs EPSG:27573 orig.tif<br>
from_27573_into_27573.tif<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
<br>
<br>
Evert Etienne (SITEMARK) wrote<br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">It does not happen when just warping, but it does occur when warping to<br>
the same EPSG as can be seen in the follow logs<br>
```<br>
orig.tif<br>
EPSG:27573<br>
bounds [828662.0710931281, 3203193.9700861075, 829595.8710931281,<br>
3204344.6700861077]<br>
EPSG:27573 bounds [828662.0710931281, 3203193.9700861075,<br>
829595.8710931281, 3204344.6700861077]<br>
EPSG:3857 bounds [578066.9358574335, 5479808.142856716, 579420.0775091586,<br>
5481457.907968456]<br>
EPSG:4326 bounds [5.192863637248721, 44.09275933293886, 5.205019115521942,<br>
44.103402376252255] <----- OK<br>
gdalwarp orig.tif justwarp.tif<br>
justwarp.tif<br>
EPSG:27573<br>
bounds [828662.0710931281, 3203193.9700861075, 829595.8710931282,<br>
3204344.6700861077]<br>
EPSG:27573 bounds [828662.0710931281, 3203193.9700861075,<br>
829595.8710931282, 3204344.6700861077]<br>
EPSG:3857 bounds [578066.9358574335, 5479808.142856716, 579420.0775091586,<br>
5481457.907968456]<br>
EPSG:4326 bounds [5.192863637248721, 44.09275933293886, 5.205019115521945,<br>
44.103402376252255] <----- SAME<br>
gdalwarp -t_srs EPSG:27573 orig.tif noreproj.tif<br>
noreproj.tif<br>
EPSG:27573<br>
bounds [829527.7905651039, 3748136.6066527413, 830468.8074871361,<br>
3749294.6346238866]<br>
EPSG:27573 bounds [829527.7905651039, 3748136.6066527413,<br>
830468.8074871361, 3749294.6346238866]<br>
EPSG:3857 bounds [608015.3560148155, 6272484.6841915725,<br>
609507.2374494626, 6274297.96416575]<br>
EPSG:4326 bounds [5.461894872874811, 48.98599094207838, 5.475296671823179,<br>
48.99667932763942] <----- CHANGED<br>
```<br>
<br>
GDAL info of orig.tif:<br>
```<br>
Driver: GTiff/GeoTIFF<br>
Files: orig.tif<br>
Size is 18676, 23014<br>
Coordinate System is:<br>
PROJCRS["NTF (Paris) / Lambert zone III",<br>
   BASEGEOGCRS["NTF (Paris)",<br>
       DATUM["Nouvelle Triangulation Francaise (Paris)",<br>
           ELLIPSOID["Clarke 1880 (IGN)",6378249.2,293.466021293627,<br>
               LENGTHUNIT["metre",1]]],<br>
       PRIMEM["Paris",2.5969213,<br>
           ANGLEUNIT["grad",0.0157079632679489]],<br>
       ID["EPSG",4807]],<br>
   CONVERSION["unnamed",<br>
       METHOD["Lambert Conic Conformal (1SP)",<br>
           ID["EPSG",9801]],<br>
       PARAMETER["Latitude of natural origin",54.4444444444445,<br>
           ANGLEUNIT["grad",0.0157079632679489],<br>
           ID["EPSG",8801]],<br>
       PARAMETER["Longitude of natural origin",0,<br>
           ANGLEUNIT["grad",0.0157079632679489],<br>
           ID["EPSG",8802]],<br>
       PARAMETER["Scale factor at natural origin",0.999877499,<br>
           SCALEUNIT["unity",1],<br>
           ID["EPSG",8805]],<br>
       PARAMETER["False easting",600000,<br>
           LENGTHUNIT["metre",1],<br>
           ID["EPSG",8806]],<br>
       PARAMETER["False northing",3200000,<br>
           LENGTHUNIT["metre",1],<br>
           ID["EPSG",8807]]],<br>
   CS[Cartesian,2],<br>
       AXIS["easting",east,<br>
           ORDER[1],<br>
           LENGTHUNIT["metre",1]],<br>
       AXIS["northing",north,<br>
           ORDER[2],<br>
           LENGTHUNIT["metre",1]],<br>
   ID["EPSG",27573]]<br>
Data axis to CRS axis mapping: 1,2<br>
Origin = (828662.071093128062785,3204344.670086107682437)<br>
Pixel Size = (0.050000000000002,-0.050000000000008)<br>
Metadata:<br>
 AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
 COMPRESSION=LZW<br>
 INTERLEAVE=PIXEL<br>
Corner Coordinates:<br>
Upper Left  (  828662.071, 3204344.670) (  3d 7'33.28"E, 48d59'48.23"N)<br>
Lower Left  (  828662.071, 3203193.970) (  3d 7'30.95"E, 48d59'11.01"N)<br>
Upper Right (  829595.871, 3204344.670) (  3d 8'19.19"E, 48d59'46.98"N)<br>
Lower Right (  829595.871, 3203193.970) (  3d 8'16.85"E, 48d59' 9.76"N)<br>
Center      (  829128.971, 3203769.320) (  3d 7'55.07"E, 48d59'28.99"N)<br>
Band 1 Block=256x256 Type=Byte, ColorInterp=Red<br>
 Overviews: 9338x11507, 4669x5754, 2335x2877, 1168x1439, 584x720,<br>
292x360, 146x180<br>
 Mask Flags: PER_DATASET ALPHA<span class="apple-converted-space"> </span><br>
 Overviews of mask band: 9338x11507, 4669x5754, 2335x2877, 1168x1439,<br>
584x720, 292x360, 146x180<br>
 Unit Type: metre<br>
Band 2 Block=256x256 Type=Byte, ColorInterp=Green<br>
 Overviews: 9338x11507, 4669x5754, 2335x2877, 1168x1439, 584x720,<br>
292x360, 146x180<br>
 Mask Flags: PER_DATASET ALPHA<span class="apple-converted-space"> </span><br>
 Overviews of mask band: 9338x11507, 4669x5754, 2335x2877, 1168x1439,<br>
584x720, 292x360, 146x180<br>
 Unit Type: metre<br>
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue<br>
 Overviews: 9338x11507, 4669x5754, 2335x2877, 1168x1439, 584x720,<br>
292x360, 146x180<br>
 Mask Flags: PER_DATASET ALPHA<span class="apple-converted-space"> </span><br>
 Overviews of mask band: 9338x11507, 4669x5754, 2335x2877, 1168x1439,<br>
584x720, 292x360, 146x180<br>
 Unit Type: metre<br>
Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha<br>
 Overviews: 9338x11507, 4669x5754, 2335x2877, 1168x1439, 584x720,<br>
292x360, 146x180<br>
 Unit Type: metre<br>
```<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">On 11 Nov 2020, at 20:32, Evert Etienne (SITEMARK) &lt;<o:p></o:p></span></p>
</blockquote>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">evert.etienne@<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">&gt; wrote:<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
Hey all,<br>
<br>
I have some behaviour that I can’t wrap my head around. When I reproject<br>
a tif using gdalwarp, the location (as visible in QGIS or after using<br>
gdal2tiles on a map) changes. It is visible when checking the bounds<br>
using QGIS.<br>
It is also noticeable when checking the bounds with rasterio:<br>
<br>
```<br>
orig.tif<br>
EPSG:27573<br>
bounds [828662.0710931281, 3203193.9700861075, 829595.8710931281,<br>
3204344.6700861077]<br>
EPSG:27573 bounds [828662.0710931281, 3203193.9700861075,<br>
829595.8710931281, 3204344.6700861077]<br>
EPSG:3857 bounds [578066.9358574335, 5479808.142856716,<br>
579420.0775091586, 5481457.907968456]<br>
EPSG:4326 bounds [5.192863637248721, 44.09275933293886,<br>
5.205019115521942, 44.103402376252255] <----- 1<br>
gdalwarp -t_srs EPSG:3857 orig.tif repro.tif<br>
repro.tif<br>
EPSG:3857<br>
bounds [608015.5294828439, 6272484.913981743, 609507.0864301398,<br>
6274297.75045133]<br>
EPSG:27573 bounds [829484.0038619096, 3748101.0103735547,<br>
830512.7970793804, 3749330.248761157]<br>
EPSG:3857 bounds [608015.5294828439, 6272484.913981743,<br>
609507.0864301398, 6274297.75045133]<br>
EPSG:4326 bounds [5.46189643116462, 48.98599229672266, 5.475295315193526,<br>
48.99667806803407]  <----- 2<br>
gdalwarp -t_srs EPSG:27573 repro.tif back.tif<br>
back.tif<br>
EPSG:27573<br>
bounds [829484.0038619096, 3748101.034601565, 830512.7912119445,<br>
3749330.2487611575]<br>
EPSG:27573 bounds [829484.0038619096, 3748101.034601565,<br>
830512.7912119445, 3749330.2487611575]<br>
EPSG:3857 bounds [607947.003095218, 6272428.113526381, 609575.9130150724,<br>
6274354.58877996]<br>
EPSG:4326 bounds [5.461280848150926, 48.98565744919683,<br>
5.475913594925499, 48.99701306471833]  <----- 3<br>
```<br>
<br>
The accompanying python code is three times like the following<br>
```<br>
input_file = folder + 'orig.tif'<br>
img = rasterio.open(input_file)<br>
print('orig.tif')<br>
print(img.crs)<br>
print('bounds', list(warp.transform_bounds(img.crs, img.crs,<br>
*img.bounds)))<br>
print('EPSG:27573 bounds',list(warp.transform_bounds(img.crs,<br>
'EPSG:27573', *img.bounds)))<br>
print('EPSG:3857 bounds',list(warp.transform_bounds(img.crs, 'EPSG:3857',<br>
*img.bounds)))<br>
print('EPSG:4326 bounds', list(warp.transform_bounds(img.crs,<br>
'EPSG:4326', *img.bounds)))<br>
```<br>
<br>
As the arrows show, the bounds change between 1 and 2 (this is the<br>
unexpected behaviour for me). Yet they don’t change when projecting back.<br>
<br>
I am unsure if this is a bug in GDAL, something weird with this specific<br>
EPSG or the source tif. Any further steps for investigation or ideas<br>
would be very welcome<br>
<br>
Many thanks<br>
<br>
Evert<br>
_______________________________________________<br>
gdal-dev mailing list<o:p></o:p></span></p>
</blockquote>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><a href="mailto:gdal-dev@.osgeo">gdal-dev@.osgeo</a><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WcvmUQ4g9%2FEBwzFxF4d4vWX3OlQwQmVvyNUAVCvrj4A%3D&amp;reserved=0">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WcvmUQ4g9%2FEBwzFxF4d4vWX3OlQwQmVvyNUAVCvrj4A%3D&amp;reserved=0</a><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
_______________________________________________<br>
gdal-dev mailing list<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><a href="mailto:gdal-dev@.osgeo">gdal-dev@.osgeo</a><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br style="caret-color: rgb(0, 0, 0);font-variant-caps: normal;text-align:start;-webkit-text-stroke-width: 0px;word-spacing:0px">
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WcvmUQ4g9%2FEBwzFxF4d4vWX3OlQwQmVvyNUAVCvrj4A%3D&amp;reserved=0">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WcvmUQ4g9%2FEBwzFxF4d4vWX3OlQwQmVvyNUAVCvrj4A%3D&amp;reserved=0</a><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
<br>
<br>
<br>
<br>
--<br>
Sent from:<span class="apple-converted-space"> </span></span><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fosgeo-org.1560.x6.nabble.com%2FGDAL-Dev-f3742093.html&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3FP%2Fo4GIWEzFS9CUz0cjEVbT02XPgKCoTnI%2F6EC%2Bhzw%3D&amp;reserved=0"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fosgeo-org.1560.x6.nabble.com%2FGDAL-Dev-f3742093.html&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3FP%2Fo4GIWEzFS9CUz0cjEVbT02XPgKCoTnI%2F6EC%2Bhzw%3D&amp;reserved=0</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
_______________________________________________<br>
gdal-dev mailing list<br>
</span><a href="mailto:gdal-dev@lists.osgeo.org"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">gdal-dev@lists.osgeo.org</span></a><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif"><br>
</span><a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WcvmUQ4g9%2FEBwzFxF4d4vWX3OlQwQmVvyNUAVCvrj4A%3D&amp;reserved=0"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&amp;data=04%7C01%7Cevert.etienne%40sitemark.com%7C3300bad68a154491a2d308d8868a300f%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637407275358259724%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WcvmUQ4g9%2FEBwzFxF4d4vWX3OlQwQmVvyNUAVCvrj4A%3D&amp;reserved=0</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>