Matt,
Have a look into the ogr2ogr.exe which is installed with QGIS.

It’s a command line program that converts formats.  You could make a batch 
script to get the data you want one layer at a time into a single spatialite 
db.  I’m afraid you got a bit of work to do to figure out the options for your 
input and output formats.

Here’s a sample I found on my hard drive that I did some time ago to get data 
from a SQL Server table into Spatialite, to give you an idea of what’s 
involved.  I don’t remember what all options are :P

C:\OSGeo4W\bin\ogr2ogr.exe -f SQlite "C:\output7.sqlite" 
"MSSQL:server=xxxx;database=zzzz;trusted_connection=yes;" -sql "SELECT * FROM 
lOT" -a_srs "EPSG:28356" -dsco SPATIALITE=yes -nln "LOT" -nlt PROMOTE_TO_MULTI 
-geomfield SP_GEOMETRY –append

Good luck.

From: Qgis-user [mailto:[email protected]] On Behalf Of Matt 
Boyd
Sent: Thursday, 9 November 2017 2:53 PM
To: qgis-user <[email protected]>
Subject: [Qgis-user] script filegdb to spatial lite

Hi QGISers,
I'm working from a corporate dataset, mostly geodatabases located on a network 
drive.
I'd like to make a portable version of the datasets that I use that's updated 
either automaticaly, or whenever I run a script.
I'm not 100% sure how spatialite works. Is everything in a single file 
database? I'd like to just create a script only grabbing the data I specify 
from the network drive and save that locally.
I don't do the database updating so it's only a one way process.

Has anyone done something like this? are there shortcuts?

Thanks
Matt

This email is intended for the named recipient only.  The information it 
contains may be confidential.  If you are not the intended recipient you must 
not reproduce or distribute any part of this email, disclose its contents to 
any other party or take any action in reliance on it.  If you have received 
this email in error, please contact the sender immediately and delete the 
message.
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to