[R-sig-Geo] finding points outside but very near a polygon

Medina, Hernan HMedina at iso.com
Mon Nov 19 23:55:47 CET 2007


I used the code below to find points in a North American Regional
Reanalysis data set that were within the 48 contiguous states.  

# The 48 contiguous states
m <- map("state",fill=TRUE,plot=FALSE)
indx1 <- in.polygon(m,list(x=my_lon,y=my_lat))
st <- map.where("state",my_lon,my_lat)

Unfortunately, this leaves out points that are over water.  For some of
the counties around Seattle Washington, I missed some of the points.  Is
there a way to find points that are just a little bit outside the border
of the polygon?

Hernan L. Medina

This email is intended for the recipient only.  If you are not the intended recipient please disregard, and do not use the information for any purpose.




More information about the R-sig-Geo mailing list