[R-sig-Geo] How to map longitude/latitude to shapes
dan.putler at sauder.ubc.ca
Fri Oct 22 17:24:02 CEST 2010
The way to do this is use a point-in-polygon test. The sp package (which
maptools has as a dependency) has the function point.in.polygon which
performs a point in polygon test.
On 10/22/2010 06:40 AM, Dazhi Jiao wrote:
> I am new to spatial data analysis so sorry to ask a dummy question. I am
> trying to use R maptools to map longitude/latitude to a list of school
> districts. I have read in the shapefile and there are about 500 polygons.
> Now given a new point with longitude and latitude, how can I decide which
> polygon it belongs to?
> Thank you!
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
More information about the R-sig-Geo