[MetaCRS] proj4js design questions

Mike Adair madair at dmsolutions.ca
Wed Mar 5 10:33:01 EST 2008


Looks like we've been Warnocked [1] on Richard's previous email [2], but 
there are important design questions posed in that email that need 
discussion so I will pose the questions separately and hopefully get 
some discussion on these points:

- in the transform method, should the point be passed in by reference 
and coordinates transformed in place, or should transform just use the 
x,y,z values passed in and return a new point object to the caller?

My preference is to transform the coordinates in place, mostly because 
that is a lot more convenient and efficient in JavaScript than having to 
copy object properties before and after a transformation.  Also, any 
kind of 'point' object can be passed in and as long as it has x,y(z) 
properties, the transform will modify those properties leaving the rest 
of the object intact.

Comments?

Mike



[1] http://en.wikipedia.org/wiki/Warnocked
[2] 
http://sourceforge.net/mailarchive/forum.php?thread_name=ae9185aa0802110929t7dd45f74q78855b9f3b53e065%40mail.gmail.com&forum_name=mapbuilder-proj


More information about the MetaCRS mailing list