[Gdal-dev] OGRSpatialReference: ERROR 1: geocentric transformation missing z or ellps

Reiner Beck r.beck at m4com.de
Mon Oct 25 11:03:01 EDT 2004


Frank,

> Yikes!  Sorry about that.  I have added a pj_ prefix for all the 
> functions
> in geocent.c.  This will be in the next release.
>
Great!

>> - In addition to that, there's an issue with the Proj.4 lib creation:
>>  The README states: "Programmers may use projection library with 
>> calls to pj_init, pj_fwd, pj_inv and pj_transform."
>>  However, the shared library does not contain those functions. I have 
>> to manually add the objects (geod_inv.lo geod_set.lo geod_for.lo) to 
>> the "libproj_la_LIBADD" parameter ...
>
>
> I don't understand.  The geod_ files are for geodetic distance 
> calculations.
> I'm not sure what they have to do with pj_init, pj_fwd, pj_inv and 
> pj_transform.
> Are you saying that functions like pj_init() don't make it into your 
> library
> unless you add the geod files?  I find this very surprising, and I 
> will need
> more information on this before I can do anything.
>
Ooops, sorry about that. I mixed up the names ... The pj_init etc. are 
in the library. The geod_ functions are not, but I use those in my 
application. Maybe it's worth to add these functions to the library? Or 
does OGR support geodetic distance calculations?
BTW:
- Are the geod_ functions thread safe?
- Is it safe to use geod_set() only once to set e.g. WGS84? Or does OGR 
override the settings?

And, do I set up the coordinate system correctly:
      OGRSpatialReference swissSR;
      swissSR.SetProjCS("Schweizer Landeskoordinaten LV03");
      swissSR.SetWellKnownGeogCS("EPSG:4149");
      swissSR.SetHOM(46.95240555555556, 7.439583333333333, 90.0, 90.0, 
1.0, 600000, 200000);

      OGRSpatialReference swissSR2;
      swissSR2.SetProjCS("Schweizer Landeskoordinaten LV95");
      swissSR2.SetWellKnownGeogCS("EPSG:4150");
      swissSR2.SetHOM(46.95240555555556, 7.439583333333333, 90.0, 90.0, 
1.0, 2600000, 1200000);

I found in the csv file "pcs.cvs" the EPSG entries 2056 (CH1903+) and 
21781 (CH1903). But how can I use those entries? The call
      swissSR.SetWellKnownGeogCS("EPSG:2056");
produces only an empty string with exportToWkt.

Thanks!
Cheers
Reiner




More information about the Gdal-dev mailing list