I use gdalwarp with python to overlay polygons on ENVISAT radar images. Everything goes well for this type of images but when I try with SENTINEL images, gdal does not find the georeferencing. It seems that gdal takes the global coordinates of the pixel at the upper left of the image. When I read the image information with gdalinfo, I realize that ENVISAT images have no gcp while SENTINEL images have. I have this error message when I use gdalwarp with SENTINEL images:

The transformation is already "north up" or a transformation between pixel/line and georeferenced coordinates cannot be computed for tmp_spill.tif. There is no affine transformation and no GCPs. Specify transformation option SRC_METHOD=NO_GEOTRANSFORM to bypassthis check.

I do not understand why it does not find gcps when they display well with gdalinfo. I use this line for overlay polygon on ENVISAT images : cmd='gdalwarp --config GDALWARP_IGNORE_BAD_CUTLINE YES -q -dstnodata None -cutline tmp.shp %s %s'%('tmp_seep.tif',classout_seep).

Do you know why gdal does not find gcps coordinates ?

  • which sentinel product are you downloading? sentinel 2 is provided in different levels of preprocessing. – Leo Apr 9 at 8:59
  • I take sentinel images on the esa website. When i use gdalinfo on a sentinel images i have this type of result : Size is 26178, 16870 Coordinate System is ' GCP Projection = 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"]] GCP[ 0]: Id=1, Info= (0,0) -> (11.6038164704897,-8.78663832897941,-1.14552676677704e-05) – marc Apr 9 at 9:09
  • You mean that for you gdalinfo shows something different than in the examples in gdal.org/frmt_sentinel2.html? What is your GDAL version? – user30184 Apr 9 at 9:37
  • I use sentinel 1A and 1B images. My result look like L1B subdataset at the bottom of your link. I have the 2.2.2 gdal version on python 2.7.14. – marc Apr 9 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.