Importing shp file in SVM module in Monterverdi 1.6 always results in crash
Mantis Issue 240, reported by sdinot, assigned to jmalik, created: 2011-03-01
Procedure to reproduce the crash
First open the image in vectorization module and collect few training sites(ROI 1, 2, 3..)
In Monteverdi 1.6,
- Use File -- OpenDataset and add the required image
- Use Learning -- SVM classification to set the input image
- In Supervised Classification window select File -- Import Vector Data (ROI)
- Vector data file window -- browse the location where we have the vector data and add it then click--- ok
After this , Class1 is created but ROI 1 , 2 3 ... etc shows 0,0 pixels( hope shp created by vectorization module is not recognized properly ) then Monteverdi 1.6 crashes. OS is windows xp sp3
Download the image using the below site
Website : http://www.michiganview.org/display/miview/Introduction+to+GDAL In examples you can find the mosaic.tif and download it
I have attached zip shp file - Training sites collected for the image using vectorization module
1299064343 - julienmThe crash comes from the VectorDataFileReader throwing an uncaught exception.
I added one test : http://hg.orfeo-toolbox.org/OTB/rev/340ad7b9cebc
showing a real issue : http://dash.orfeo-toolbox.org/testSummary.php?project=3&name=ioTuVectorDataIOFactory&date=2011-03-02
It is the VectorDataIOFactory throwing an exception (not caught in monteverdi) after a failing dynamic_cast. It is expected since all OGRVectorDataIO use the same class name (the template parameter is not taken into account)
-> we cannot declare several VectorDataFileReader with different VectorData types.
1299072014 - julienmThe previous problem is fixed by : http://hg.orfeo-toolbox.org/OTB/rev/e17ecfe94ff3
1299506351 - julienmFixed in http://hg.orfeo-toolbox.org/Monteverdi/rev/0178d9cfd0c6
The import ROI now preperly reprojects vector data onto the image before doing the import.
Balaji, there is a problem with your shp files :
- they have the same projection as the image (UTM)