How far are you from a lake? Living in Wisconsin, I wanted to know. There’s a lot of lakes in Wisconsin, but it was hard to visualize their distribution. Step 1) Download the high-resolution National Hydrography …
GIS
Extracting polygon areas in R
Suppose I have a shapefile (lakes.shp) which consists of 5 polygons (Figure 1a). library(raster) lakes = shapefile(’lakes.shp’) plot(lakes, col=’dodgerblue’,main=’a) lakes’,lty=0) The shapefile is stored as a SpatialPolygonsDataFrame. The data underlying these polygons can be viewed …