[OSRS-PROJ] Re: Prime Meridian Support in PROJ.4
Frank Warmerdam
warmerdam at pobox.com
Thu Oct 3 11:58:16 PDT 2002
Luis Mota wrote:
> Hi again Frank
>
>> One concern I have is whether the prime meridian should be considered to
>> have any relationship to longitude parameters for a projection. For
>> instance, if a TM projection uses a geographic coordinate system with a
>> Lisbon prime meridian, is the central meridian supposed to be
>> specified as
>> degrees from Lisbon or Greenwich? What is common practice?
>
>
> This is an easy question , I think. Both alternatives are possible, but,
> as far as I remember, both EPSG and the ISO TC 211 (which deals with GI)
> speak of the 'greenwich longitude', which, in the case of the lisbon
> meridian, and as you can check in
> http://gdal.velocet.ca/cgi-bin/csv2html/TABLE=p_meridian/CODE=8902/, sth
> like -9.07. This means that this meridian is west of greenwich.
Luis,
If this is the case, the pj_fwd() and pj_inv() function which map from
projected coordinates to lat/long in the same GCS would need to take
the prime meridian into account as well. As I think about it, this isn't
really such a terribly hard thing to do and would be worthwhile to avoid
disconnects with EPSG, ISO and OGC standard data models.
> Anyway, in the meantime, I would like to take a look at the code to see
> if I understand it. Would you kindly point out what is function that
> addresses GCS to GCS conversion?
I believe you will want to insert the prime meridian support in
pj_transform() in src/pj_transform.c. Depending on our approach above,
the pj_inv() and pj_fwd() functions may also require prime meridian support.
I would suggest that the prime meridian should be parsed out by pj_init()
and placed as a new field in the PJ structure defined in projects.h. Perhaps
just under the "int islat_long" flag.
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
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list