LargeScaleMeanShift leads to fatal error when asking for sqlite / gpkg as output
Description
As described on the forum, the LargeScaleMeanShift application works fine when asked to produce a shapefile, but results in a fatal error when asked for an other output format.
Steps to reproduce
- sqlite
$ otbcli_LargeScaleMeanShift -in <otb_source_dir>/Data/Input/QB_1_ortho.tif -spatialr 0.2 -ranger 15 -minsize 10 -mode vector -mode.vector.out output.sqlite -progress 1
[...]
(FATAL) LargeScaleMeanShift: itk::ERROR: Cannot update a feature in the layer <output>:
- gpkg
$ otbcli_LargeScaleMeanShift -in <otb_source_dir>/Data/Input/QB_1_ortho.tif -spatialr 0.2 -ranger 15 -minsize 10 -mode vector -mode.vector.out output.gpkg -progress 1
[...]
Warning 1: A geometry of type POLYGON is inserted into layer region1_lsms_pca of geometry type MULTIPOLYGON, which is not normally allowed by the GeoPackage specification, but the driver will however do it. To create a conformant GeoPackage, if using ogr2ogr, the -nlt option can be used to override the layer geometry type. This warning will no longer be emitted for this combination of layer and feature geometry type.
(INFO) LargeScaleMeanShift: Merging polygons across tiles ...
ERROR 1: Transaction not established
(FATAL) LargeScaleMeanShift: itk::ERROR: Vectorization(0x1831500): Unable to commit transaction for OGR layer output.
- kml works fine
$ otbcli_LargeScaleMeanShift -in <otb_source_dir>/Data/Input/QB_1_ortho.tif -spatialr 0.2 -ranger 15 -minsize 10 -mode vector -mode.vector.out output.kml -progress 1
[...]
(INFO) LargeScaleMeanShift: Final clean-up ...
But the result contains a lot of attributes set as NULL (nbPixel, etc)
- geojson
$ otbcli_LargeScaleMeanShift -in <otb_source_dir>/Data/Input/QB_1_ortho.tif -spatialr 0.2 -ranger 15 -minsize 10 -mode vector -mode.vector.geojson output.gpkg -progress 1
[...]
(FATAL) LargeScaleMeanShift: itk::ERROR: No OGR driver known to OTB to create and handle a DataSource named <output.geojson>.
Configuration information
I tried with Ubuntu 18.4 and OTB 7.2 and OTB 7.1. The initial poster on the forum tried on MacOS.
Edited by Julien Osman