Friday 1 June 2018

coordinate system - How to transform any GeoTIFF to Lambert Azimuthal Equal Area with GDAL?


I am trying to transform a GeoTIFF EPSG:4326 +proj=longlat +datum=WGS84 +no_defs and a GeoTIFF EPSG:31982 +proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs both to EPSG:102020 +proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs


Command used:



gdal_translate -a_srs "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -of GTiff "source path" "target path"

Results:


The target file for EPSG:4326 seems to be in the right place, but in wrong scale (pixel size unchanged). The target file for EPSG:31982 seems to be in the right scale, but in wrong place.


I already tried the following commands:


gdalwarp -overwrite -s_srs "+proj=longlat +datum=WGS84 +no_defs" -t_srs "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -r near -multi -of GTiff "source path" "target path"

and


gdalwarp -overwrite -s_srs "+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" -t_srs "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" -r near -multi -of GTiff "source path" "target path"


Both results seems to be in wrong place and wrong angle (rotated).


How to solve this geotransformation with GDAL?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...