Creating Vector Data - Video transcript
(The Statistics Canada symbol and Canada wordmark appear on screen with the title: "Demo 6 - Creating Vector Data")
So today we'll focus on creating our own vector data. This has many applications, such as digitizing collected field data, creating custom geographies, or delineating relevant features and attributes when a dataset does not already exist. These procedures give you control over the extent and content of features, while enabling information and geometries from other layers to be integrated. We'll explore these procedures by creating a polygon vector, delineating three features and providing some simple attributes.
So the first step is to load the Census Division file into the Layers Panel.
Then we'll enable three additional toolbars, by right-clicking on an empty space of the toolbar area or on a panel title – and selecting them from the drop-down. Specifically we'll enable the Advanced Digitizing, Shape Digitizing and Snapping Toolbars. We can reposition and detach these toolbars from the interface as desired.
To create a new dataset go to the Layer drop-down on the Menu-bar, select Create New Layer and New Shapefile Layer. This opens the box where we can begin to parametrize our new dataset.
The first thing we need to do is provide an output directory and filename – clicking on the triple-dot icon. We'll store it in the Intro Demo folder along with our two boundary files and we'll call the file AOI, short for Area of Interest.
Next we'll expand the Geometry type drop-down and select the desired geometry, in this case polygon.
Then we'll alter the projection away from the default - WGS84 – to a projected coordinate system, specifically UTM Zone 14. So we'll click on this icon to open the Coordinate System selector, in which we can use the specific name of a system of interest to isolate it. I'd like to highlight the results are divided by Geographic and Projected coordinate systems. If we select a system of interest it shows us the extent of its coverage in the bottom right-corner. So now let's search for the one of interest, in this case UTM Zone 14. Scrolling down to the bottom of the results we can see there is 14N and 14S. Since we are in the northern hemisphere we want 14N. We could also use the EPSG code to isolate the system of interest - in this case 32614 - clicking OK.
Now that we've defined the spatial characteristics of our dataset we can also add fields to the attribute table.
The first we'll add is a Comments field, leaving it as a text field type – providing a length of 100 characters, meaning that up to 100 characters can be stored for each feature within the field.
Then we'll add a second field – with a Decimal Number type. We'll call it AreaHA – short for Area in Hectares – using a length of 12 and precision of 2. In this case length refers to the number of characters before a decimal place and the precision refers to the number after.
So with our dataset parametrized we can now click OK.
So the dataset is listed in the Layers Panel and the Browser Panel, but is not visible in the canvas, since we have not delineated any features yet. So let's enable the editor and create our first feature.
We'll use the Add Polygon Feature tool. This is the most common tool for adding features of any geometry type – and for our polygon delineating features of any shape - regular or irregular.
We'll also enable the Advanced Digitizing Panel and the Snapping toolbar. By default the Advanced Digitizing Panel will snap our lines at 90° angles.
And the snapping toolbar can be used to snap the cursor to vector datasets – specifying the layers to snap to in the first drop-down – whether it is the active layer or all layers; the specific components of the datasets to snap to and the distance over which it should occur.
Scrolling in the first feature we'll delineate is a rectangle around the Census Division for Winnipeg.
So to delineate a feature we can left-click to add individual vertices to our polygon and once satisfied with its extent right-click to complete the feature.
This opens the Feature Attributes box, which enables us to populate the attributes for our feature while delineating. Since it's our first feature we'll apply an ID of 1, and we'll give it a distinct name in the Comments field – calling it Add Polygon Feature and click OK. Now it is visualized as shown in the Layers Panel.
Now we'll just toggle off the Advanced Digitizing Panel and Snapping Toolbars.
Next we'll use the Shape toolbar to add our second feature. This contains various tools for adding regular polygons to our dataset. Specifically we'll use the Add Rectangle from Centre and Point.
Click where you'd like the centre of the polygon to be, then expand outwards and right-click to complete the feature.
Since it's our second feature, we'll give it an ID of 2 and provide it with a name, in this case Shape Digitizing feature.
Additional tools on the Advanced Digitizing Toolbar can be explored on your own.
For our final feature I would like to show how copy and paste the geometries from another layer.
So toggle the AOI layer off, select the Census Division layer and use the Interactive Selection tool to select the divisions around Winnipeg. Then we can click on the Copy icon on the Digitizing Toolbar – re-enable the AOI layer and click the Paste icon. So eight features were successfully pasted. We could leave them as separate features, but in this case I'd like to use the Merge Selected Features tool to combine them into one. The entries of our pasted features are NULL since the fields do not match those in our AOI layer, so we can click on Skip All Fields and OK. Now our pasted features are combined into one.
Since the editor is still enabled we can open the Attribute table and provide it attributes – with an ID of 3 and we'll call it Merged CDs – short for census divisions - Nos. 2-3 and 9-14 around Winnipeg.
With our features delineated and attributes populated we can now save the edits and turn the Editor off.
Well-done! We have now successfully created our own dataset, delineated some custom geometries and populated their attributes. Specifically we learned how to:
- Parametrize our vector layer,
- Delineate features with available toolbars,
- Paste and merge geometries from other layers.
These procedures can be used to delineate line and point datasets, and also extend to editing the geometry of downloaded vector data. In the next demo we'll explore Attribute-Based Selection tools to help isolate features by criteria of interest.
(The words: "For comments or questions about this video, GIS tools or other Statistics Canada products or services, please contact us: statcan.sisagrequestssrsrequetesag.statcan@canada.ca" appear on screen.)
(Canada wordmark appears.)