[gdal-dev] ESRI and .prj

Ben Discoe ben at v...
Thu Aug 23 01:22:24 EDT 2001


So, i implemented some .prj files by using GDAL like this:

// write
FILE *fp2 = fopen(prj_name, "wb");
char *wkt;
m_proj.exportToWkt(&wkt);
fputs(wkt, fp2);
OGRFree(wkt);
// read
FILE *fp2 = fopen(prj_name, "rb");
char wkt_buf[2000], *wkt = wkt_buf;
fgets(wkt, 2000, fp2);
m_proj.importFromWkt((char **) &wkt);

Works fine for reading/writing my own data. Does it seem like using
OGRSpatialReference's Wkt methods in this way will be
compatible/interchangable with what ESRI is doing? I don't follow
everything in their explanation below, but it sound like they distinguish
three different things:

1. "classic" "old-style" ESRI .prj
2. "original" OpenGIS WKT
3. "newer" OpenGIS WKT, influenced by more usage of EPSG/POSC by ESRI

I'd guess GDAL implementats something between #2 and #3, possible compatible
with software expecting either?

-Ben

> -----Original Message-----
> From: Ben Discoe [mailto:ben at v...]
> Sent: Wednesday, August 22, 2001 6:58 PM
> To: vtp at yahoogroups.com; gdal-dev
> Subject: [gdal-dev] ESRI and .prj
>
>
>
> I asked ESRI about the situation with their .prj files, and got the
> following excellent detailed answer, which i suspect will be of general
> interest to the list. I'll try to summarize it on the VTP site.
>
> -Ben
>
> -----Original Message-----
> From: Melita Kennedy [ESRI-Redlands] [mailto:mkennedy at e...]
> Sent: Wednesday, August 22, 2001 6:31 PM
> To: ben at v...
> Subject: Re: FW: [vtp] Requesting input on BT and projections
>
>
> Hi Ben,
>
> I'm the map projection product specialist here at ESRI. I know
> more of the metadata and how the low-level Projection Engine
> is applied in our software.
>
> We've been building a stand-alone C library to support coordinate
> system definitions, projections, and transformations for several
> years. We didn't want to use the old-style PRJ format because it
> has limitations in what it supports and everything is hard-coded
> to tables. Given a spheroid keyword, you have to look up its
> values, for example. The library is called the Projection Engine.
>
> We based our model on EPSG/POSC because at the time, they had what
> we considered to be the most complete and understandable one.
> We then proposed our model for OpenGIS and it was accepted.
> OpenGIS is expanding their model and making it more closely match
> EPSG but it's still quite recognizable.
>
> So, any ESRI software that uses the Projection Engine also supports
> the original OpenGIS WKT standard. Currently, that's ArcGIS 8
> (ArcMap, ArcCatalog, parts of ArcToolbox), ArcSDE starting with
> 3.0, MapObjects starting with 2.0, ArcView Projection Utility,
> ArcIMS 3.1.
>
> ArcGIS/ArcInfo 8 is an odd case. It combines the old workstation
> ArcInfo so grids and coverages still use the old-style PRJ files.
> Desktop ArcInfo includes ArcCatalog/ArcMap/ArcToolbox. Shapefile,
> ArcSDE layers, and geodatabase data all use the newer Projection
> Engine definitions. Starting with 8.1, we have functions to
> convert back and forth between the two. Not everything maps
> exactly due to different supported projections and capabilities.
>
> Melita
>
> --
> Melita Kennedy
> Product Specialist
> ESRI, Inc.
> mkennedy at e...





More information about the Gdal-dev mailing list