Need Help developing WGS84 ("Web") Mercator Projection for GrADS
Pablo Romero
romero619 at HOTMAIL.COM
Fri Jan 16 12:35:45 EST 2009
Hello,
Im currently reviewing, testing, & attempting to change the grads2.0 source code in order to add a Mercator projection.
For those who are familiar in GrADS code/development, I could please use some assistance.
I've narrowed the projection routines to the gwxmap.c source file.
I need help with:
2) how to create the "scaling" functions to correctly adjust the x,y values for the grads (internal) grid
1)determining in how many different places the scaling function needs to be applied,
(*since it seems there are a few different routines throughout all of the source code files where the
scaling is performed)
3)question: once the projection routine is implemented, it *should* take care of correctly scaling&drawing everything, including maps, grids, shapefiles (using shapefile extension), symbols, etc., is this correct?
The functions for transforming from lat/lon to x,y are fairly simple:
http://en.wikipedia.org/wiki/Mercator_projection
x=lon;
longitude remains unchanged
y=ln(tan((pi/4)+(lat/2)));
latitude is variable
so, I believe the key is just setting up the transformation functions and correctly referring to them throughout the source code.
Most other graphics packages already include a Mercator projection, and it gets used alot for web mapipng/tiling, such as google earth & MS Virtual Earth.
Grads needs this...
Those interested, please email me.
Thanks,,
P.Romero
_________________________________________________________________
Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_explore_012009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090116/2328d812/attachment.html
More information about the gradsusr
mailing list