Skip to content

alter the lon & lat lines and coastline according to the grid coordinates

3 messages · Costas Douvis, Roger Bivand, Tomislav Hengl

#
Hi everyone

My problem might be easy to deal with but I have already spent quite some
time and effort with no result. Any help will be appreciated

My data come from an RCM that I ran, Regcm3. My domain spans over the
wider area of Europe. The model grid is Lambert conformal. This means that
the data values that come from the same line or column of a data matrix do
not correspond to the exact same latitude or longitude. I have the values
of latitude and longitude of each grid point in 2 matrices with the same
dimensions as my data

So what I need to do is to plot those data on a map. I guess that the best
way to do this is to plot them on a rectangle map, preferably using
filled.contour (forgetting for a moment that the grid is actually bended),
and afterwards overlay the latitude and longitude lines and the coastline
as they really are on that map (i.e. the lat and lon lines should not be
straight)

Is that possible?
Or do you have a better suggestion?
#
On Tue, 10 Jun 2008, Costas Douvis wrote:

            
In case anyone was unsure (I was), these are regional climate models. 
There seem to be discussion on their lists. To get control of this data 
format, you need to establish its exact representation, in PROJ.4 format.
you want, but the first step is to find the exact PROJ.4 incantation. See 
the spTransform methods in rgdal for details. There is a copy of coarse 
GSHHS coastline data in maptools, see Rgshhs - note that these are in 
geographical coordinates.

My advice would be to try to construct a SpatialPointsDataFrame in LCC, 
but you'll meed to convert the pseudo-centres of the irregular grid cells 
in long-lat to planar coordinates first - perhaps see project in rgdal 
assuming that datum transformation is not an issue. But you'll need the 
correct lcc parameters (lat_0, lon_0, etc.) to get back to a regularly 
spaced planar grid.

Are they using ETRS_LCC?

library(rgdal)
EPSG <- make_EPSG()
EPSG[grep("ETRS-LCC", EPSG$note),]

Can you find out from the RCM documentation?

See gridlines in sp for the grid lines.

Roger

  
    
#
For European projects, we commonly use the official European Terrestrial Reference System
(www.euref.eu). You can convert your data from the longlat system to the ETRS using:
To simply (without any intervention) generate a gridded surface showing the change of values (the
pattern), see: https://stat.ethz.ch/pipermail/r-sig-geo/2008-June/003703.html 

Many European GI data you can obtain from: EEA (http://dataservice.eea.europa.eu); but also take a
look at:
2. Land cover maps (http://www-gem.jrc.it/glc2000/) 3. Landsat images (http://image2000.jrc.it/) 4.
General type maps (http://www.inspire-geoportal.eu/)


Tom Hengl
http://spatial-analyst.net


-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of
Costas Douvis
Sent: dinsdag 10 juni 2008 17:43
To: r-sig-geo at stat.math.ethz.ch
Subject: [R-sig-Geo] alter the lon & lat lines and coastline according to the grid coordinates

Hi everyone

My problem might be easy to deal with but I have already spent quite some
time and effort with no result. Any help will be appreciated

My data come from an RCM that I ran, Regcm3. My domain spans over the
wider area of Europe. The model grid is Lambert conformal. This means that
the data values that come from the same line or column of a data matrix do
not correspond to the exact same latitude or longitude. I have the values
of latitude and longitude of each grid point in 2 matrices with the same
dimensions as my data

So what I need to do is to plot those data on a map. I guess that the best
way to do this is to plot them on a rectangle map, preferably using
filled.contour (forgetting for a moment that the grid is actually bended),
and afterwards overlay the latitude and longitude lines and the coastline
as they really are on that map (i.e. the lat and lon lines should not be
straight)

Is that possible?
Or do you have a better suggestion?