No subject
Thu Jun 11 16:32:49 EDT 2009
is pretty good, so that your dump idea should more or less work with minor
massaging to load into SQLite. Well it will probably work just fine for the
regular data if you use the -D insert format of PostgreSQL of pg_dump
http://www.postgresonline.com/downloads/special_feature/postgresql83_pg_dump
restore_cheatsheet.pdf
So the only issue is the geometry output. These will probably not be
compatible. You could use pgsql2shp and output using the -w switch which
will output to WKT.
http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg
That may just work. Haven't tried it myself so good luck and let us know
how it turns out.
Leo
_____
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Jose
Gomez-Dans
Sent: Saturday, June 13, 2009 3:44 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Moving to SpatiaLite: best practice
Hi,
I'm doing some very simple PostGIS-related work: I store data in a table,
and from time to time, I do simple stuff with the stored data, sometimes
even actually using the geometry column!!! Anyway, PostGIS has been very
useful so far, but I now have to move away from my work computer, and I
would like to keep on working with my laptop. One way would be to install
PostGIS on my laptop, but I am also thinking of giving my program to other
people, who might not necessarily need or want to install PostGIS. To this
end, spatialite is very handy. It's just a file, and I can use the same
PostGIS stuff I've been using up to now. However, I need to move my tables
to SpatialLite. In essence, I do have a number of tables, most of which
relate a field to a geographical table. It should be trivial to dump schema
and SQL and run it pass sqlite/spatialite. I was just wondering whether
anyone had any recommendations or ideas on "best practice".
Thanks!
Jose
------=_NextPart_000_0004_01C9EC75.58CB3150
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6001.18248" name=3DGENERATOR></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Jose,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>From our experience -- the SQLite SQL syntax =
compatibility=20
with PostgreSQL is pretty good, so that your dump idea should more or =
less work=20
with minor massaging to load into SQLite. Well it will probably =
work just=20
fine for the regular data if you use the -D insert format of =
PostgreSQL of=20
pg_dump</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2><A=20
href=3D"http://www.postgresonline.com/downloads/special_feature/postgresq=
l83_pg_dumprestore_cheatsheet.pdf">http://www.postgresonline.com/download=
s/special_feature/postgresql83_pg_dumprestore_cheatsheet.pdf</A></FONT></=
SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>So the only issue is the geometry output. =
These will=20
probably not be compatible. You could use pgsql2shp and output =
using the=20
-w switch which will output to WKT.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2><A=20
href=3D"http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg">http=
://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg</A></FONT></SPAN>=
</DIV></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>That may just work. Haven't tried it =
myself so good=20
luck and let us know how it turns out.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN> </DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D488301502-14062009><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Leo</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B>=20
postgis-users-bounces at postgis.refractions.net=20
[mailto:postgis-users-bounces at postgis.refractions.net] <B>On Behalf Of =
</B>Jose=20
Gomez-Dans<BR><B>Sent:</B> Saturday, June 13, 2009 3:44 PM<BR><B>To:</B> =
PostGIS=20
Users Discussion<BR><B>Subject:</B> [postgis-users] Moving to =
SpatiaLite: best=20
practice<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR>I'm doing some very simple PostGIS-related work: I =
store data=20
in a table, and from time to time, I do simple stuff with the stored =
data,=20
sometimes even actually using the geometry column!!! Anyway, PostGIS has =
been=20
very useful so far, but I now have to move away from my work computer, =
and I=20
would like to keep on working with my laptop. One way would be to =
install=20
PostGIS on my laptop, but I am also thinking of giving my program to =
other=20
people, who might not necessarily need or want to install PostGIS. To =
this end,=20
spatialite is very handy. It's just a file, and I can use the same =
PostGIS stuff=20
I've been using up to now. However, I need to move my tables to =
SpatialLite. In=20
essence, I do have a number of tables, most of which relate a field to a =
geographical table. It should be trivial to dump schema and SQL and run =
it pass=20
sqlite/spatialite. I was just wondering whether anyone had any =
recommendations=20
or ideas on "best practice".<BR><BR>Thanks!<BR>Jose<BR></BODY></HTML>
------=_NextPart_000_0004_01C9EC75.58CB3150--