[R-sig-Geo] alter the lon & lat lines and coastline according to the grid coordinates

Costas Douvis cdouvis at geol.uoa.gr
Wed Jun 11 18:29:10 CEST 2008


Thank you both very much for replying.

The truth is that I'm still confused. I found what is needed from my
model. I believe that this script represents my grid in PROJ.4 format:

"+proj=lcc +lat_1=55 +lat_2=31 +lat_0=44 +lon_0=15 +x_0=60000 +y_0=60000
+ellps=GRS80 +units=m +no_defs"

(In the model's documentation is mentioned only that the map projection is
Lambert Conformal but I guess that ETRS_LCC is right. It's the only match
when I type   EPSG[grep("LCC", EPSG$note),] )

But I still don't understand what I should do with it. Could you please
tell me again in more detail? R seems to be different that anything I ever
worked with. Here's again what I'm trying to do: To draw a map of my data
on the x-y plain (that's easy, filled contour will do fine) and then add
the correct long & lat lines (which should be curves) and the coastline.

Kostas

> On Tue, 10 Jun 2008, Costas Douvis wrote:
>
>> 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.
>
> 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.
> From there you can - treating the grids as having point support, do what
> 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
>
>> 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 plo




More information about the R-sig-Geo mailing list