Mahdi Nazari Ashani
Mahdi Nazari Ashani

Reputation: 391

How to get export shapefile from spatialite database in android

I'm working on a Mobile GIS android app. I want to get export ESRI Shapefiles from my Spatialite database when the user is offline. how can i do this? Is there any library which can help me?

Upvotes: 1

Views: 765

Answers (1)

Sga
Sga

Reputation: 3658

In spatialite.h you can find this function:

SPATIALITE_DECLARE int dump_shapefile (sqlite3 * sqlite, char *table,
                   char *column, char *shp_path,
                   char *charset, char *geom_type,
                   int verbose, int *rows,
                   char *err_msg);

which is exactly what you are looking for.

However, you have to find an Android wrapper that supports that function (it may not be available). Another method is using GDAL for Android with spatialite driver to convert data to Shapefile: see how they did it in this utility included in geotools-android.

Upvotes: 1

Related Questions