Closed Chris-Schnaufer closed 3 years ago
Hi @Chris-Schnaufer,
I have been thinking on a way to fix this rotation problem. I have some ideas, as soon as I get more improvment on that I will get back to you. Thank you for your suggestion..!!!
Let me know if you have any other idea.
All the best, Filipe
Hi @Chris-Schnaufer ,
I just uploaded the new version of FIELDimageR (0.2.8). In this version, I fixed the rotation issue. Now, it's possible to fit the shapefile back to the original image using the same CRS.
For more information: (1) https://github.com/OpenDroneMap/FIELDimageR#P3 (2) https://github.com/OpenDroneMap/FIELDimageR#P5
Thank you for your suggestions...!
All the best, Filipe
Rotating the image in the instructions causes the image to reproject. This causes the rotated image to have incorrect geographic coordinates. The pixels need to be rotated and the geographic information to remain intact.
A way to think about this is recognizing that the original image covers a certain area of the ground; represented by the geographic coordinate system and the image geographic extents. When the rotation step is performed, the image still represents the exact same geographic coordinate system and extents as the original image, only the pixel representation is different.
The following, unassociated, link shows the effect of the reprojection geographically: https://gis.stackexchange.com/questions/131465/gdal-rotate-dem (first response, under Update). As can be seen, the image is now covering a different geographic area after rotation.
The two images in the Rotating the image section display the same area of ground, only the pixel representation has changed.
What worked for me I couldn't find an easy way to rotate the pixels in
R
, not a strong language for me. What I was able to do is assign the Crop crs and extent back to the rotated image as follows:Having a background in GIS, I need to point out that this is an inexact solution that may be considered "close enough".