[gdal-dev] PostGIS SRID conundrum

pcreso at pcreso.com pcreso at pcreso.com
Sat Feb 11 00:33:19 EST 2012


ESRI does not use a SRID, it uses a text string that needs complex parsing to work. If ESRI supported EPSG codes it would be easier...

The spatial_ref_sys table contains entries for all EPSG recognised projections. If you have a reasonable case to have a projection inluded by EPSG, submit a request to EPSG & it will finish up in the Postgis spatial_reference table.

In the short term, add a proj4txt record for your projection with an arbitrary new srid in the spatial_ref_sys table & it will work fine in Postgis. If you want it to work with GDAL/OGR then you;ll need to add it to the proj4 list of projection parameters. Where this is depends on your OS & implementation.

See this spec:

http://remotesensing.org/geotiff/proj_list/orthographic.html

The proj4 parameter list for your case may need to specify WGS84 as your ellipsoid & datum.

HTH,

  Brent Wood

--- On Sat, 2/11/12, Martin Chapman <chapmanm at pixia.com> wrote:

From: Martin Chapman <chapmanm at pixia.com>
Subject: [gdal-dev] PostGIS SRID conundrum
To: gdal-dev at lists.osgeo.org
Date: Saturday, February 11, 2012, 12:25 PM

I know this question isn’t exactly related to GDAL but I thought someone on the list might be able to answer this question.  So, I have a shape file that has the following spatial reference:  PROJCS["Orthographic",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Orthographic"],PARAMETER["Latitude_Of_Center",40],PARAMETER["Longitude_Of_Center",-75],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["User Defined",1]]  It was generated using OGR.  I want to insert it into postgres / postgis but there is no direct match for the wkt or proj4 definition in the spatial_ref_sys table.  So, I go to insert it into the table but the question arises, what SRID do I use?  Do I just fudge a random one with a high enough value that I hope it won’t conflict with some other SRID in the future, or do I create a table based off of the
 heterogeneous list of SRIDs at spatialreference.org and insert from that?  I would like to do the later but that will be a pain unless someone has a put together a batch insert sql file for all the projections on spatialreference.org.  Still, there is always the possibility that I may run into one that isn’t defined and I will have to fudge my own number anyway.  Question:  What is the best way to handle this?  I wish the spatial_ref_sys table came with all the ESRI and other SRID definitions.   Suggestions are much appreciated!  Best regards,Martin    
-----Inline Attachment Follows-----

_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120210/3e1c4145/attachment.html


More information about the gdal-dev mailing list