Error in ExtractRoi

Dear all

I am trying to create a Sentinel-2 image subset using a shapefile ceated using ArcMap, which has the same projection as the image. When I execute ExtractRoi, using the Fit mode, I get the following error message:
2020-02-12 12:06:10 (WARNING) ExtractROI: Could not extract the ROI as it is out of the input image.

2020-02-12 12:06:10 (FATAL) ExtractROI: itk::ERROR: MultiChannelExtractROI(00000013FC1D5890): Extraction Region not consistent with output image

I also verified, using SNAP, that the shapefile is superimposed on the tif image. Can you please help me out with this?

Thanks

Hi, welcome.
This message tells that the vector image and the image are not in the same area. Your issue may be related to a wrong coordinate reference system in the vector data or in the image.
Can you provide:

  • OTB: version
  • image information (extent, CRS, file format)
  • vector data information (extent, features type, CRS)

You can dump the output of gdalinfo/ogrinfo in a textfile attached to your reply.

Dear all

I am trying to create a Sentinel-2 image subset using a shapefile ceated using ArcMap, which has the same projection as the image. When I execute ExtractRoi, using the Fit mode, I get the following error message:
2020-02-12 12:06:10 (WARNING) ExtractROI: Could not extract the ROI as it is out of the input image.

2020-02-12 12:06:10 (FATAL) ExtractROI: itk::ERROR: MultiChannelExtractROI(00000013FC1D5890): Extraction Region not consistent with output image

I also verified, using SNAP, that the shapefile is superimposed on the tif image. Can you please help me out with this?

Thanks
[/quote]

Thank you Remi I am using OTB 7.0.0. I am sending the files that you have requested.
Doc1.pdf (116.3 KB)
raster.txt (3.6 KB) vector.txt (1.0 KB)

Hi Ana,

The image and shapefile coordinates seem to be consistent (the extent is inside the image corner coordinates). Maybe some informations are missing in the shapefile metadata, and OTB cannot project it in the image geometry.
Could you please provide us the shapefile, and tell us which Sentinel2 tile you are working on ?

Thanks

Hello Yannick

Thank you for the reply.

The tile I am working with is T29SND. Please find in attach the shapefile.Documents.7z (831 Bytes)

Hello Ana,

Thank you for providing the files. Meanwhile, we investigated a bit more and there was indeed a bug on this feature in OTB 7.0. It’s a side-effect of a modification made quite recently, and the correction has been patched.
OTB binaries (built every day) are ready to download here : https://www.orfeo-toolbox.org/packages/ci/latest/

This version will solve your problem, and an official 7.1 version will soon be released, with new features and other bug fixes.

Please tell us if you have any problem using that version.

Best regards,

Yannick

Hello Yannick

I already tested it and it is working perfectly!

I am also having some doubts about the different steps of the classification process, but I am going to try it again and if those doubts persist I will contact you!

Thank you,
Ana

Hi all,

I have the same issue with OTB 8.1.1.

When I’m running ExtractROI, I have (WARNING) ExtractROI: Could not extract the ROI as it is out of the input image.

My AOI has the same CRS and intersects the raster extent. Please find attached gdalinfo and ogrinfo output.
raster.txt (1.2 KB)
vector.txt (1.3 KB)

Can you please help me with this ?

Thanks,
Marie