You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercise1.md
+23-13Lines changed: 23 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,32 @@ If you have not already downloaded the data for this workshop, do so now:
7
7
8
8
Be sure to extract the contents of the .zip file to your computer.
9
9
10
-
1. Start a new project in QGIS (Project menu > New)
11
-
2. Add the /exercise1/County_Erie2008_DEM_Index.shp by dragging it onto QGIS
10
+
## 1. Add the data to QGIS
11
+
12
+
- Start a new project in QGIS (Project menu > New)
13
+
- Add the /exercise1/County_Erie2008_DEM_Index.shp by dragging it onto QGIS
12
14
13
15
Let's verify that the data is in the correct location by adding a basemap, and set our map to use the CRS of the basemap.
14
16
15
-
3. Web > QuickMapServices > Google > Google Road
16
-
4. Right-click the "OSM Standard" layer name > Set CRS > Set Project CRS from Layer
17
+
- Web > QuickMapServices > Google > Google Road
18
+
- Right-click the "OSM Standard" layer name > Set CRS > Set Project CRS from Layer
19
+
20
+
## 2. Add some style
17
21
18
22
To improve the visibility of both the index map and the basemap, let's change the style of the index map:
19
23
20
-
5. Open the Layer Styling panel 
21
-
6. Select the "County_Erie2008_DEM_Index" layer
22
-
7. Click "Simple fill"
23
-
8. Set the "Fill color" to purple with about 50% opacity
24
+
- Open the Layer Styling panel 
25
+
- Select the "County_Erie2008_DEM_Index" layer
26
+
- Click "Simple fill"
27
+
- Set the "Fill color" to purple with about 50% opacity
24
28
(another option would be to set the "Fill style" to "No Brush")
25
-
9. Set the "Stroke color" to dark purple
29
+
- Set the "Stroke color" to dark purple
30
+
31
+
## 3. Explore the data
26
32
27
33
Let's explore the values in the table, to get an idea of how we might want to convert the fields into OpenIndexMaps properties.
28
34
29
-
10. Right-click the "County_Erie2008_DEM_Index" layer > Open Attribute Table
35
+
- Right-click the "County_Erie2008_DEM_Index" layer > Open Attribute Table
30
36
31
37
Notice the values found in the different fields:
32
38
@@ -48,7 +54,9 @@ For the purposes of an index map, we can probably leave out any columns where ev
48
54
49
55
QGIS has a processing tool called "Refactor fields" that will let us rename, delete, and manipulate the values of these fields
50
56
51
-
11. In the processing toolbox, search for "refactor fields" and open the tool. The settings below will output a copy of the index map with just four fields: title, label, note, and downloadUrl. In this case, we are putting the size into a note so that it will display in the GBL interface. **Be sure to set all the types to string.** The lengthand precision values don't matter for strings.
57
+
## 4. Refactor Fields
58
+
59
+
In the processing toolbox, search for "refactor fields" and open the tool. The settings below will output a copy of the index map with just four fields: title, label, note, and downloadUrl. In this case, we are putting the size into a note so that it will display in the GBL interface. **Be sure to set all the types to string.** The lengthand precision values don't matter for strings.
@@ -58,13 +66,15 @@ The source expressions can be typed in directly, but if you click on the epsilon
58
66
59
67
Leave the default setting "Create temporary layer", which will let you see the output without cluttering up your drive with files.
60
68
61
-
12.Click "Run" and leave the "Refactor fields" dialog open in case you need to make any corrections and run it again.
69
+
Click "Run" and leave the "Refactor fields" dialog open in case you need to make any corrections and run it again. (You can also get back to via the Processing menu > History)
62
70
63
71
You should have a new layer called "Refactored" on your map. Use the identify tool or look at the attribute table to make sure the results look right. If you need to make any corrections, remove the "Refactored" layer, then go back to the "Parameters" tab of the dialog, make your changes and run it again.
64
72
73
+
## 5. Save as GeoJSON
74
+
65
75
Once we're satisfied with the output, we are ready to save it as a GeoJSON file.
66
76
67
-
13. Right-click the "Refactored" layer > Make Permanent...
77
+
- Right-click the "Refactored" layer > Make Permanent...
68
78
- Set Format = GeoJSON
69
79
- Always click the `...` button to specify where you want the file saved!
70
80
- Under Layer Options, set RFC7946 = YES (this will force it into WGS84, and set decimal precision at 7 digits)
0 commit comments