Hello,
I am working with Snappy Python. I am trying to preprocess a Sentinel 1 GRD, IW product. Unfortunately the final output does’t match the intended area (green square in image) fully and the borders look wonky. Has anyone dealt with a similar matter?
These are the steps I am taking for Preprocessing:
a. Subset
b. Apply Orbit FIle c. Thermal Noise Removal
d. Radiometric Calibration
c. Speckle Filtering
d. Terrain Correction
e. BandMaths RVI
I think I might have an error either in subset or Terrain Correction part.
Some additional info:
Shapefile and initial S1C image are in EPSG:4326 - WGS:84
Subset is set with these parameters:
geom=str(shapefile['geometry'][area])
geom = WKTReader().read(geom)
parameters = snappy.HashMap()
parameters.put('copyMetadata', True)
parameters.put('geoRegion', geom)
subset = snappy.GPF.createProduct('Subset', parameters, s1_read)
Terrain correction is set with these parameters:
proj = '''PROJCS["WGS 84 / UTM zone 29N",
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",-9],
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","32629"]]'''
# Terrain-Correction Operator - snappy
parameters = snappy.HashMap()
parameters.put('demName', 'SRTM 3Sec')
parameters.put('imgResamplingMethod', 'BILINEAR_INTERPOLATION')
parameters.put('pixelSpacingInMeter', 10.0)
parameters.put('mapProjection', proj) # e.g., 'EPSG:4326'
parameters.put('nodataValueAtSea', False)
parameters.put('saveSelectedSourceBand', True)
parameters.put('alignToStandardGrid', False)
parameters.put('outputExtent', 'Subset') # Use bounds of subset
parameters.put('alignToStandardGrid', True)
parameters.put('outputExtent', 'maxBounds')
terrain_correction = snappy.GPF.createProduct('Terrain-Correction', parameters, speckle)