[gdal-dev] Reading an IntegerList from file

Bruno Belarte bruno.belarte at gmail.com
Wed Sep 19 07:29:18 PDT 2012


Hi,

I am currently working on exporting some data (an adjacency graph with 
nodes described by an id (integer), an OGRGeometry and some other fields 
(string and real) into a file. I choose to export the adjacency relation 
as an IntegerList field (for each node, the list contains the id of all 
the adjacent nodes). It works for several file type (KML, GML, SQLite, 
but not shapefile as it doesn't support IntegerList field type). 
Everything works fine and the output files contains all the data that I 
want.

The problem comes when I want to do the opposite. When I open a file 
that I precedently wrote, the IntegerList give me some trouble. The 
field description is actually in the OGRFeatureDefn but the 
feature->GetFieldAsIntegerList ("name", &size) method returns a NULL 
pointer.

Is there a specific procedure to handle IntegerLists ? Or is it an 
unsupported feature ?

Thanks,

Bruno Belarte

PS : I work with C++ and gdal 1.9.0 on ubuntu 12.04 64bits


More information about the gdal-dev mailing list