<div>Hi Bill,</div>
<div> </div>
<div>Hopefully something like this should do it....</div>
<div> </div>
<div>ogr2ogr -overwrite -a_srs epsg:2232 -f "ESRI Shapefile" d:\mymap.shp "PG:dbname<br>=geo host=127.0.0.1 user=postgres password=pass123" -sql "select * from layer"</div>
<div> </div>
<div>Making adjustments for your username, password, and layer name.</div>
<div><br>Ta,</div>
<div>Phil</div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Wed, May 20, 2009 at 6:22 PM, Bill Thoen <span dir="ltr"><<a href="mailto:bthoen@gisnet.com">bthoen@gisnet.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">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?<br>
<br>ogr2ogr -overwrite -a_srs epsg:2232 -f "ESRI Shapefile" lidar.shp PG:dbname=spatial1 las_tiles<br><br>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.<br>
<br>I'm using PostgreSQL 8.3.3 on Linux.<br><br>Any help would be much appreciated, 'cause I just don't see what's wrong here.<br><br>TIA,<br>- Bill Thoen<br><br>_______________________________________________<br>
postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br>