1

I'm working with Sentinel-1 data and trying to use the raster package in r to read it. I got the following error. The raster seems not to be well georeferenced. The resolution and extent are not displayed correctly. Meanwhile, I reckon r also does not read the dimensions correctly. The matrix of 26503*16885 should be the dimensions of valid pixels only.

> library(raster)
> x = raster('s1a-iw-grd-vv-20180130t193923-20180130t193948-020388-022d67-001.tiff')
> x
class      : RasterLayer
dimensions : 16885, 26503, 447503155  (nrow, ncol, ncell)
resolution : 1, 1  (x, y)
extent     : 0, 26503, 0, 16885  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +no_defs
source     : /scratch/os22/yy4778/SingleChannelAlgo_90m/sentinel/S1A_IW_GRDH_1SDV_20180130T193923_20180130T193948_020388_022D67_6CF9.SAFE/measurement/s1a-iw-grd-vv-20180130t193923-20180130t193948-020388-022d67-001.tiff
names      : s1a.iw.grd.vv.20180130t193923.20180130t193948.020388.022d67.001
values     : 0, 65535  (min, max)

When I use ArcGIS or QGIS to read it, it can be displayed correctly. It can be seen that the dimensions have been adjusted to 30344*20520 and the extent can be read correctly.

### Information from QGIS###

Name    s1a-iw-grd-vv-20180130t193923-20180130t193948-020388-022d67-001
Path    /g/data/fj4/users/yu/s1a-iw-grd-vv-20180130t193923-20180130t193948-020388-022d67-001.tiff
CRS EPSG:4326 - WGS 84 - Geographic
Extent  143.5295688650110151,-32.2190784216897512 : 146.6789677467667730,-30.0893109205815179
Unit    degrees
Width   30344
Height  20520
Data type   UInt16 - Sixteen bit unsigned integer
GDAL Driver Description GTiff
GDAL Driver Metadata    GeoTIFF
Dataset Description 
Compression 
Band 1  
STATISTICS_APPROXIMATE=YES
STATISTICS_MAXIMUM=1175
STATISTICS_MEAN=71.533019359901
STATISTICS_MINIMUM=0
STATISTICS_STDDEV=68.573526261316
STATISTICS_VALID_PERCENT=100
More information    
Dimensions  X: 30344 Y: 20520 Bands: 1
Origin  143.53,-30.0893
Pixel Size  0.0001037898392352941792,-0.0001037898392352941792

A correct display by QGIS is attached as below.

enter image description here

Can I ask how should I use R to correctly read the data?

I have tried methods like gdal utils (e.g. gdal_translate) to set the four corners but does not work for this one.

The tiff data is available from: https://drive.google.com/file/d/1Ox6uOhQYSFMzO1Hut-CjAqjPu06_-y1o/view?usp=sharing

1
  • There is something wrong with the projection information of this raster. In your QGIS summary your second pixel dimensions is negative (-0.00010379). Commented Mar 17, 2022 at 14:20

1 Answer 1

0

The problem has been fixed. Sentinel-1 GRD data are not georeferenced and need to be preprocessed before usage. This GitHub repository works for me.

https://github.com/ffilipponi/Sentinel-1_GRD_preprocessing

Once completing the preprocessing step using a tool called Sentinel Application Platform (SNAP), which can be executed in the command line, Sigma0_VH_db.img and Sigma0_VV_db.img will be generated. Both of them are readable in R and correctly georeferenced. I set the resolution as 20m so the dimensions of generated data differ from the one in QGIS.

> library(raster)
> x = raster('Sigma0_VV_db.img')
> x
class      : RasterLayer
dimensions : 11852, 17529, 207753708  (nrow, ncol, ncell)
resolution : 0.0001796631, 0.0001796631  (x, y)
extent     : 143.5296, 146.6789, -32.21875, -30.08939  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +ellps=WGS84 +no_defs
source     : /scratch/os22/yy4778/SingleChannelAlgo_90m/sentinel/S1A_IW_GRDH_1SDV_20180130T193923_20180130T193948_020388_022D67_6CF9.data/Sigma0_VV_db.img
names      : Sigma0_VV_db

A plot using R is as below.

> plot(x, zlim=c(-30,-10))

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.