Hope this helps Use writeOGR from the rgdal package to create a shapefile of your metro object. Then install QGIS (http://www.qgis.org/), a free and open-source GIS, and load the shapefile as a new layer. Then you can edit the layer, add new polygons, edit lines etc, then save as a shapefile to read back into R.
Messed up polygons shape when combining google map with Spatial Polygons
this will help I´m having problems when combining a map from Google Map Api, with a map constructed with geom_polygon from ggplot2. When I plot each map on their own, nothing weird shows up, but when I do combine them, some lines(straight) appear, messing up the boundaries I intend to highlight. , You need to add a group mapping to your aesthetic. e.g.
geom_polygon(data = distritos.fort,
aes(x = long, y = lat, group = group),
colour = "black",
fill = NA) + coord_map()
How to make dynamic labels from a spatial polygons dataframe for Polygons on a Leaflet map in R
I hope this helps . With this script, I am displaying a map with three isochrones. I would like the map to have labels containing the max time represented by each isochrone/polygon. , It works if you provide the max values as.character to the label.
To fix this issue The correct term to describe the act of joining, combining, uniting or merging (making 1 out of multiple) polygons seems to be either dissolving or aggregating. The funtion that works for me is aggregate() from the raster package.
this one helps. If I understand the question properly, you could use function gIntersects to find out which watersheds intersect your region, and then extract only those from the huc4 dataset. In practice, something like this could work: