Clipping a Surface By a Polygon
Background:
A common function in standard GIS software enables users to create a raster surface and extract values or clip it based on a set of polygons. This may be used in cases where you want analysis to be constrained to within a town’s boundaries or a coastline. This tutorial will outline how to create a surface using kernel density estimation (KDE) and then clip the surface so that it is constrained within the City of London Boundary.
Data Requirements:
City of London Boundary Shapefile: Download (requires unzipping).
London Cycle Hire Locations: Download.
Install the following packages (if you haven’t done so already):



Hi! interesting reading the code – FWIW I also had to install
rgl
rpanel
to get it to run
Thanks for that- yeah the sm package needs it. Sorry for missing it off!
Absolutely fantastic. This is really useful. Thanks.
Installing sm and maptools was all I needed to get it working.
Thanks for the nice post.
Clipping a Surface By a Polygon http://t.co/tRg3hMz via @spatialanalysis
Alternative data source if needed (NB rename Easting/Northing):
http://data.london.gov.uk/datafiles/transport/tfl-cycle-hire-locations.csv
V useful tutorial