What is a shapefile, anyway? A geodatabase? A raster? A hosted web layer? The GIS world can seem a bit overwhelming with so many different data types, but it doesn’t have to be. In this article I’ll walk you through using a few of the most common data types that you’ll encounter in GIS, so when someone throws data your way, you’ll know what to do with it.
This lesson was last tested on November 3, 2021, using ArcGIS Pro 2.8. If you’re using a different version of ArcGIS Pro, you may encounter different functionality and results.
Shapefiles are an Esri-developed file format for storing geographic (shape) and attribute (table) information.
1. Go to HongKong_Transportation and click the blue Download button.
2. Locate and unzip the downloaded .zip file.
3. If necessary, open the HongKong_Transportation folder.
Inside there are 8 files, all with the same name, but different file extensions.
A shapefile is actually a collection of files. The three required pieces are the .shp, .shx, and .dbf files. If one of these is missing, the data won’t work. But shapefiles also often come with extra parts, such as a .prj (projection) file—which defines the coordinate system for the data. If you delete that file, the data will draw, but maybe not in the right place.
To open a shapefile, you’ll need GIS software like ArcGIS Pro.
4. Open ArcGIS Pro. If you don’t have ArcGIS Pro, you can sign up for an ArcGIS free trial.
5. On the ArcGIS Pro startup page, under New, click Start without a template.
6. On the ribbon at the top, on the Insert tab, click New Map. Click the Map tab and click Add Data.
7. Browse to the shapefile, in the HongKong_Transportation folder. Here it only appears as one file, instead of 8.
8. Choose HongKong_Transportation.shp and click OK.
The data now appears on your map as a set of points.
9. In the Contents pane, right-click the layer and choose Attribute Table.
A table appears showing the attributes for the points. The column fclass looks like the most useful one; it contains the transportation feature types, including tram stops, bus stops, and railway stations. The name fclass may not seem like the most intuitive one, but shapefiles cannot have field names longer than 10 characters, so you’ll often run into cryptic headings like this.
10. Close the attribute table.
It is easy to save a shapefile and email it to a colleague, so you will come across many shapefiles if you’re searching for data on the internet. But this data type is older, so it has a number of limitations. For example, shapefiles cannot support time, null values, or the full range of Unicode characters.
Esri has since created a new format for storing data—the geodatabase. If you’re creating or saving data, I recommend using this format instead of shapefiles. Data stored in a geodatabase will take up less space and perform faster than shapefiles.
1. Go to HongKong GDB and click Download.
2. Locate and unzip HongKong.gdb.zip.
Inside is a file geodatabase: HongKong.gdb. Inside the geodatabase are a lot of files with mysterious names. Leave them alone.
3. Return to your map in ArcGIS Pro.
You can add the gdb data the same way you added the shapefile (with the Add Data button), but I’m going to show you another way.
4. In the Catalog pane, on the Project tab, right-click Databases and choose Add Database.
5. Browse to and select HongKong.gdb. Click OK.
6.In the Catalog pane, expand the Databases folder.
There are two geodatabases listed. Default.gdb was created automatically when you created the project. It is empty now, but any new data that you create in this project will land here by default.
7. Expand HongKong.gdb. This is the geodatabase that you just downloaded.
While a shapefile can only hold one layer of geographic information, a geodatabase is a container that can hold many layers. HongKong.gdb has two: a polygon layer and a line layer. The layers inside a geodatabase are called feature classes.
8. Select HongKong_ProjectedPopulation and drag it onto the map.
9. Right-click HongKong_Roads and choose Add To Current Map.
10. Find the HongKong_ProjectedPopulation layer in the Contents pane. Right-click and choose Symbology.
11. The Symbology pane appears. Under Primary symbology, choose Unique Values.
12. Change Field 1 to Population Trend.
Now the map is symbolized to show where overall population projections between 2014 and 2024 have been growing or shrinking in Hong Kong.
It looks as though some of the densest concentrations of bus and train stations are in areas experiencing a decline in population. Later, you’ll add more data to explore why.
One of the advantages of the geodatabase is storing all your related data in one place. It would be nice if your transportation point layer could be stored with your other Hong Kong data.
1. In the Contents pane, right-click HongKong_Transportation, point to Data, and choose Export Features.
The Export Features window appears. This will convert the shapefile into a feature class within your geodatabase.
2. Next to Output Location, click the Browse button.
3. In the Output Location window, in the navigation pane, click Databases. In the main window, click HongKong.gdb and click OK.
4. In the Export Features window, for Output Name, type HongKong_Transportation. Click OK.
In the Contents pane, you now have two layers called HongKong_Transportation. One is the original shapefile, and the other one is the new feature class copy.
5. Right-click the bottom HongKong_Transportation layer and choose Remove.
6. In the Catalog pane, under Databases, right-click HongKong.gdb and click Refresh. Expand HongKong.gdb.
The point layer is now stored inside the geodatabase alongside the line and polygon layers.
Web layers and services
The layers you’ve used so far are stored on your computer. You can also add online layers to your map without downloading them. These are sometimes called services, service layers, or web layers, but there are many different kinds, so you will see different names associated with them.
1. In the Catalog pane, click Portal and Living Atlas.
Portal provides access to online layers owned by yourself or others. The Living Atlas tab only shows the curated content available from ArcGIS Living Atlas of the World.
2. Search for World Population Density Estimate 2016 and point to the item in the search results to view more information. Click the Path link to view more information about this data in its item details page.
Not only is this item a service layer, but it is also an imagery layer, which means that it is raster data.
3. Drag World Population Density Estimate 2016 onto the map. It is a large layer, so it may take a few minutes to draw.
4. Turn off the HongKong_ProjectedPopulation layer so you can see the new one.
5. In the Contents pane, right-click World Population Density Estimate 2016 and click Properties.
6. In the Layer Properties window, click the Source tab.
Here you can read that the Data Type is Raster. The other layers that you added were vector data, which is made up of points, lines, and polygons. Raster data is instead stored in a grid. A digital photo is a kind of raster, made of a grid of differently colored pixels.
7. Click Cancel and zoom in on the map until you can see the cells.
They are color-coded to represent the level of population density.
8. On the ribbon, click the Map tab. Click Basemap and choose Imagery.
The basemap updates to show imagery of the earth that was collected by satellites and aircraft. Like the population density layer, this too is a raster. It is also a service layer, because it is hosted online.
9. Explore the map by zooming, panning, and turning layers on and off.
Before, it seemed as though a lot of bus stops and train stations were located in areas of declining population, but now you can see that those areas are also very densely populated. When viewed together, the Population Trend and Population Density layer suggests that surrounding urban areas are taking some of the burden of urbanization away from extremely dense Hong Kong Island, Kowloon, and Tsuen Wan. The imagery basemap can also help to explain why extremely dense areas exist right next to unpopulated green space: these places are mountainous, making them difficult to build on.
One of the advantages of services is that someone else updates them for you, so you don’t have to worry about downloading the latest version to keep your map up to date. Some layers even update in real time.
1. Copy this link: https://www.arcgis.com/home/item.html?id=bdfd0ca3f731412d81391d00b721bd08
You can also visit the link to read about the layer.
2. On the ribbon, on the Map tab, click the bottom part of the Add Data button and choose Data From Path.
3. Paste the URL and click Add.
A new layer, called TDCCTV, is added to your map.
4. Click one of the new points on the map.
A pop-up appears. It contains a traffic photo from a CCTV camera. Depending on where you are in the world, you might be looking at an image that was taken in the middle of the night.
5. Close the pop-up and reopen it after a few minutes. The time stamp and the traffic have changed.
Your map now has six layers (including the basemap) that you can use to explore population density in Hong Kong. Some are vector; some are raster. Some are stored in a geodatabase on your computer, and some are services that you access from online. There are many more data types that you can use in ArcGIS Pro, with different purposes and functionality.
Photo by Ryan McManimie on Unsplash
Commenting is not enabled for this article.