Skip to content

Commit

Permalink
Improve vector single symbol lesson
Browse files Browse the repository at this point in the history
  • Loading branch information
SrNetoChan committed Nov 24, 2017
1 parent a0acbdf commit f291072
Show file tree
Hide file tree
Showing 21 changed files with 126 additions and 71 deletions.
13 changes: 0 additions & 13 deletions layer_styling/Vector_single_symbol/01_active_layer.md

This file was deleted.

15 changes: 15 additions & 0 deletions layer_styling/Vector_single_symbol/01_introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
In QGIS, vector layers are styled by default using a single symbol. That
means that, unlike with categorized or graduated symbols, all features
of the layer will draw in the map canvas using the same symbol. This
lesson shows how to change a symbol. Besides, it also shows how to
create composed symbols.

---

**Note**: For this lesson, we suggest you undock the **Lessons panel**.
To do so, click the **undock** button in the top-right corner of the
panel. Then you can move it around using click and drag over the title.

---

Click **Next step** when you are ready to start.
14 changes: 14 additions & 0 deletions layer_styling/Vector_single_symbol/02_active_layer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
The lesson's project has a layer called *Raleigh_Downtown*, which is
styled using an opaque fill. But, it would be nice if we could see the
basemap as well.

![opace_fill.png](opace_fill.png)

In the **Layers Panel**, click the *Raleigh_Downtown* layer's name to
make it active.

The layer's item should be highlighted.

![active_layer.png](active_layer.png)

Once you have finished, click **Next step**.
3 changes: 0 additions & 3 deletions layer_styling/Vector_single_symbol/02_open_properties.md

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions layer_styling/Vector_single_symbol/03_open_styling_panel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
With the *Raleigh_Downtown* layer active, in the **Layers Panel**,
click the **Open the Layer styling dock** button.

![open_layer_styling_dock](open_layer_styling_dock.png)

The **Layer Styling** panel should open on the right-side of QGIS window
with the *Raleigh_Downtown* layer selected.

![layer_styling_panel](layer_styling_panel.png)

Once you have finished, click **Next step**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
In the **Layer Styling** panel:

1. Under **Fill**, click **Simple Fill**;
2. Set **Fill style** to `No brush`;
3. Set **Outline** color to `Blue` (example: `#1f78b4`);
4. Set **Outline style** to `Dot Line`;
5. Set **Outline width** to `1.0` `Milimeter`;

![set_style](set_style.png)

If, at the bottom of the panel, the **Live update** option is enabled,
the style changes will be visible on the map canvas automatically.
Otherwise, click **Apply**.

![live_update_option](live_update_option.png)

Click **Next step** once you are done.
11 changes: 0 additions & 11 deletions layer_styling/Vector_single_symbol/04_simple_fill_results.md

This file was deleted.

21 changes: 0 additions & 21 deletions layer_styling/Vector_single_symbol/05_add_line_pattern.md

This file was deleted.

15 changes: 15 additions & 0 deletions layer_styling/Vector_single_symbol/05_simple_fill_results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
On the map canvas, you should confirm that all the features of the
*Raleigh_Downtown* layer are represented with a simple fill style,
with hollow polygons with a dashed blue outline.

![hollow_fill_dashed.png](hollow_fill_dashed.png)

But, if we zoom a bit more, sometimes it's hard to tell what's inside
the polygons, and what's outside.

![hollow_fill_dashed_zoom.png](hollow_fill_dashed_zoom.png)

There are other style types for polygon layers, and we can combine them
with the previous one. That's what we will do in the next steps.

Once you are ready, click **Next step**.
35 changes: 35 additions & 0 deletions layer_styling/Vector_single_symbol/06_add_line_pattern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- Back in the **Layer Styling** panel, click the **Add symbol layer**
button.

![add_symbol_layer](add_symbol_layer.png)

- On the same toolbar, click the **Move down** button to make the new
symbol layer go bellow the previous one.

- Now, with the new **Simple fill** symbol layer selected, click the
**Symbol layer** type. Take some time to examine all the available
options for polygons. Then, choose the `line pattern fill`.

![set_Symbol_layer_type](set_Symbol_layer_type.png)

With the **Line pattern fill** selected:

- set the **Rotation** to `45.0º`;
- set **Distance** to `3` `Milimeter`.

![set_line_pattern_fill](set_line_pattern_fill.png)

Under the **Line pattern fill**, click **simple line**. Then:

- set the **Color** to `Blue` (example: `#1f78b4`);
- set **Pen Width** to `0.2` `milimeter`.

![set_line_style](set_line_style.png)

If, at the bottom of the panel, the **Live update** option is enabled,
the style changes will be visible on the map canvas automatically.
Otherwise, click **Apply**.

![live_update_option](live_update_option.png)

Click **Next step** once you are done.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Now, in the Map Canvas, you can see the layers's features styled with both symbol types.
Now, in the Map Canvas, you can see the layers's features styled with
both symbol types.

![pattern_line_fill.png](pattern_line_fill.png)

Expand Down
25 changes: 17 additions & 8 deletions layer_styling/Vector_single_symbol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,29 @@

# Steps

lesson.addStep("Introduction", "01_active_layer.md", function=lambda: setActiveLayer("Raleigh_Downtown"),
endcheck=lambda: layerActive("Raleigh_Downtown"), steptype=Step.MANUALSTEP)
lesson.addStep("Introduction",
"01_introduction.md",
steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.md")
lesson.addStep("Set active layer", "02_active_layer.md",
function=lambda: setActiveLayer("Raleigh_Downtown"),
endcheck=lambda: layerActive("Raleigh_Downtown"),
steptype=Step.MANUALSTEP)

lesson.addStep("Change layer's symbol", "03_change_simple_fill_settings.md", steptype=Step.MANUALSTEP)
lesson.addStep("Open Styling panel", "03_open_styling_panel.md",
steptype=Step.MANUALSTEP)

lesson.addStep("Confirm symbol's changes", "04_simple_fill_results.md", steptype=Step.MANUALSTEP)
lesson.addStep("Change layer's symbol", "04_change_simple_fill_settings.md",
steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.md")
lesson.addStep("Confirm symbol's changes", "05_simple_fill_results.md",
steptype=Step.MANUALSTEP)

lesson.addStep("Add Line pattern fill", "05_add_line_pattern.md", steptype=Step.MANUALSTEP)
lesson.addStep("Add Line pattern fill", "06_add_line_pattern.md",
steptype=Step.MANUALSTEP)

lesson.addStep("Confirm final result", "06_final_results.md", steptype=Step.MANUALSTEP)
lesson.addStep("Confirm final result", "07_final_results.md",
steptype=Step.MANUALSTEP)

# Suggested lessons

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added layer_styling/Vector_single_symbol/set_style.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f291072

Please sign in to comment.