[gdal-dev] problem with wrong corner coordinates in a projected raster
Sam McClatchie
smcclatchie at fishocean.info
Thu Dec 22 12:53:32 PST 2022
Colleagues
I want to georeference and project a raster image. I have an incorrect
result where the image is improperly projected, and I am unsure why.
The original image is "SST_plot_New_Zealand_Whangarei_clahe.tif"
<http://u.pc.cd/fy8>. (Note: I used links to my cloud server directory
to avoid sending attachments to the list). I created this image with
known bounding box limits:
/snip
# elif region == "New_Zealand_Whangarei":
# lat_min = (-36.0) # needs to exactly match the ERDDAP
lat/lon ranges
# lat_max = (-35.0)
# lon_min = (172.5)
# lon_max = (175.0)
/end snip
I used these commands in the command line:
gdal_translate -of GTiff -outsize 1400 0 -a_srs EPSG:3857 -a_ullr 172.5
-35.0 175.0 -36.0 ./SST_plot_New_Zealand_Whangarei_clahe.tif
./test_trans.tif
gdalwarp ./test_trans.tif ./test_proj.tif
The result from gdal translate is test_trans.tif
<http://u.pc.cd/D4EctalK>. The result from gdal warp is test_proj.tif
<http://u.pc.cd/a2actalK>. The problem, as you will see in the
./test_proj.tif file, is that the corner coordinates are not projected,
which means the file is not properly projected. I'm obviously making a
mistake.Would someone mind helping me to correct my error, please?
Best fishes
Sam
---
email signature Sam McClatchie (fisheries oceanographer)
& Elena Turin (accounting & auditing)
FishOcean Enterprises Ltd
<https://www.nzbn.govt.nz/mynzbn/nzbndetails/9429049352344/?sw=>
www.fishocean.info <http://www.fishocean.info>
38 Upland Rd, Huia, Auckland 0604, New Zealand
cell: 027 752 8495
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221223/c7844c49/attachment.htm>
More information about the gdal-dev
mailing list