[Qgis-developer] Creating a Spatialite table (both geometric and geometryless) inside a C++ plugin

mmekuria sailmcm at yahoo.com
Thu Oct 13 03:21:41 EDT 2011


I need help to create tables (both geometric and geometryless)  in my  C++
plugin. I have a very big data set and it has been difficult to use either
flat file (for the geometryless data) or shapefile (for the geometric data)
and I do not want to use PostGIS since I will pass the data to a colleague
far away who is not database proficient. 

Here is a piece of code that I scavenged from PyQGis Cookbooks manual and
spatialite provider. But I do not see how to go about creating tables. I am
checking the Spatialite manuals  

	QgsDataSource myuri;
	QgsDataSourceURI splUri = QgsDataSourceURI( myuri );
	
	QString spliteDBName = "C:/tmp/qgis/splite.db";
	splUri.setDatabase(spliteDBName);
	splUri.setDataSource('',"TripTable", "Geometry")
	vlayer = QgsVectorLayer(splUri(), "TripTable", "spatialite");

Is there a little bit documentation that will help? Any feedback is
appreciated,

Maaza

  

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Creating-a-Spatialite-table-both-geometric-and-geometryless-inside-a-C-plugin-tp6887903p6887903.html
Sent from the qgis-developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list