Problem with spatial reference when using SampleExtraction
Description
SampleExtraction fails with this message whereas the image and the database seem to have a consistent projection.
RuntimeError: Exception thrown in otbApplication Application_ExecuteAndWriteOutput: /home/yannick/Dev/otb/Modules/Learning/Sampling/include/otbImageSampleExtractorFilter.hxx:134:
itk::ERROR: PersistentImageSampleExtractorFilter(0x557731cc9e80): Spatial reference of input image and samples don't match:
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"]],
AXIS["Latitude",NORTH],
AXIS["Longitude",EAST],
AUTHORITY["EPSG","4326"]]
vs
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"]],
AXIS["Latitude",NORTH],
AXIS["Longitude",EAST],
AUTHORITY["EPSG","4326"]]
Steps to reproduce
otbcli_SampleExtraction -in imagestack.tif -vec imagestack_samples.sqlite -field class_simp
Configuration information
Fails with OTB 7.1 (Linux) and OTB develop (my build is at least 2 weeks old). Works fine with OTB 7.0