Xerial is a SQLite JDBC driver developed by Taro L. Saito. It includes the necessary native libraries to access SQLite databases from a Java application and it also provides a slower pure-Java version of it which extends the number of platforms where this can be used.
I have implemented an experimental vector driver in gvSIG Mobile 0.3 to read/write Spatialite-compatible SQLite databases. Xerial is not aware of the Spatialite requirements, but it’s very easy to create the right tables and fields so that other applications can recognize the resulting SQLite file as a Spatialite DB.
This short video shows the result. The steps shown are:
- Open a shapefile in gvSIG Mobile.
- Export the layer to SQLite.
- Open the resulting SQLite DB as a new layer.
- Add a polygon to the layer and save it.
- Use ogr2ogr to export the resulting SQLite DB to SHP. This proves that everything was OK and our file is recognized as a Spatialite DB.
- Open the new shapefile in gvSIG Mobile to see the changes again.