[postgis-devel] [PostGIS] #123: SQLite output format support for shp2pgsql

PostGIS trac at osgeo.org
Mon Nov 16 14:23:34 PST 2009


#123: SQLite output format support for shp2pgsql
----------------------------+-----------------------------------------------
  Reporter:  schuyler.erle  |       Owner:                
      Type:  task           |      Status:  new           
  Priority:  medium         |   Milestone:  PostGIS Future
 Component:  postgis        |     Version:                
Resolution:                 |    Keywords:                
----------------------------+-----------------------------------------------
Changes (by pramsey):

  * milestone:  => PostGIS Future

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.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/123#comment:3>
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