<DIV>You asked about the contents of a prj file.....&nbsp; prj files are essentially text files that list SR data.&nbsp; Here is a prj file for a GCS/lat-long NAD83 shapefile (EPSG SRID 4269):</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;begin prj file&gt;</DIV>
<DIV>GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]</DIV>
<DIV>&lt;end prj file&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Ironically, it looks very, very similar to the data contained in "SELECT spatial_ref_sys.srtext FROM&nbsp;spatial_ref_sys WHERE spatial_ref_sys.SRID = 4269;" which is below:</DIV>
<DIV><FONT size=1>
<P>GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]]</P></FONT></DIV>
<DIV>Don't quote me on this, but it seems that ESRI needed a way to store SR data for shapefiles long after the shapefile had been invented.&nbsp; So it seems that they piggybacked on the EPSG system.&nbsp; Due to the extreme similarities, it seems that it may be possible to parse the data in the prj file and 'match' it to an entry in spatial_ref_sys.</DIV>
<DIV>&nbsp;</DIV>
<DIV>AS<BR><BR><B><I>strk@refractions.net</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Sun, Jul 03, 2005 at 09:59:50AM -0700, gold wrote:<BR>&gt; shp2pgsql is nice, but i'm either going to radically modify my local <BR>&gt; version, or cut something new, and i'm wondering if there is any planned <BR>&gt; or ongoing work to that effect?<BR>&gt; <BR>&gt; in particular, i'd like to see the functionality split a bit, as well as <BR>&gt; some things added:<BR><BR>What revision are you using ?<BR>I've put some efforts to split functionalities a bit in recent ones.<BR><BR>&gt; * split up the metadata sniffing/table creation part into a separate module<BR>&gt; <BR>&gt; * use this module in two places -- shp2pgsql and dbf2pgsql (to be <BR>&gt; created). i realize (from the discussion in march, i think) that there <BR>&gt; is a dbf2pg in the postgres contrib, but it's not much to my liking. <BR>&gt; also, i'd like to have shp2pgsql and dbf2pgsql running off of a common
 <BR>&gt; io and metadata core.<BR><BR>My proposal was to let shp2pgsql read .dbf files w/out corresponding<BR>shp in case shp were missing.<BR><BR>&gt; * add projection (.prj) capabilities to shp2pgsql.<BR>&gt; <BR>&gt; are there already efforts to do this stuff, or, if not, and i end up <BR>&gt; doing the work, are there people out there willing to do code reviews <BR>&gt; and provide some other guidance?<BR><BR>There are no efforts I'm aware of. I think main problem would be<BR>finding a match or create a new record in spatial_ref_sys.<BR>Maybe first step should be some utility functions to query spatial_ref_sys<BR>given a set of definitions. What does .prj files contain ?<BR><BR>-strk;<BR>_______________________________________________<BR>postgis-users mailing list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></BLOCKQUOTE><p>
                <hr size=1>Yahoo! Sports<br> 
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=33539/*http://football.fantasysports.yahoo.com?ovchn=YAH&ovcpn=Integration&ovcrn=Mail+footer&ovrfd=YAH&ovtac=AD ">Rekindle the Rivalries. Sign up for Fantasy Football</a>