I have a tif file with the projection USER: 100032. And I want to reproject it to EPSG: 4326. I have previously done it in a similar way for a similar projection and used gdal.Warp(). The physical place is the same in the world (Alaska), but now it seems to change both the extent and most importantly the pixel size.
I have tried this solution, but it did not seem to work.
How can I make sure, I save the resolution, extent and the pixel size?
Here is the information:
Previously projected 100032 to 4326
CRS EPSG:4326 - WGS 84 - Geographic
Extent -179.7565878540000028,41.0971949020000054 : 179.9819728149999207,73.2747258849999952
Unit degrees
Width 596
Height 130
Dimensions X: 596 Y: 130 Bands: 1
Origin -179.757,73.2747
Pixel Size 0.6035881890419462215,-0.2475194690999999447
New GeoTIF projected 100032 to 4326
CRS EPSG:4326 - WGS 84 - Geographic
Extent -179.9999232519033967,0.5107936126474186 : 179.6827057096168119,85.4634587402992878
Unit degrees
Width 725
Height 171
Dimensions X: 725 Y: 171 Bands: 1
Origin -180,85.4635
Pixel Size 0.496113970981407193,-0.4967992112728179532
This is the gdal.Warp process that happens
gdalwarp -s_srs "+proj=lcc +lat_1=50.00000381469727 +lat_0=50.00000381469727 +lon_0=-107.0000076293945 +k_0=1 +x_0=0 +y_0=0 +a=6367470 +b=6367470 +units=km +no_defs" -t_srs EPSG:4326 -r near -of GTiff
I eventually need to turn these into nc files so I can calculate some things, but the latitude and longitude are for now completely off, so it will not work. I will only get 0's as the spatial resolutions are not equal.
How can I make sure the Extent and Pixel size are similar in the new projection as they were in the old projection?