Bug report #7855

Error in OTB segmentation with certain projections

Added by Luca Congedo almost 7 years ago. Updated almost 3 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/Core
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

Description

Hi,

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:

sextante.runalg("otb:meanshiftsegmentationlargescalevectoroutput","/home/user/Desktop/NorthCarolina.tif",5,0.1,15,100,100,None,False,True,1,0,"layer",1024,1,0,"",None)

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

Thank you

NorthCarolina.zip (1.33 MB) Luca Congedo, 2013-05-18 02:50 AM

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Open to Feedback

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.

#2 Updated by Luca Congedo almost 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.

Cheers!

#3 Updated by Alexander Bruy about 6 years ago

  • Category set to 57

#4 Updated by Manuel Grizonnet about 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:

http://hg.orfeo-toolbox.org/OTB/file/c10e2afb9ade/Code/Common/otbGeoInformationConversion.cxx#l66

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.

Cheers!

#5 Updated by Giovanni Manghi over 5 years ago

  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to 2.4.0
  • Category deleted (57)
  • Project changed from 78 to QGIS Application

#6 Updated by Giovanni Manghi over 5 years ago

  • Category set to 120

#7 Updated by Giovanni Manghi over 5 years ago

  • Assignee set to Victor Olaya

#8 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to up/downstream
  • Status changed from Feedback to Closed

#9 Updated by Giovanni Manghi almost 3 years ago

  • Regression? set to No

#10 Updated by Giovanni Manghi almost 3 years ago

  • Easy fix? set to No

#11 Updated by Giovanni Manghi almost 3 years ago

Some providers are being removed from QGIS/Processing (will be available as plugin) and so are their categories in the bug tracker. To not leave them orphaned of a category they are being reassigned to processing/core.

#12 Updated by Giovanni Manghi almost 3 years ago

  • Category changed from 120 to Processing/Core

Also available in: Atom PDF