[gdal-dev] Image reprojection with GDALWARP

Elena Ruiz eruiz at aplitop.com
Wed Feb 1 09:06:22 PST 2023


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




________________________________


Elena Ruiz

[https://www.aplitop.com/descargas/logo.png]
Sofware Development & Technical Support
Tel.: +34 952 43 97 71
eruiz at aplitop.com
www.aplitop.com




<http://www.aplitop.com/Product/es/6/5/tcptunnel>


<http://www.aplitop.com/New/es/281/mdt-75-a-la-venta>




De: Even Rouault <even.rouault at spatialys.com>
Enviado el: miércoles, 1 de febrero de 2023 16:58
Para: Elena Ruiz <eruiz at aplitop.com>; gdal-dev at lists.osgeo.org
Asunto: Re: [gdal-dev] Image reprojection with GDALWARP


Try adding -r bilinear or -r bicubic. By default gdalwarp performs nearest resampling which is rarely what you need for high quality results
Le 01/02/2023 à 16:44, Elena Ruiz a écrit :

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:

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.
Image source with drawing: https://aplitop.sharefile.com/d-s4d6dcf6d8ff34023a8b6e95277519c56

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 :

1.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"
2.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"

And the resulting image, in addition to noticing that the road is distorted (like a staircase effect), does not match the drawing.
Image destination with drawing: https://aplitop.sharefile.com/d-s98f76513feb34c268764c0492ccb40d3
Zoom of image destination: https://aplitop.sharefile.com/d-sf9a270a9300e4ac796eddeac7131a058

I have also done the test from EPSG:23030 to EPSG:25830 and it does not do well either.
I am using the version of gdal 2.4.4 for x64, this is the link to download the source and destination image: https://aplitop.sharefile.com/d-sdae2552bd2054fdf8cc29ce5b559e278 , I hope someone can help me and tell me if there is something wrong. Regards
________________________________

[https://www.aplitop.com/descargas/firma1.jpg]

Elena Ruiz
Sofware Development & Technical Support
Tel. +34 952 43 97 71
eruiz at aplitop.com<mailto:eruiz at aplitop.com>
Sumatra, 9 - 29190 Málaga (Spain)
www.aplitop.com<http://www.aplitop.com>

[cid:image001.png at 01D93667.DFD85B50]<https://www.facebook.com/AplitopSL/>   [cid:image002.png at 01D93667.DFD85B50] <https://twitter.com/aplitop>    [cid:image003.png at 01D93667.DFD85B50] <https://www.linkedin.com/company/aplitop>    [cid:image004.png at 01D93667.DFD85B50] <https://www.youtube.com/user/aplitop>


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







_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230201/2a6928df/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 365 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230201/2a6928df/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 619 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230201/2a6928df/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 468 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230201/2a6928df/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 817 bytes
Desc: image004.png
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230201/2a6928df/attachment-0007.png>


More information about the gdal-dev mailing list