[R] curvilinear grid

tom sgouros tomfool at as220.org
Thu Sep 27 06:57:01 CEST 2007


hadley wickham <h.wickham at gmail.com> wrote:

> You might be able to do this with the ggplot2 package - see for
> example http://had.co.nz/ggplot2/coord_map.html, which shows plots on
> map coordinate systems.  Because the design of ggplot2 means the
> coordinate system and geom (eg. points vs tiles) operate
> independently, you can draw image plots
> (http://had.co.nz/ggplot2/geom_tile.html) in any coordinate system.

These aren't quite what I have in mind.

> Can you provide more details about your curvilinear coordinate system?

The idea is that you're modeling an irregular shaped object, a body of
water, a river or estuary, say.  It's fairly common practice to use a
grid squished and rotated so that the main flow is along one axis, and
the other axis spans the flow in most spots.  So there is a single
transformation that gets you from a rectangular grid to the shape of
your estuary, but there isn't a tidy analytical way to describe it, like
there is with a map projection.  Instead there is an x and y for each
grid point, and the cell dimensions vary all over the place.

spplot, in the sp package seems almost to do what I'm after, but I can't
figure out if there is a way to invoke it that does what I want, or if
I'm barking up the wrong tree.

Thanks,

 -tom

> 
> On 9/26/07, Tom Sgouros <tomfool at as220.org> wrote:
> >
> > Hello all:
> >
> > A question from a new user.  I have data on a geo-referenced curvilinear
> > grid.  This is a grid with 75 rows and 51 columns, is not aligned
> > north-south, and the rows and columns are not straight. (And the
> > coordinates are in meters.)  I want to make image plots of this data,
> > but where the grid is deformed according to the correct locations of the
> > grid points, instead of coming out rectangular.
> >
> > I've found the sp package, which seems to be kind of close to what I'm
> > after, but maybe I haven't figured out how to invoke it properly, or
> > maybe there's another package I haven't found yet.  Can anyone direct me
> > to how to use R to map this kind of data?  Is there an example someone
> > might be able to share with me?
> >
> > Is there a collection of plots somewhere that someone might browse to
> > answer questions like this?
> >
> > Many thanks,
> >
> >  -tom
> >
> > --
> >  ------------------------
> >  tomfool at as220 dot org
> >  http://sgouros.com
> >  http://whatcheer.net
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> 
> -- 
> http://had.co.nz/
> 


-- 
 ------------------------
 tomfool at as220 dot org
 http://sgouros.com  
 http://whatcheer.net



More information about the R-help mailing list