[postgis-devel] [PostGIS] #123: SQLite output format support for shp2pgsql
PostGIS
trac at osgeo.org
Thu Mar 17 10:56:21 PDT 2011
#123: SQLite output format support for shp2pgsql
----------------------------+-----------------------------------------------
Reporter: schuyler.erle | Type: task
Status: closed | Priority: medium
Milestone: PostGIS Future | Component: postgis
Version: | Resolution: invalid
Keywords: |
----------------------------+-----------------------------------------------
Changes (by jadams):
* status: new => closed
* resolution: => invalid
Old description:
> Please find attached a patch that adds a -L option to shp2pgsql provide
> special-case data typing and string formatting for SQLite-compatible
> output.
>
> I have tested the output with SQLite 3.5.2 and it correctly creates and
> populates a table. The geometries are correctly stored as WKB in an
> SQLite
> BLOB column.
>
> Granted there are other ways to import spatial data into an SQLite table,
> but shp2pgsql is the fastest way that I've found to convert both
> Shapefiles
> *and* DBF files into SQL suitable for quick import into a database, which
> is very handy for piping to SQLite's in-memory databases.
New description:
Please find attached a patch that adds a -L option to shp2pgsql provide
special-case data typing and string formatting for SQLite-compatible
output.
I have tested the output with SQLite 3.5.2 and it correctly creates and
populates a table. The geometries are correctly stored as WKB in an SQLite
BLOB column.
Granted there are other ways to import spatial data into an SQLite table,
but shp2pgsql is the fastest way that I've found to convert both
Shapefiles
*and* DBF files into SQL suitable for quick import into a database, which
is very handy for piping to SQLite's in-memory databases.
--
Comment:
Supporting other databases is a little outside the realm of a loader for
PostGIS, which is an extension for PostgreSQL.
I looked into having an option to generate pure SQL-99 output, using a
BLOB or similar, which at least would not be specific to a different
database. Unfortunately BLOB support varies among databases too much for
it to be useful (PostgreSQL doesn't use standard syntax, among others).
Closing as invalid.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/123#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list