Could you please let me know more details about rgval package? I have never used it before. I only tried image.plot() where if you have regular lat and lon, a map() function can be used later to overlay state map onto it.
On 4/5/07, Roger Bivand <[EMAIL PROTECTED]> wrote: > > On Thu, 5 Apr 2007, Vladimir Eremeev wrote: > > > > > If your country or state borders are polygons or polylines, you could > > convert them to desired projection using the function project from the > > package rgdal. > > > > Latitude-longitude grid also could be added by generating desired > > polylines in lat-lon and converting them to the desired projection using > > project. > > > > Yes, the route would be to plot the image in its native projection, and > project the vector data (shorelines, countries) to the same projection. > Similar topics have been discussed on the R-sig-geo list, including the > reading of netcdf files (which are a bit picky) with functions in the > rgdal package which import the coordinate reference system directly. > > Please follow this up on R-sig-geo if you need more help. > > > > > Linda Smith wrote: > > > > > > I have a netcdf gridded file with LCC projection. I can easily use > > > image.plot to visualize it. However, as the axises are in X,Y, not Lat > and > > > Lon, I could not add state or country maps onto it (or lat lon > > > information). > > > I do have a grid2d file that describes the lat and lon for each (X,Y) > > > grid, > > > but the lat and lon are not regularly spaced, so I could not use > > > image.plot. > > > > > > Does anyone know how to plot this type of gridded data so that country > or > > > state borders can be easily added? Thanks a lot! > > > > > > > What do you mean by "grid2d file that describes the lat and lon for each > > (X,Y) grid"? > > If this are two rasters of the same size having corresponding latitude > and > > longitude values in each raster cell, then you could use contourLines to > get > > lat-lon grid. However, you, probably, will want to smooth it. > > > > -- > Roger Bivand > Economic Geography Section, Department of Economics, Norwegian School of > Economics and Business Administration, Helleveien 30, N-5045 Bergen, > Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 > e-mail: [EMAIL PROTECTED] > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo