Re: [R] intersect filled.contour and polygon

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Tue, 01 May 2007 13:39:37 +0200 (CEST)


On Mon, 30 Apr 2007, Pedro Mardones wrote:

> Dear R users;
>
> Is there any way to intersect a filled contour image and a polygon? My
> problem is that I want to create a kriging map and the boundaries of
> my map are given by the coordinates of the polygon.
>
> So far I can superompose the polygon in the filled.contour image but I
> don't know how to get rid of the contour image outside of the polygon
> boundaries.

Two possibilities seem to be present: define your polygon as a hole inside the bounding box of the image, with a link between the polygon and the bounding box, and fill it; or, perhaps better, only make kriging predictions for the polygon. Since you haven't given a code example, it isn't obvious how you are making the kriging predictions, but the choice of the newdata locations ought to decide - and they do not need to be a full grid, or even a regular grid at all.

If you need to follow this up, please consider using the R-sig-geo list.

>
> Any hint will be appreciated
> PM
>
> ______________________________________________
> R-help_at_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.
>

-- 
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: Roger.Bivand_at_nhh.no

______________________________________________
R-help_at_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.
Received on Tue 01 May 2007 - 17:42:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 01 May 2007 - 18:31:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.