google map tile creation & cutting with GrAD

Arlindo da Silva dasilva at ALUM.MIT.EDU
Sat Sep 13 08:30:24 EDT 2008


On Fri, Sep 12, 2008 at 10:55 PM, Pablo Romero <romero619 at hotmail.com>wrote:

> Does anyone have any experience/knowledge of how to create google map tiles
> using GrADS?
> Im currently working on a project that will require this, and Im having
> trouble with creating accurate image tiles with GrADS, here are some
> issues...
>
> 1) setting 'set mproj scaled' causes the entire plot area to be filled
> (this is desired/good, since I want ONLY the plot area visible in
> the output, and no gaps, no margins for axes, etc.), but calling 'printim'
> leaves a 1 pixel border/boundary around the image thats produced (this is
> not good, the images need to be seemless when placed alongside each other).
> is this '1 pixel gap' a limitation of printim or of how the plotting area
> gets filled when setting 'mproj scaled'?
>
>

You need to set a number of things off, e.g.,

  'set gxout shaded'
  'set parea 0 11 0 8.5'
  'set mpdraw off'
  'set frame off'
  'set xlab off'
  'set ylab off'
  'set mproj scaled'



> 3)google mapping question: *if* anyone has experience with map tile
> creation for google maps, can you please point me in the direction of a
> reference on how to derive the correct lat&lon boundaries for each tile at a
> given zoom level? Apparently there is a specific equation/method necessary
> for finding the dimensions of each tile in the google maps mercator
> projection.
>

This would make a nice recipe for the cookbooks.  I do not have experience
with these fine details of GoogleEarth. We usually present GoogleEarth  with
a global lat/lon image and GE handles all the rendering, including the zoom.
For reasonable quality, the image you provide better be hight resolution,
say 1600x800, or even better 3200x1600.

We have obtained better results making plots using the imshow() function in
pygrads as the AGG library produces a continuous colorbar, and allow us to
associate different levels transparency for each contour level. This is
particularly useful if you want to be able to see the earth underneath. You
can still do transparency for the image as a whole (or for a single color
with printim) but the results are not the same. Although not GE related,
take a look at some of these screenshots

    http://sourceforge.net/project/screenshots.php?group_id=161773


>
> Hope this question isnt too far off the topic of GrADS, but I do believe it
> is related, and any feedback might benefit others in future projects that
> also utilize google maps.
>

A set of examples showing beginning to end how to start with a grads data
file and end up with a functional kml/kmz would be an excellent recipe for
the cookbooks:

  http://cookbooks.opengrads.org/

If anybody out there has this expertise please consider contributing a
recipe. It would be much appreciated.

  Cheers!

    Arlindo



--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080913/fb7dc65d/attachment.html 


More information about the gradsusr mailing list