Table of Contents
- Setting up working environment
- Clipping Raster - Using ArcToolbox
- Clipping Raster
Clipping rasters allows you to only work on or display a certain area of interest. It could be defined by a boundary from a vector shapefile, or it could be defined by the extent of the window.
In this tutorial, we will be working with the Digital Elevation Model (DEM) from Government of Canada's Geospatial Data, as well as the City of Toronto Former Municipality Boundaries file from City of Toronto Open Data Catalogue. Digital Eleveation Model is a raster dataset represents the surface of elevations. You can find a more detailed explanation of DEM here: https://learn.arcgis.com/en/related-concepts/digital-elevation-models.h…
First, download the Digital Elevation Model. There are multiple sources that you can retrieve Digital Elevation Models. This tutorial will lead you to download the raster dataset from Government of Canada's Geospatial Data from this website: http://maps.canada.ca/czs/index-en.html. Links to some alternative sources to download DEM are at the end of this tutorial.
In the "Find a location" tab, search for "Toronto". Choose the "Toronto, York, Ontario - City" option and zoom to this selection on the map.
Then, make sure you set the clipping area to the "Current Map Extent". After you check this box, the Map Navigation should highlight the selected area in yellow.
In the "Select data to be extracted" tab, select "Elevation".
In the "Select options and submit job" tab, select "Canadian Digital Elevation Model". Leave the polygon extent as it has already set to the Toronto boundary. For product, select only the "Digital Elevation Model (DEM)". Choose the WGS84 coordinate system for this tutorial. Leave the image resolution as default (20m), and input your email address to download the raster dataset.
You will be able to see the job status on the website. Usually the request is processed immediately but sometimes it might take a few hours if the volume for requests are very high. Check your email for the download link. In the email you received, copy the link ending with ".zip" in a new tab in the browser. Click "Enter" and the file will start to download.
City of Toronto's open data catalogue is a great source to access the a variety of data from the municipal government. You can search from the Open Data Catalogue in https://www.toronto.ca/city-government/data-research-maps/open-data/ope…. For the first task, search for the "Former Municipality Boundaries".
Also, download the dataset with the WGS84 coordinate system for this dataset to be consistent with the DEM we downloaded.
To make sure all your data are saved properly, make sure you create a folder to save all your data and maps in. Make sure you are not including spaces in all the folder names in the directory, because folders with spaces might result in unexpected errors when running analysis in ArcMap.
After creating folders, extract the data you just downloaded to your working folder. Repeat the same steps for other zipped datasets.
Open ArcMap, choose a Blank Map
Connecting your working folder to ArcMap. In the ArcCatalog panel, right click on the Folder Connections button. Click on "Connect to Folder". You can also click on the button on the top of the panel to establish folder connection (highlighted in the screenshot below).
If your ArcCatalog panel is missing, you can always click the ArcCatalog button on the top to open it.
Choose your working folder.
After connecting to folder, your ArcCatalog Panel should display the folder you've created. Now you can start adding your downloaded and extracted data to your map by dragging them to the map area or the Table Of Contents panel.
For the raster image, drag in the DEM.tif file (this raster image format is TIFF). And for the City of Toronto boundaries, drag in the cityprj_former_municpality.shp. This is the shapefile for the boundaries. Dragging in the .xml file and the .txt would not show any layers in the map.
When adding in the raster dataset, you might get a pop-up window asking if you would like to build pyramids. You can proceed by clicking either "Yes" or "No", it won't affect this exercise. Clicking "Yes" could help you to improve the display performance of the raster dataset.
On the Table of Contents panel on the left, you can adjust the drawing order (display order) of the two dataset if you want to have the boundaries layer on top of the DEM. Simply drag the layers up and down in the list would change the order to display them. Make sure you have the "List By Drawing Order" tab checked (highlighted in red)
Clipping Rasters - Two ways
The first method to clip raster is using the Data Management toolbox in ArcToolbox in ArcMap. Open ArcToolbox.
In ArcMap, there are two different clipping tools for vector and raster datasets. To find the Clip tool that's specifically designed for raster dataset, follow this directory: ArcToolbox → Data Management Tools → Raser → Raster Processing → Clip.
Open the Clip tool. The Input Raster should be the Digital Elevation Model we downloaded. Set up the City of Toronto Former Municipality Boundaries file as the Output Extent. You can also manually adjust the extent of the rectangle by changing the X Max/Min and Y Max/Min numbers.
The Clipping tool will clip your raster dataset to a rectangle that covers your extent. If you want your clipped raster data to be exact same shape as the clipping layer (the City boundaries, in this case), make sure you check the "Use Input Features for Clipping Geometry (optional)" box.
In the Output Raster Dataset, save your output dataset to your preferred directory.
Click OK after all settings are properly changed.
Note: every time you click on one of the settings, the Tool Help panel on the right will show you a detailed explanation of this option. You can read through if you are needs clarification with some of the options.
After the clipping process is completed, the clipped layer should be added to display automatically. If not, find your clipped dataset under the folder you chose to export the data in the ArcCatalog panel, and add it to the map.
The clipped raster dataset should look similar to the following image.
You can also zoom to the extent you wish to working on and clip your dataset based on your zoomed extent. Let's say you are specifically interested in Toronto's islands and port lands.
First, zoom to the islands and port lands.
Then, right-click on the raster layer you wish to clip from. Choose Data → Export Data...
In the Export Raster Data setup window, first make sure you checked "Data Frame (Current)" as your Extent, to only export the data within your zoomed dataframe. You can keep the Spatial Reference same as the original one.
You can also choose to export the raster file as the same format as the original dataset (TIFF). Saving raster file as TIFF could also avoid compressing the dataset.
Make sure you save the exported file to your working directory.
Add your exported layer the map area. Your clipped layer should look similar to this.
Province Digital Elevation Model - Ontario Open Data: https://www.javacoeapp.lrc.gov.on.ca/geonetwork/srv/en/main.home?uuid=0… (In "Transfer Options", choose "Provincial Digital Elevation Model - South - Revised Package September 2016")'
Swift Current LiDAR Project 2009 - DEM - Federal Open Data: https://open.canada.ca/data/en/dataset/72003a79-c799-49de-b135-de5af833… (In the list of "Resources", choose "Pre-packaged GeoTIF files (No linguistic component)"
USGS Earth Explorer: https://earthexplorer.usgs.gov/ ("Search Criteria" - identify your area of interests; "Data Sets" - choose "Digital Elevation")