[Qgis-user] script filegdb to spatial lite
Alex M
tech_dev at wildintellect.com
Thu Nov 9 08:46:12 PST 2017
Matt,
Each layer is a separate table within the database, you can have as many
as you like. As with most spatial formats I would avoid mixed geometries
in the same layer.
Here are some of the docs about spatialite
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=misc-docs
https://www.gaia-gis.it/fossil/libspatialite/index
Enjoy,
Alex
On 11/08/2017 08:21 PM, Matt Boyd wrote:
> Thanks martin,
> thats an excellent starting point for me. I'd already started digging into
> ogr2ogr and the options you have there are good.
> Does spatialite allow points, lines and polygon in the same database / file?
>
> On Thu, Nov 9, 2017 at 3:11 PM, Martin Bain <Martin.Bain at lismore.nsw.gov.au>
> wrote:
>
>> 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:qgis-user-bounces at lists.osgeo.org] *On Behalf
>> Of *Matt Boyd
>> *Sent:* Thursday, 9 November 2017 2:53 PM
>> *To:* qgis-user <qgis-user at lists.osgeo.org>
>> *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
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
More information about the Qgis-user
mailing list