[postgis-users] Projection Question.

Frank Warmerdam warmerdam at pobox.com
Mon Oct 17 19:53:59 PDT 2005


On 10/17/05, Jason C. Leach <jason.leach at gmail.com> wrote:
> Hi,
>
> I have a shape file that is in NAD83, UTM, Zone 11.  When I export the
> table (pgsql2shp) I would like to also create a .prj file for the
> shape file; I'll do this with a Python script.  If I use the text from
> the spatial_ref_sys table ArcMap complains that the projection does
> not agree with the data in the shape file.  If I replace and use the
> original .prj file I had when I imported the data ArcMap is happy.
> The reason I'd like to use the text from the spatial_ref_sys table is
> so I can create the .prj files on the fly.
>
> The polygon is located in South East BC, Canada (Near Oliver).
> Attached is the text from the original .prj file.
>
> Can I even use the text from the spatial_ref_sys table in a .prj file?

Jason,

Unfortunately "Well Known Text" format for coordinate systems come
in several varieties.  What PostGIS has is created by OGR, and I
believe it matches up well with the OGC Coordinate Transformation
specification.  ESRI uses a variation on the original WKT from the
Simple Features specification.

The OGRSpatialReference class (part of OGR) includes support for
"morphing" between ESRI and other formats.  My suggestion would
be that you use "ogr2ogr" to dump PostGIS data to Shapefile. It
will convert the coordinate system on the fly to ESRI format - though
there are some holes in that process.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the postgis-users mailing list