[R-sig-Geo] Plotting an image on a stereographic grid orientation

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Fri Aug 12 11:58:29 CEST 2005


Dag Johan Steinskog wrote:

> I would like to have a colour presentation of the data. Before I have 
> used the image command to plot a datamatrix when there is no specific 
> projection, and I would like to use the image command on this problem too.
> 
> I hope someone have time to help me.

  I think you'd have to loop over every cell in your matrix, get the 
projected coordinates of the cell and intermediate points along the 
edges, then draw a filled polygon in a colour relating to the value you 
want to display.

  The code in map.grid might help, since it shows how to compute 
projected coordinates, but the 'grid' is only a set of latitude and 
longitude lines. You'd need to work out coordinates for each cell in 
order to fill it in.

  I could probably bash out a function to do it in half a day, sadly I 
dont have half a day free at the moment!

Barry




More information about the R-sig-Geo mailing list