[postgis-users] PostGIS to SpatiaLite
Ricardo Bayley
ricardo.bayley at gmail.com
Sat Jul 24 16:28:15 PDT 2010
I havent tried it much, but I know QGIS has this option.
The OGR module does this. It is very good.
Hope it works for you
On Sat, Jul 24, 2010 at 4:26 PM, Mike Toews <mwtoews at gmail.com> wrote:
> Ok ok, I've finally tamed ogr2ogr to a working state. When configuring
> GDAL, use "--with-spatialite=/usr/local" (for a locally installed
> SpatiaLite library), then make and install GDAL (note my build attempt
> with Ubuntu 10.04 was unsuccessful for reasons I don't have time to
> care for, but my build with 9.04 works).
>
> To create the SpatiaLite file export the first layer:
> $ ogr2ogr -f SQLite -dsco SPATIALITE=yes myfile.sqlite PG:"dbname=mydb
> user=myuser password=mypass" myschema.mytable
>
> And for additional layer/tables:
> $ ogr2ogr -f SQLite -update myfile.db PG:"dbname=mydb user=myuser
> password=mypass" myschema.my2ndtable
>
> The resulting file work with viewers, including SpatiaLite GUI/GIS, Quantum
> GIS.
>
> I've started http://trac.osgeo.org/postgis/wiki/SpatiaLite
>
> -Mike
>
> On 24 July 2010 10:43, Mike Toews <mwtoews at gmail.com> wrote:
> > Hi all,
> >
> > I need to copy several PostGIS tables to a SpatiaLite file, so it can
> > be used on field laptops. A similar question appeared a year ago[1],
> > but there were no solutions.
> >
> > I understand that ogr2ogr has support for SpatiaLite using GDAL 1.7.x,
> > however I cannot seem to configure the GDAL source to enable
> > SpatiaLite[2]. Yet another option is FME, but I don't have time/budget
> > for this. FDO doe
> >
> > Are there any other freely available server-side tools to do the
> > conversion? Thanks.
> >
> > -Mike
> >
> > [1]
> http://postgis.refractions.net/pipermail/postgis-users/2009-June/023707.html
> > [2] http://lists.osgeo.org/pipermail/gdal-dev/2010-July/025448.html
> >
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100724/0370bb8e/attachment.html>
More information about the postgis-users
mailing list