Hello! 

Thanks @Mickaƫl for the tip!

Here's what I did:

LC08_L1TP_189034_20170910_20170927_01_T1_B10.TIF is a Landsat 8 band in UTM:

gdalinfo 
/vsicurl/https://store.terradue.com/api/eo-samples/LC08_L1TP_189034_20170910_20170927_01_T1_B10.TIF
 

returns:

Driver: GTiff/GeoTIFF
Files: 
/vsicurl/https://store.terradue.com/api/eo-samples/LC08_L1TP_189034_20170910_20170927_01_T1_B10.TIF
Size is 7781, 7911
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N", 
....


Then I did:

in="/vsicurl/https://store.terradue.com/api/eo-samples/LC08_L1TP_189034_20170910_20170927_01_T1_B10.TIF";

ulx="14.6934"
uly="38.051"
lrx="15.2934"
lry="37.451"

unit=lonlat

otbcli_ExtractROI -in ${in} \
  -mode extent \
  -mode.extent.unit ${unit} \
  -mode.extent.ulx ${ulx} \
  -mode.extent.uly ${uly} \
  -mode.extent.lrx ${lrx} \
  -mode.extent.lry ${lry} \
  -out otb_etna.tif uint16

Then, the same with gdal:

gdal_translate  -projwin 14.6934 38.051 15.2934 37.451 -projwin_srs 
"EPSG:4326" 
/vsicurl/https://store.terradue.com/api/eo-samples/LC08_L1TP_189034_20170910_20170927_01_T1_B10.TIF
 
etna.tif

gdal issues a warning but generates the file:

Input file size is 7781, 7911
Warning 1: Computed -srcwin 6320 1826 1762 2219 falls partially outside 
raster extent. Going on however.
0...10...20...30...40...50...60...70...80...90...100 - done.

The files are significantly different and otb_etna.tif dimension is 1, 6085 

Any clue on how to reproduce the gdal_translate command with OTB ?

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to