Hello,

I have reproduced the bug with a smaller shp file. (
http://filez.teledetection.fr/eec4dq<http://filez.teledetection.fr/eec4dq/download>
)
But I didn't find a way to reduce more its size: there is 700 polygons for 
this one.

For this shp file, I got 2 "ERROR Invalid Index -1" warning messages when I 
use the simple pipeline previously described 
(VectorDataReader--->VectorDataWriter)
-the warning appears when the VectorDataWriter is triggered
-I notice that the shp has one column filled with "NULL" values, and this 
column is removed at export
-I try to find where appends the "ERROR Invalid Index -1" message in the 
OTB source code (*.h, *.txx, ...), but I didn't

I will assume that these shp files I used were corrupted.
But every shp files coming from a coworker can't be manipulated in a OTB 
VectorData pipeline (I guess he used to generate them with ArcGis) and 
there is no problem to use these files with other softwares, or with OGR in 
a C++ code. 

I keep you informed if I find a way to pre-filter the VectorData in OTB 
before writting it.


Rémi

Le mardi 15 octobre 2013 11:05:59 UTC+2, remicres a écrit :
>
> Hello dear OTB users/OTB team,
>
> I have a problem with a very simple pipeline using VectorData (maybe I 
> found a bug here?):
>
>    - OTB 3.16
>    - One shapefile at the input of my pipeline
>    - My pipeline is very simple: 
>    VectorDataFileReader--->VectorDataFileWriter
>    
> The problem encountered is the following:
>
>    - It seems like the writer duplicates the fields of the attribute 
>    table, there is a lot of warning messages:
>
>
> *Warning 6: Normalized/laundered field name: 'MAX' to 'MAX23'Warning 6: 
> Normalized/laundered field name: 'MAX' to 'MAX24'*
> ...
>
> I guess the writer duplicates the attribute table for each node, but I'm 
> not sure. 
> Indeed I have approx 10k nodes in my input shapefile, so I can't wait the 
> end of the process to check (output data becomes larger and larger, and 
> execution slows)
>
> So here are the elements to reproduce the "bug":
>
>    - input shapefile sample: http://filez.teledetection.fr/6wyg/download
>    - source code: http://pastebin.com/vFiTVqhK
>    - console output: http://pastebin.com/1gS5yedW
>    
> The strange thing is that I can open the shapefile in other softwares 
> (QGis, etc) and I have no problem when using OGR to deal with my shapefile 
> (successful I/O and processing with ogr::datasource)
> Maybe it isn't a bug and it's due to the shapefile structure? I doubt it, 
> because I don't notice something weird (It's just one root node, with a 
> bunch of child polygons)
> I hope you guys can help me.
>
> Cheers,
>
> Rémi
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *...//Source code:void testbug(string inputShapeFile){    typedef float 
>                                         InputImagePixelType;    typedef 
> otb::VectorData<InputImagePixelType, 2>        VectorDataType;    typedef 
> otb::VectorDataFileReader<VectorDataType>    VectorDataFileReaderType;    
> typedef otb::VectorDataFileWriter<VectorDataType>    
> VectorDataFileWriterType;    VectorDataFileReaderType::Pointer shpReader = 
> VectorDataFileReaderType::New();    
> shpReader->SetFileName(inputShapeFile);    
> VectorDataFileWriterType::Pointer shpWriter = 
> VectorDataFileWriterType::New();    
> shpWriter->SetFileName("outputShapeFile.shp");    
> shpWriter->SetInput(shpReader->GetOutput());    shpWriter->Update();}*
>
>
>

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to otb-users@googlegroups.com
To unsubscribe from this group, send email to
otb-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to otb-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to