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