[R-sig-Geo] Iterating and finding points in a spatial polygon
j.burke at earthlink.net
Tue Apr 28 05:14:31 CEST 2009
Thanks in advance. All insight is appreciated. R is great!
HELP NEEDED DESCRIPTION
A. Matching the "lappt" to the spatial polygon. To correctly retrieve
the "labpt" to use
in method ptp().
Working from the example found below. There might be a better way.
B. Iteration through the two spatial polygons.
POLYGON DESCRIPTION, ITERATION, OUTPUT
1. blk_sp contains many spatial polygons that fit entirely
into different pct_big_sp spatial polygons. No
Yes these are US census blocks
2. pct_big_sp contains around thirty different blk_sp
Yes these are precincts that contain the census blocks.
3. How this might work.
a. iterate through every pct_big_sp, then blk_sp
b. compares the blk_sp "labpt" (lat long format) to the
outside edge of the larger polygon b_big_sp. Probably
c. output the matching blk_sp IDs into an match_df data
frame. On a match, gather the following items as we
. blk_sp's ID name BLK
. pct_big_sp's ID name PCT
d. c_df output data frame example.
More information about the R-sig-Geo