<div dir="ltr"><div>Hi Elena</div><div><br></div><div>I see that you are converting to ED50, a very old system. I assume that you <i>have to</i> do it, instead of ETRS89 (I'm sorry about that).<br></div><div>How big is the reprojection error? I do not find that in your previous email. To get a proper transformation you need a grid file (<a href="https://cdn.proj.org/es_ign_SPED2ETV2.tif">es_ign_SPED2ETV2.tif</a>). I do not know if it is supported in gdal 2.4.4</div><div>The transformation from ED50 to ETRS89 is defined in different ways in different locations.</div><div><br></div><div>Cheers,</div><div>Javier<br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 1 Feb 2023 at 18:06, Elena Ruiz <<a href="mailto:eruiz@aplitop.com">eruiz@aplitop.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg928546427137000334">
<div style="overflow-wrap: break-word;" lang="ES">
<div class="m_928546427137000334WordSection1">
<p class="MsoNormal"><span lang="PT">Hello, thank you very much for answering, I have added the "-r bilinear" option to the gdalwarp command and this solves the distortion problem, but the reprojection is still wrong with the coordinates of the drawing matching
those of the image, and the drawing does not fit the image as it does the original image. How do I have to call gdalwarp so that it does the reprojection correctly, that is, in addition to modifying the image that changes the coordinates and the image projection
system? Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="PT"><u></u> <u></u></span></p>
<table style="font-family:Arial" width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup style="font-family:Calibri"></colgroup><tbody><tr><td><font style="font-family:Calibri" color="#b77540">
</font></td></tr></tbody><colgroup><col style="font-family:Calibri" width="90">
<col style="font-family:Calibri"></colgroup>
<tbody>
<tr style="font-family:Calibri"><td><font style="font-family:Calibri" color="#b77540"></font></td></tr>
<tr>
<td valign="middle" align="left">
<p style="font-size:10pt;font-family:Calibri;font-weight:bold;color:rgb(82,157,36);padding-bottom:7px;margin:0px"> </p>
<p style="font-size:10pt;font-family:Calibri">
</p><table style="height:254px;width:691px">
<tbody>
<tr>
<td style="font-size:10pt;height:6px;font-family:Calibri;width:560px" colspan="2" valign="top"><span style="font-family:Calibri"></span><span style="font-size:10pt">
<hr>
</span></td></tr>
<tr>
<td style="font-size:10pt;height:0px;font-family:Calibri;width:330px" rowspan="2" valign="top">
<p style="font-size:10pt;font-family:Calibri"><font style="font-size:12pt;font-family:Calibri"><strong style="font-family:Calibri"><font color="#000000">Elena Ruiz</font></strong></font> <br><br><img style="height: 55px; width: 166px;" width="166" height="55" border="0"><br>Sofware Development & Technical Support<br>Tel.:
+34 952 43 97 71<br><a href="mailto:eruiz@aplitop.com" target="_blank">eruiz@aplitop.com</a><br><strong><font color="#3a567e"><a href="http://www.aplitop.com" target="_blank">www.aplitop.com</a></font></strong></p>
<p style="font-size:10pt;font-family:Calibri"> </p></td></tr></tbody></table><p></p>
<p style="font-size:10pt;font-family:Calibri"><span style="font-family:Calibri"><span style="font-size:10pt"><span style="font-size:10pt"><span style="font-size:10pt"><span style="font-size:10pt"><span style="font-size:10pt"><span style="font-size:10pt"><span style="font-size:10pt"><a title="" href="http://www.aplitop.com/Product/es/6/5/tcptunnel" target="_blank"></a></span></span></span></span></span></span></span></span> </p></td></tr>
<tr></tr></tbody></table>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<colgroup>
<col></colgroup>
<tbody>
<tr>
<td style="font-size:9px;font-family:Verdana;color:rgb(166,166,166);text-align:justify;padding-top:15px;line-height:11px" valign="top">
<p style="font-size:9px;font-family:Verdana" align="left"><a title="" href="http://www.aplitop.com/New/es/281/mdt-75-a-la-venta" target="_blank"></a> </p>
<p style="font-size:9px;font-family:Verdana"><br><br> </p></td></tr></tbody></table>
<p style="font-size:10pt;font-family:Arial"></p>
<p style="font-size:10pt;font-family:Arial"></p><div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span>De:</span></b><span> Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>>
<br>
<b>Enviado el:</b> miércoles, 1 de febrero de 2023 16:58<br>
<b>Para:</b> Elena Ruiz <<a href="mailto:eruiz@aplitop.com" target="_blank">eruiz@aplitop.com</a>>; <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<b>Asunto:</b> Re: [gdal-dev] Image reprojection with GDALWARP<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p>Try adding -r bilinear or -r bicubic. By default gdalwarp performs nearest resampling which is rarely what you need for high quality results<u></u><u></u></p>
<div>
<p class="MsoNormal">Le 01/02/2023 à 16:44, Elena Ruiz a écrit :<u></u><u></u></p>
</div>
<blockquote style="margin-top:5pt;margin-bottom:5pt">
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">Hi, I'm trying to reproject images from WGS 84 / Pseudo-Mercator EPSG:3857 to ED50 / UTM zone 30N EPSG:23030, but the resulting image doesn't adapt well to drawing. I will explain it in more detail so that you understand:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">I have an image in EPSG:3857, the result of a WMTS service, and a drawing in the same SRS, as you can see in the image the drawing matches the image perfectly.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">Image source with drawing: <a href="https://aplitop.sharefile.com/d-s4d6dcf6d8ff34023a8b6e95277519c56" target="_blank">
https://aplitop.sharefile.com/d-s4d6dcf6d8ff34023a8b6e95277519c56</a></span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">I want to convert the previous image to EPSG:23030 and I have used gdalwarp command with different parameters and I get the same result :</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">1</span><i><span style="font-family:"Arial",sans-serif" lang="PT">.gdalwarp -s_srs EPSG:3857 -t_srs EPSG:23030 -co "TFW=YES" -overwrite "C:\Users\elena\Downloads\Nueva carpeta\imagen_t.tif" "C:\Users\elena\Downloads\Nueva
carpeta\nueva_6.tif"</span></i><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">2.</span><i><span style="font-family:"Arial",sans-serif" lang="PT">gdalwarp -s_srs EPSG:3857 -t_srs EPSG:23030 -te 335000 4084501.25 335550 4084848.75 -co "TFW=YES" -overwrite "C:\Users\elena\Downloads\Nueva carpeta\imagen_t.tif"
"C:\Users\elena\Downloads\Nueva carpeta\nueva_6.tif"</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="font-family:"Arial",sans-serif" lang="PT"> </span></i><u></u><u></u></p>
<p class="MsoNormal">And the resulting image, in addition to noticing that the road is distorted (like a staircase effect), does not match the drawing.<u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">Image destination with drawing: </span><a href="https://aplitop.sharefile.com/d-s98f76513feb34c268764c0492ccb40d3" target="_blank"><span lang="PT">https://aplitop.sharefile.com/d-s98f76513feb34c268764c0492ccb40d3</span></a><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">Zoom of image destination: </span><a href="https://aplitop.sharefile.com/d-sf9a270a9300e4ac796eddeac7131a058" target="_blank"><span lang="PT">https://aplitop.sharefile.com/d-sf9a270a9300e4ac796eddeac7131a058</span></a><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">I have also done the test from EPSG:23030 to EPSG:25830 and it does not do well either.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="PT">I am using the version of gdal 2.4.4 for x64, this is the link to download the source and destination image:
<a href="https://aplitop.sharefile.com/d-sdae2552bd2054fdf8cc29ce5b559e278" target="_blank">https://aplitop.sharefile.com/d-sdae2552bd2054fdf8cc29ce5b559e278</a> , I hope someone can help me and tell me if there is something wrong. Regards</span><u></u><u></u></p>
<div class="MsoNormal" style="text-align:center" align="center"><span>
<hr width="100%" size="2" align="center">
</span></div>
<table style="width:354.75pt" width="473" cellpadding="0" border="0">
<tbody>
<tr style="height:18.75pt">
<td style="padding:0.75pt;height:18.75pt">
<p style="text-align:right" align="right"><span style="font-size:10pt;font-family:"Arial",sans-serif"><img style="width: 1.3229in; height: 1.177in;" id="m_928546427137000334_x0000_i1030" width="127" height="113" border="0"></span><span style="font-size:10pt;font-family:"Arial",sans-serif"><u></u><u></u></span></p>
</td>
<td style="width:247.5pt;padding:0.75pt;height:18.75pt" width="330" valign="top">
<p class="MsoNormal" style="line-height:9.75pt"><strong><span style="font-size:9pt;font-family:"Myriad Pro",sans-serif">Elena Ruiz
</span></strong><span style="font-size:12pt;font-family:"Times New Roman",serif"><br>
</span><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif">Sofware Development & Technical Support<br>
Tel. +34 952 43 97 71 <br>
<a href="mailto:eruiz@aplitop.com" target="_blank">eruiz@aplitop.com</a><br>
Sumatra, 9 - 29190 Málaga (Spain)<br>
<strong><span style="font-family:"Myriad Pro",sans-serif"><a href="http://www.aplitop.com" target="_blank">www.aplitop.com</a></span></strong><b><br>
<br>
</b></span><a href="https://www.facebook.com/AplitopSL/" target="_blank"><b><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif;text-decoration:none"><img style="width: 0.1562in; height: 0.1562in;" id="m_928546427137000334Imagen_x0020_3" src="cid:1860e1b0bed4cff311" width="15" height="15" border="0"></span></b></a><strong><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif">
</span></strong><a href="https://twitter.com/aplitop" target="_blank"><b><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif;text-decoration:none"><img style="width: 0.1562in; height: 0.1562in;" id="m_928546427137000334Imagen_x0020_4" src="cid:1860e1b0bed5b16b22" width="15" height="15" border="0"></span></b></a><strong><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif">
</span></strong><a href="https://www.linkedin.com/company/aplitop" target="_blank"><b><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif;text-decoration:none"><img style="width: 0.1562in; height: 0.1562in;" id="m_928546427137000334Imagen_x0020_5" src="cid:1860e1b0bee692e333" width="15" height="15" border="0"></span></b></a><strong><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif">
</span></strong><a href="https://www.youtube.com/user/aplitop" target="_blank"><b><span style="font-size:7pt;font-family:"Myriad Pro",sans-serif;text-decoration:none"><img style="width: 0.1562in; height: 0.1562in;" id="m_928546427137000334Imagen_x0020_6" src="cid:1860e1b0bee7745b44" width="15" height="15" border="0"></span></b></a><span style="font-size:12pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
<p style="margin-bottom:12pt"><span style="font-size:6pt;font-family:"Myriad Pro",sans-serif">In accordance with the provisions of the European Regulation of Data Protection 2016/679 (Reglamento Europeo de Protección de Datos 2016/679), we inform you that
the data and the information you provide us through this medium will be used by APLITOP, S.L., with C.I.F. B-92543396 and with address at C / Sumatra, 9, Malaga, 29190, in order to answer your questions and inform you about our products. The data provided
will be kept as long as it does not request its cessation and will not be transferred to third parties except in cases where there is a legal obligation. You have the right to access your personal data, correct inaccurate data or request its deletion when
the data is no longer necessary for the purposes that were collected, as well as any rights recognized in the RGPD 2016/679</span><span style="font-size:10pt;font-family:"Arial",sans-serif"><u></u><u></u></span></p>
<p style="margin-bottom:12pt"><span style="font-size:6pt;font-family:"Myriad Pro",sans-serif"><br>
<br>
<br>
<br>
</span><span style="font-size:10pt;font-family:"Arial",sans-serif"><u></u><u></u></span></p>
<p class="MsoNormal"><span><br>
<br>
<u></u><u></u></span></p>
<pre>_______________________________________________<u></u><u></u></pre>
<pre>gdal-dev mailing list<u></u><u></u></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><u></u><u></u></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><u></u><u></u></pre>
</blockquote>
<pre>-- <u></u><u></u></pre>
<pre><a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><u></u><u></u></pre>
<pre>My software is free, but my time generally not.<u></u><u></u></pre>
</div>
</div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></blockquote></div>