<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@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;}
@font-face
{font-family:"Myriad Pro";
panose-1:2 11 7 3 3 4 3 2 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML con formato previo Car";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLconformatoprevioCar
{mso-style-name:"HTML con formato previo Car";
mso-style-priority:99;
mso-style-link:"HTML con formato previo";
font-family:Consolas;
mso-fareast-language:EN-US;}
span.EstiloCorreo23
{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 3.0cm 70.85pt 3.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="ES" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<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<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PT"><o:p> </o:p></span></p>
<TABLE style="FONT-FAMILY: Arial" cellSpacing=0 cellPadding=0 width="100%"
border=0>
<COLGROUP style="FONT-FAMILY: Calibri"><FONT style="FONT-FAMILY: Calibri"
color=#b77540>
<COL style="FONT-FAMILY: Calibri" width=90>
<COL style="FONT-FAMILY: Calibri"></COL></COL></FONT></COLGROUP>
<TBODY>
<TR style="FONT-FAMILY: Calibri"><FONT style="FONT-FAMILY: Calibri"
color=#b77540></FONT></TR>
<TR>
<TD vAlign=middle align=left>
<P
style="FONT-SIZE: 10pt; FONT-FAMILY: Calibri; FONT-WEIGHT: bold; COLOR: #529d24; PADDING-BOTTOM: 7px; MARGIN: 0px"> </P>
<P style="FONT-SIZE: 10pt; FONT-FAMILY: Calibri">
<TABLE style="HEIGHT: 254px; WIDTH: 691px">
<TBODY>
<TR>
<TD
style="FONT-SIZE: 10pt; HEIGHT: 6px; FONT-FAMILY: Calibri; WIDTH: 560px"
vAlign=top colSpan=2><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"
vAlign=top rowSpan=2>
<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" border=0
src="https://www.aplitop.com/descargas/logo.png" width=166
height=55><BR>Sofware Development & Technical Support<BR>Tel.:
+34 952 43 97 71<BR>eruiz@aplitop.com<BR><STRONG><FONT
color=#3a567e>www.aplitop.com</FONT></STRONG></P>
<P
style="FONT-SIZE: 10pt; FONT-FAMILY: Calibri"> </P></TD></TR></TBODY></TABLE></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"></A></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN> </P></TD></TR>
<TR></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<COLGROUP>
<COL></COL></COLGROUP>
<TBODY>
<TR>
<TD
style="FONT-SIZE: 9px; FONT-FAMILY: Verdana; COLOR: #a6a6a6; 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"></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:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:ES">De:</span></b><span style="mso-fareast-language:ES"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Enviado el:</b> miércoles, 1 de febrero de 2023 16:58<br>
<b>Para:</b> Elena Ruiz <eruiz@aplitop.com>; gdal-dev@lists.osgeo.org<br>
<b>Asunto:</b> Re: [gdal-dev] Image reprojection with GDALWARP<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></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<o:p></o:p></p>
<div>
<p class="MsoNormal">Le 01/02/2023 à 16:44, Elena Ruiz a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></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><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></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><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">Image source with drawing: <a href="https://aplitop.sharefile.com/d-s4d6dcf6d8ff34023a8b6e95277519c56">
https://aplitop.sharefile.com/d-s4d6dcf6d8ff34023a8b6e95277519c56</a></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></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><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">1</span><i><span lang="PT" style="font-family:"Arial",sans-serif">.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><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">2.</span><i><span lang="PT" style="font-family:"Arial",sans-serif">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><o:p></o:p></p>
<p class="MsoNormal"><i><span lang="PT" style="font-family:"Arial",sans-serif"> </span></i><o:p></o:p></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.<o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">Image destination with drawing: </span><a href="https://aplitop.sharefile.com/d-s98f76513feb34c268764c0492ccb40d3"><span lang="PT">https://aplitop.sharefile.com/d-s98f76513feb34c268764c0492ccb40d3</span></a><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT">Zoom of image destination: </span><a href="https://aplitop.sharefile.com/d-sf9a270a9300e4ac796eddeac7131a058"><span lang="PT">https://aplitop.sharefile.com/d-sf9a270a9300e4ac796eddeac7131a058</span></a><o:p></o:p></p>
<p class="MsoNormal"><span lang="PT"> </span><o:p></o:p></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><o:p></o:p></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">https://aplitop.sharefile.com/d-sdae2552bd2054fdf8cc29ce5b559e278</a> , I hope someone can help me and tell me if there is something wrong. Regards</span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="mso-fareast-language:ES">
<hr size="2" width="100%" align="center">
</span></div>
<table class="MsoNormalTable" border="0" cellpadding="0" width="473" style="width:354.75pt">
<tbody>
<tr style="height:18.75pt">
<td style="padding:.75pt .75pt .75pt .75pt;height:18.75pt">
<p align="right" style="text-align:right"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><img border="0" width="127" height="113" style="width:1.3229in;height:1.177in" id="_x0000_i1030" src="https://www.aplitop.com/descargas/firma1.jpg"></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
</td>
<td width="330" valign="top" style="width:247.5pt;padding:.75pt .75pt .75pt .75pt;height:18.75pt">
<p class="MsoNormal" style="line-height:9.75pt"><strong><span style="font-size:9.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES">Elena Ruiz
</span></strong><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:ES"><br>
</span><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES">Sofware Development & Technical Support<br>
Tel. +34 952 43 97 71 <br>
<a href="mailto:eruiz@aplitop.com">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">www.aplitop.com</a></span></strong><b><br>
<br>
</b></span><a href="https://www.facebook.com/AplitopSL/"><b><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES;text-decoration:none"><img border="0" width="15" height="15" style="width:.1562in;height:.1562in" id="Imagen_x0020_3" src="cid:image001.png@01D93667.DFD85B50"></span></b></a><strong><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES">
</span></strong><a href="https://twitter.com/aplitop"><b><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES;text-decoration:none"><img border="0" width="15" height="15" style="width:.1562in;height:.1562in" id="Imagen_x0020_4" src="cid:image002.png@01D93667.DFD85B50"></span></b></a><strong><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES">
</span></strong><a href="https://www.linkedin.com/company/aplitop"><b><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES;text-decoration:none"><img border="0" width="15" height="15" style="width:.1562in;height:.1562in" id="Imagen_x0020_5" src="cid:image003.png@01D93667.DFD85B50"></span></b></a><strong><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES">
</span></strong><a href="https://www.youtube.com/user/aplitop"><b><span style="font-size:7.0pt;font-family:"Myriad Pro",sans-serif;mso-fareast-language:ES;text-decoration:none"><img border="0" width="15" height="15" style="width:.1562in;height:.1562in" id="Imagen_x0020_6" src="cid:image004.png@01D93667.DFD85B50"></span></b></a><span style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:ES"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p style="margin-bottom:12.0pt"><span style="font-size:6.0pt;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:10.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p style="margin-bottom:12.0pt"><span style="font-size:6.0pt;font-family:"Myriad Pro",sans-serif"><br>
<br>
<br>
<br>
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:ES"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>gdal-dev mailing list<o:p></o:p></pre>
<pre><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</body>
</html>