[GRASS5] Projection transform

Eric G. Miller egm2 at jps.net
Thu Jan 24 21:40:52 EST 2002


On Thu, 24 Jan 2002 17:09:10 +0100, Andreas Lange <Andreas.Lange at Rhein-Main.de> wrote:

[snip]
> 
> i have to underline what Morten said. 
> The problem is that much of the projection setup is now hardcoded into
> g.setproj.
> For example, it is hardcoded into g.setproj that some projections have
> fixed ellipsoids:
> if ((proj_index == ALSK) || (proj_index == GS48) || (proj_index ==
> GS50)) {
>   sprintf(spheroid, "%s", "clark66");
> ...
> }
> 
> This has to be hardcoded for obvious reasons into m.proj, too. 
> 
> This is very bad design. We need to implement a new database, which
> contains projections, names, ellipsoids/spheroids, datum shift
> parameters and all the dependencies. (it comes to my mind that this is
> also a candidate for new library, as the key/value processing for the
> etc tables is cloned several times in the gis libray code). 
> Then we need to implement a set of library functions that manage/setup
> all this and call the proj library for the actual processing. 
> 
> I am open to any ideas, 

I think we could start off by differentiating between projections and
coordinate systems.  A projection is only a mathematical function. A
coordinate systems has the additional constraints of projection
parameters, map units, datum or ellipsoid, etc...

UTM, GS50, ALSK, State Plane, etc. are coordinate systems (or families
of coordinate systems).  For instance, UTM 10N - WGS 84, is sufficient
to define a coordinate system, Lambert Conformal Conic is not.

We have three types of coordinate systems to think about:

  1.  Unreferenced (X-Y), unitless
  2.  A Geographic or Geodetic Coordinate system
  3.  A Projected Coordinate system

I don't see why we shouldn't use the same nomenclature being used by
ESRI, PostGIS (PostgreSQL extension), and others.  Believe it's
an OpenGIS spec now (unsure).  But it captures the salient information.
Obviously, we need lookup tables to cross walk to PROJ 4 nomenclature,
but I suspect Frank already has most of that done.

Example matching my neck of the woods, ripped from PostGIS SQL.

--
-- NAD_1927_StatePlane_California_IV_FIPS_0404
--
INSERT INTO SPATIAL_REF_SYS (SRID, AUTH_NAME, AUTH_SRID, SRTEXT) VALUES
(26744,'ESRI',26744,'PROJCS["NAD_1927_StatePlane_California_IV_FIPS_0404",
GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],
PARAMETER["False_Easting",2000000],PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",-119],PARAMETER["Standard_Parallel_1",36],
PARAMETER["Standard_Parallel_2",37.25],
PARAMETER["Latitude_Of_Origin",35.33333333333334],
UNIT["Foot_US",0.30480060960121924]]');

User's can of course, define their own systems.

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list