Bug report #7855
Error in OTB segmentation with certain projections
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||up/downstream|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16733|
I have the following error:
Oooops! SEXTANTE could not open the following output layers Output vector file: /tmp/sextante/otbmeanshiftsegmentationlargescalevectoroutputbdc33d1cf5754b099ae93605846a76e8.shp The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm Checking the log information might help you see why those layers were not created as expected
when running the following command with the attached image:
This is the INFO log:
OTB execution console output Segmentation -filter meanshift -in /home/user/Desktop/NorthCarolina.tif -filter.meanshift.spatialr 5 -filter.meanshift.thres 0.1 -filter.meanshift.ranger 15 -filter.meanshift.minsize 100 -filter.meanshift.maxiter 100 -mode.vector.stitch true -mode.vector.minsize 1 -mode.vector.simplify 0 -mode.vector.layername layer -mode.vector.tilesize 1024 -mode.vector.startlabel 1 -mode.vector.outmode ulco -mode vector -mode.vector.out /tmp/sextante/otbmeanshiftsegmentationlargescalevectoroutputc61bed2286f142c6ae8dee21876d8c96.shp 2013 May 18 11:36:25 : Application.logger (FATAL) Image projection reference PROJCS["NAD83(HARN) / North Carolina", GEOGCS["NAD83(HARN)", DATUM["NAD83_High_Accuracy_Reference_Network", SPHEROID["GRS 1980",6378137,298.2572221010042, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6152"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4152"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",36.16666666666666], PARAMETER["standard_parallel_2",34.33333333333334], PARAMETER["latitude_of_origin",33.75], PARAMETER["central_meridian",-79], PARAMETER["false_easting",609601.22], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","3358"]] 2013 May 18 11:36:25 : Application.logger (FATAL) The following error occurred during application execution : /build/buildd/otb-3.16.0/Applications/Segmentation/otbSegmentation.cxx:493: itk::ERROR: Segmentation(0x8713470): Image spatial reference can't be converted to ESRI. Use another output format (kml,SQLite,...) to overcome .shp limitation
I think it is related to an issue of OTB, about certain projections, described here: https://groups.google.com/forum/?fromgroups#!topic/otb-users/0Te-TnCyVj0 and http://bugs.orfeo-toolbox.org/view.php?id=572
#2 Updated by Luca Congedo over 7 years ago
Giovanni Manghi wrote:
it seems that the meanshiftsegmentation tools with vector output only work if the input is in wgs84, but if is a OTB issue there is not much that SEXTANTE can do.
Yes, maybe it could be useful to check if raster projection is in wgs84 and, if not, to provide a message that meanshiftsegmentation does not work with that raster projection.
#4 Updated by Manuel Grizonnet over 6 years ago
It is not true that the OTB Segmentation only support WGS84 but on the other hand the application tests if the output projection is compatible with the output vector format if it is ESRI Shapefile.
We're using gdal/OGR API to test this and it is more a limitiation of the Shapefile format:
This test is perhaps not valid and there is somehow a way to write a shapefile in the projection dump the INFO log above. We did not find for now in OTB how to do this.
Let me know if someone more familiar with shp format and specific projection system got some info about it.