[R-sig-Geo] Get contour of a map
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Mon May 23 13:27:42 CEST 2011
On Mon, May 23, 2011 at 11:03 AM, Pierre Bruyer <pbruyer at agaetis.fr> wrote:
> Hello everybody,
>
> I search a function which returns the contour of map with levels like contourLines, but I would like this function return the border of the map too, because the function contourLines cannot consider the corner of the map and it is not adapted to fill polygon after that.
If you just need this information to draw a coloured map with, say,
green between 0 and 100, yellow between 100 and 200, and red between
200 and 300, then just start with your gridded data and use 'image'.
You may need to transform from values to colours, but that's easy.
If you really want connected polygons (and I can't think why...) ,
then perhaps using rgeos and overlaying the lines with a square
bounding box will work...
Barry
More information about the R-sig-Geo
mailing list