My PostGIS database contains OSM data from my country. For transportation reasons I want to export a spatial view I created from that data to a SpatiaLite database.
Is there any way to directly extract my PostGIS view to a SpatiaLite db without resorting to a man-in-the-middle (shapefile then SQLite) solution?
Im using Ubuntu Linux, with PostGIS 2.1 GDAL 191.
Here's a single cmd to export to shapefile:
ogr2ogr -f "ESRI Shapefile" <name-of-folder-to-be-created> \ PG:"dbname=dbname user=username password=pass" \ -sql "<sql query eg> select * from database where <whatever>"
If you get a getsrid(geom) error, load in your database the
psql -f /path/to/legacy.sql