[R-sig-Geo] How to create polygons for kriging

Ruben Roa RRoa at fisheries.gov.fk
Tue May 17 14:38:42 CEST 2005


> -----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 
> Chloe ARCHINARD
> Sent: 17 May 2005 13:19
> To: r-sig-geo at stat.math.ethz.ch
> Subject: [R-sig-Geo] How to create polygons for kriging
> 
> 
> Hello all,
> 
> I used geoR package to compute kriging with krige.conv() , 
> and to draw map I used contour() like this :
> 
> >contour(kc,locations, filled=TRUE, coords.data=geodata$coords,
> 
> >+color=terrain.colors)
> 
> And I want to limit the prediction inside data locations 
> (with borders()) which are not rectangular, so how can I 
> create a polygon which could contain my data? Or if someone 
> knows where I can find polygons data frame for the states of the US?

Just create a text file with the vertices and repeat the first vertix
at the end so that the polygon is closed. I see my maps with Surfer 8.0
and then use digitize to create the polygons. Then i edit the *.bln
file to make it directly readable using read.table in geoR.
After you have your polygon you would need the package splancs to do the 
kriging inside the polygon. geoR calls splancs.
Cheers
Ruben




More information about the R-sig-Geo mailing list