Skip to content
Prev 76867 / 398502 Next

Using R map data to determine associated state for a coordinate?

On Thu, 8 Sep 2005, Thomas Petzoldt wrote:

            
The example code will work very well, but since yesterday, when we
released a new version of maptools depending on the sp package, it can
look like:
Loading required package: foreign
Loading required package: sp
min       max
r1 -84.32385 -75.45698
r2  33.88199  36.58965
Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
   1.00   29.00   51.00   53.11   77.00  100.00  450.00 

and in this case the points would be read into the SpatialPoints object 
directly. Should overlay have trouble with the "huge" number of points, 
you could take them in smaller batches, storing the intermediate results. 
As Thomas said, you need the boundaries of the "Bundesland" first, and the 
accuracy of your results will depend on the degree of detail of the 
boundary polygons.

Roger Bivand