PDA

View Full Version : QGIS shapefiles



Struja
15th July 2009, 14:36
hi all

i've searched the forum for anything usefull to solve my problem, but to no avail.

i'm working on a project that involves qgis as a database, and we've settled for a vector to be the database. the vector contains three integers in it's attribute table. the vector also contains lines (not polygons), and i need to somehow get all the coorinates which define the line (all the points which define each line), and the three integers from the attribute table.

my initial thought was that i need to use the qgis header files to access the shapefile and retrieve the data, but having read a few topics on this forum, i'm now wondering is it possible to do this without the need for qgis header files ?

note that i'm not going to display the vector shapefile, nor does it involve any graphical component (it's a database meant for storage and retrieval of the integers i mentioned).

i first tried to set up QtCreator so i can just make my app, and use QGIS classes by including the path to them (the libs and include files from the QGIS instalation folder, and cpp files from it's source), but i had an error where QtCreator throws an undefined reference to QGIS classes (although the syntax popup gives it off - the classes are visible to the editor, but the compiler cant seem to find them). has anyone tried to make a custom app using QGIS classes by linking to them, and not including them in the project file ?
the .pro file contains correct includepaths, defines and libs needed. is it possible that the lib files i'm trying to use are incomplete (i'm guessing the libs contain the class definitions)?

i'm using QtCreator 1.2.0, QGIS source and app are Kore 1.0.2, under windows XP professional, Qt 4.5 i guess (came with the Creator).

i'd appreciate any response.