November 2018
Beginner to intermediate
354 pages
6h 59m
English
In this example, we'll merge two shapefiles of two districts called Dhaka and Gazipur. Now, BGD_adm3_data_re is a shapefile containing all of the districts of Bangladesh as separate polygons. We have the shapefile of Dhaka but not of Gazipur, so we'll create a shapefile of Gazipur before we start merging these two shapefiles. Let's load the required packages now:
library(sp)library(rgdal)library(maptools)
Now, we'll load the BGD_adm3_data_re.shp shapefile; as we have seen before, the NAME_3 field contains the names of the districts. We'll use this field to select the feature that corresponds to the Gazipur district:
map_bd = readOGR("F:/Hands-on-Geospatial-Analysis-Using-R-and-QGIS/Chapter04/Data","BGD_adm3_data_re") ...Read now
Unlock full access