Hi,
I’ve been having some issues with using GPT to perform a terrain correction of a Sentinel-1 Product and output to a GeoTiff using the AUTO:42001 map projection.
If I run the command below, it does generate an output but the spatial reference is EPSG:4326. Is this a bug or do i need to edit my command?
gpt Terrain-Correction -Ssource=“C:\testing\S1A_IW_GRDH_1SDV_20180806T175121_20180806T175146_023129_028321_19BB.zip” -PnodataValueAtSea=False -PimgResamplingMethod=BILINEAR_INTERPOLATION -PmapProjection=“AUTO:42001” -PsourceBands=Amplitude_VV -t "C:\testing\terrain_correction_utm.tif
My gdalinfo output shows the spatial reference as WGS 84:
Driver: GTiff/GeoTIFF
Files: .\terrain_correction_utm.tif
Size is 29158, 21577
Coordinate System is:
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]]
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,21577.0)
Upper Right (29158.0, 0.0)
Lower Right (29158.0,21577.0)
Center (14579.0,10788.5)
Band 1 Block=29158x1 Type=Float32, ColorInterp=Gray
Im using Windows 10 and my SNAP environment is as follows:
SNAP Desktop implementation version: 6.0.0
SNAP Engine implementation version: 6.0.0
JRE: Java™ SE Runtime Environment 1.8.0_102-b14
JVM: Java HotSpot™ 64-Bit Server VM by Oracle Corporation
Memory: 10013 MiB
Any help is much appreciated, thanks.
EDIT 1
I’ve just run this again but saved my output to DIM format and it does honor the AUTO:42001 map projection. Is this the desired functionality i.e. use DIM format for output then use Convert-DataType to produce a GeoTiff?
EDIT 2
I’ve just run the workflow using Terrain-Correction (AUTO:42001, output to DIM) and then Convert-DataType (DIM to GeoTiff).
Terrain Correction
gpt Terrain-Correction -Ssource=“C:\testing\S1A_IW_GRDH_1SDV_20180806T175121_20180806T175146_023129_028321_19BB.zip” -PnodataValueAtSea=False -PimgResamplingMethod=BILINEAR_INTERPOLATION -PmapProjection=“AUTO:42001” -PsourceBands=Amplitude_VV -t "C:\testing\terrain_correction_utm.dim"
Convert Data Type
gpt Convert-DataType -Ssource="C:\testing\terrain_correction_utm.dim" -PsourceBands=Amplitude_VV - PtargetDataType=float32 -PtargetNoDataValue=0 -PtargetScalingStr=Truncate -t "C:\testing\terrain_utm_gptconvert.tif"
Now I have the situation where my terrain_correction_utm.dim file is using WGS 84 / Auto UTM but after running Convert-DataType my output GeoTiff, terrain_utm_gptconvert.tif, is output using WGS84 GCS. Interestingly the coordinates are not in degrees. The output from gdalinfo is shown below:
Driver: GTiff/GeoTIFF
Files: .\terrain_utm_gptconvert.tif
Size is 29158, 21577
Coordinate System is:
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0],
UNIT[“degree”,0.0174532925199433],
AUTHORITY[“EPSG”,“4326”]]
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0,21577.0)
Upper Right (29158.0, 0.0)
Lower Right (29158.0,21577.0)
Center (14579.0,10788.5)
If I use gdal_translate to perform the conversion from the terrain_correction_utm.data\Amplitude_VV.img file to GeoTiff i get the desired result:
gdal_translate -of GTiff "C:\testing\terrain_correction_utm.data\Amplitude_VV.img" "C:\testing\terrain_utm_gdalconvert.tif"
Driver: GTiff/GeoTIFF
Files: .\terrain_utm_gdalconvert.tif
Size is 29158, 21577
Coordinate System is:
PROJCS[“WGS 84 / UTM zone 30N”,
GEOGCS[“WGS 84”,
DATUM[“WGS_1984”,
SPHEROID[“WGS 84”,6378137,298.257223563,
AUTHORITY[“EPSG”,“7030”]],
AUTHORITY[“EPSG”,“6326”]],
PRIMEM[“Greenwich”,0,
AUTHORITY[“EPSG”,“8901”]],
UNIT[“degree”,0.0174532925199433,
AUTHORITY[“EPSG”,“9122”]],
AUTHORITY[“EPSG”,“4326”]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“latitude_of_origin”,0],
PARAMETER[“central_meridian”,-3],
PARAMETER[“scale_factor”,0.9996],
PARAMETER[“false_easting”,500000],
PARAMETER[“false_northing”,0],
UNIT[“metre”,1,
AUTHORITY[“EPSG”,“9001”]],
AXIS[“Easting”,EAST],
AXIS[“Northing”,NORTH],
AUTHORITY[“EPSG”,“32630”]]
Origin = (387138.158923594750000,6562402.211472293400000)
Pixel Size = (10.000000000000000,-10.000000000000000)
Metadata:
AREA_OR_POINT=Area
Band_1=Amplitude_VV
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 387138.159, 6562402.211) ( 4d58’30.99"W, 59d11’ 8.55"N)
Lower Left ( 387138.159, 6346632.211) ( 4d52’13.84"W, 57d14’55.71"N)
Upper Right ( 678718.159, 6562402.211) ( 0d 7’34.51"E, 59d 9’47.18"N)
Lower Right ( 678718.159, 6346632.211) ( 0d 2’21.75"W, 57d13’40.22"N)
Center ( 532928.159, 6454517.211) ( 2d26’21.53"W, 58d13’50.04"N)