[postgis-users] pgsql2shp and prj support

Dane Springmeyer blake at hailmail.net
Wed Nov 14 14:12:12 PST 2007


It appears that the pgsql2shp tool does not write out .prj files  
alongside shp output?

After I dump out shapefiles I like to view them in Qgis or Udig and  
both like/require .prj files for projection of shapefiles. I know  
that you can assign them inside inside either of these apps but it  
would be nice to have them created automatically.

Since I am using php to batch dump a number of shapefiles, and I've  
been able to nest these two SQL statements within the script to be  
able to get the "SRTEXT" and write it to a .prj file that corresponds  
to each shapefile:

SELECT ST_SRID(the_geom) from MyTable limit 1;

SELECT srtext from spatial_ref_sys WHERE srid = 2964 // Alaska Albers...

It seems like this would be a useful thing to have as part of the  
pgsql2shp utility. Does it already do this and I a missing something,  
or is this a feature request?

I noted this discussion (http://postgis.refractions.net/pipermail/ 
postgis-users/2004-October/005958.html) from '04 that notes the  
ability to use the srtext entry in the spatial_ref_sys. Has this been  
discussed since?

Cheers,

Dane

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071114/9edb3b46/attachment.html>


More information about the postgis-users mailing list