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?
Asked
Active
Viewed 607 times
1 Answers
1
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.

Sga
- 3,608
- 2
- 36
- 47
-
thank u very much. but how can i use that in android with android ndk. can u explain more. – Mahdi Nazari Ashani May 18 '18 at 15:54
-
I don't know how i should use ur answer. – Mahdi Nazari Ashani May 18 '18 at 22:25
-
i'm trying to use geotools in android but this [question](https://stackoverflow.com/questions/50323013/how-to-install-geotools-by-gradle-in-android-studio-3-1-2) says it's not possible. Can u show me a document to use geotools on android? thank u – Mahdi Nazari Ashani May 24 '18 at 04:45
-
You don't need GeoTools, I was just referencing an utility that does what you want. You just need [GDAL for Android](https://trac.osgeo.org/gdal/wiki/BuildingForAndroid) – Sga May 24 '18 at 07:26
-
I was trying to do that but i faced problems u can see my errors.https://stackoverflow.com/questions/50155150/ndk-build-undefined-reference-errror – Mahdi Nazari Ashani May 24 '18 at 07:43
-
I have a problem to building gdal on android – Mahdi Nazari Ashani May 24 '18 at 07:45