Hi Bill,

Hopefully something like this should do it....

ogr2ogr -overwrite -a_srs epsg:2232 -f "ESRI Shapefile" d:\mymap.shp
"PG:dbname
=geo host=127.0.0.1 user=postgres password=pass123" -sql "select * from
layer"

Making adjustments for your username, password, and layer name.

Ta,
Phil



On Wed, May 20, 2009 at 6:22 PM, Bill Thoen <[email protected]> wrote:

> I must be overlooking something simple, but I can't seem to get a PostGIS
> table into an ESRI shapefile. If I use pgsql2shp, I don't get an SRS, but
> when I try ogr2ogr, nothing happens at all. No error, but no data either. So
> what's wrong with this?
>
> ogr2ogr -overwrite -a_srs epsg:2232 -f "ESRI Shapefile" lidar.shp
> PG:dbname=spatial1 las_tiles
>
> When I run this, the system prompt comes back almost immediately (no delay
> to indicate any activity on the database), no file is generated and no
> errors reported on screen or in the PG serverlog file.
>
> I'm using PostgreSQL 8.3.3 on Linux.
>
> Any help would be much appreciated, 'cause I just don't see what's wrong
> here.
>
> TIA,
> - Bill Thoen
>
> _______________________________________________
> postgis-users mailing list
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to