[Gdal-dev] why does shape datasource count lone dbf files as layers?

Ari Jolma ari.jolma at tkk.fi
Mon Mar 13 16:17:07 EST 2006


Ari Jolma kirjoitti:
> I have data in shapefiles, which use dynamic segmentation. Thus (I 
> believe) there are lone DBF files in the directory, which contain the 
> "dynamic" data.
>
> Why does ogrshapedatasource.cpp:306-320 count these files as layers? 
> The source code speaks about "without apparent associated shapefiles", 
> in my case there are simply no associated shapefiles. The datasource 
> is later unusable since the respective SHP files are not available and 
> the program ends in error. I need to manually put these DBF files 
> aside to be able to open the real layers.

To answer myself: this is a problem in the Swig interface. The error is 
not supposed to be an error that is reported to the user, but it is 
because it is there. The problem is in cpl_exceptions.i, which does not 
work (at least) in this case. I don't know how to fix it right away. 
Kevin, Charlie: this is probably also a bug in Python and Ruby 
interfaces. The %exception should not just blindly test eclass but test 
the return value from the function.

Ari

>
> Ari
>


-- 
Prof. Ari Jolma
Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma




More information about the Gdal-dev mailing list