[postgis-users] ogr2ogr talking to PostGIS
Stephen Frost
sfrost at snowman.net
Tue Mar 16 08:04:29 PST 2004
* Frank Warmerdam (warmerdam at pobox.com) wrote:
> Not much to go on here. What are you using as an argument string to
> ogr2ogr?
> Does ogr2ogr list PostGIS as a format?
>
> Try running "ogrinfo --formats" and verify that "PostgreSQL" is listed.
Sorry about that, here's that info:
What I'm trying to use:
ogr2ogr -f "PostgreSQL" "PG:dbname=tsf host=gandalf" test
test is my subdirectory with the 'ESRI Shapefile' data (converted from
TIGER/Line using: ogr2ogr -f "ESRI Shapefile" tiger test). I get a
segfault using the 'tiger' directory too though.
ogr2ogr --formats just brought up the 'help' screen, but that did
include the 'PostgreSQL' output file format name.
Additionally, when I use the wrong 'PG:db...' I get an error from what
looks like the PostgreSQL library, and I can see that ogr2ogr is linked
against libpq.
I ran ogr2ogr under gdb and discovered it's segfaulting in:
ogr/ogrsf_frmts/pg/ogrpgtablelayer.cpp:370
Which is in function:
void OGRPGTableLayer::BuildFullQueryStatement()
and 'szCommand' appears to be *really* big, and pulling from a table I
wouldn't have expected it to be? I'm trying to understand what ogr2ogr
is doing. I'm not really sure what the 'BuildFullQueryStatement' is
supposted to be for. I was expecting ogr2ogr to just create all the
tables I need in PortgreSQL for me with all the right types.
Any other information I can provide?
Thanks!
Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20040316/32f3d69c/attachment.pgp>
More information about the postgis-users
mailing list