Exemplo n.º 1
0
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule


# Lesson description
lesson = Lesson("11. Labelling vector layers", "Layer styling",
                "00_lesson.html")

# Steps
lesson.addStep("Set 'Wake_ZIP_Codes' layer as active layer", "01_activelayer.html",
               function=lambda: setActiveLayer("Wake_ZIP_Codes"),
               endcheck=lambda: layerActive("Wake_ZIP_Codes"),
               steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")

lesson.addStep("Set labels settings for polygons layer", "03_turn_labels_on.html", steptype=Step.MANUALSTEP)

lesson.addStep("Confirm labels results", "04_label_results.html", steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")

lesson.addStep("Set improved position", "05_improve_label_position.html", steptype=Step.MANUALSTEP)

lesson.addStep("Confirm position changes", "06_label_position_results.html", steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "07_open_properties.html")
Exemplo n.º 2
0
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

# Lesson description
lesson = Lesson("04. Vector rule-based symbols", "Layer styling",
                "00_lesson.html")

# Steps
lesson.addStep("Introduction", "01_intro.html", steptype=Step.MANUALSTEP)

lesson.addStep("Set 'Buildings' layer as active layer",
               "02_active_layer.html",
               function=lambda: setActiveLayer("Buildings"),
               endcheck=lambda: layerActive("Buildings"),
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "03_open_properties.html")

lesson.addStep("Set the first rule",
               "04_set_first_rule.html",
               steptype=Step.MANUALSTEP)

lesson.addStep("Confirm the results",
               "05_set_first_rule_results.html",
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "03_open_properties.html")
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

lesson = Lesson("Export to geojson", "Basic lessons", "lesson.html")
lesson.addStep("Set 'points' layer as active layer", "activelayer.md",
               function=lambda: setActiveLayer("points"),
               endcheck=lambda:layerActive("points"),
               steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Layer/Save As...")
lesson.addStep("Save the file as geojson", "saveas.html", steptype=Step.MANUALSTEP)
lesson.addNextLesson("Basic lessons", "Export to geojson (yaml example)")

Exemplo n.º 4
0
# -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

lesson = Lesson("05. Reproject vector layer", "General tasks", "lesson.html")
lesson.addStep("Introduction", "introduction.html", steptype=Step.MANUALSTEP)
lesson.addStep("Set 'Wake_Fire_Stations' layer as active layer",
               "activelayer.html",
               function=lambda: setActiveLayer("Wake_Fire_Stations"),
               endcheck=lambda: layerActive("Wake_Fire_Stations"),
               steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Layer/Properties...", "openproperties.html")
lesson.addStep("Confirm layer CRS",
               "confirmcrs.html",
               steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Layer/Save As...")
lesson.addStep("Save a reprojected copy of the layer",
               "saveas.html",
               steptype=Step.MANUALSTEP)
lesson.addNextLesson("General tasks",
                     "06. Reproject vector layer (using Processing)")
Exemplo n.º 5
0
# -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

lesson = Lesson("04. Set and define a vector layer CRS", "General tasks", "lesson.html")

lesson.addStep("Introduction", "introduction.html", steptype=Step.MANUALSTEP)
lesson.addStep("Set 'Wake_BlockGroup_2010' layer as active layer", "activelayer.html",
               function=lambda: setActiveLayer("Wake_BlockGroup_2010"),
               endcheck=lambda: layerActive("Wake_BlockGroup_2010"),
               steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Layer/Set CRS of Layer(s)")
lesson.addStep("Set the layer's correct CRS", "setcrs.html", steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Vector/Data Management Tools/Define current projection", "gotodefineprojection.html")
lesson.addStep("Define new CRS to file", "defineprojection.html", steptype=Step.MANUALSTEP)
lesson.addNextLesson("General tasks", "05. Reproject vector layer")
Exemplo n.º 6
0
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

# Lesson description
lesson = Lesson("02. Vector categorized symbols", "Layer styling",
                "00_lesson.html")

# Steps
lesson.addStep("Set 'Downtown streets' layer as active layer",
               "01_activelayer.html",
               function=lambda: setActiveLayer("Downtown streets"),
               endcheck=lambda: layerActive("Downtown streets"),
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")

lesson.addStep("Configure categorized Symbol",
               "03_set_categories.html",
               steptype=Step.MANUALSTEP)

lesson.addStep("Confirm results",
               "04_set_categories_results.html",
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")
Exemplo n.º 7
0
# -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

lesson = Lesson("Export to geojson", "Basic lessons", "lesson.html")
lesson.addStep("Set 'points' layer as active layer", "activelayer.md",
               function=lambda: setActiveLayer("points"),
               endcheck=lambda: layerActive("points"),
               steptype=Step.MANUALSTEP)
lesson.addMenuClickStep("Layer/Save As...")
lesson.addStep("Save the file as geojson", "saveas.html", steptype=Step.MANUALSTEP)
lesson.addNextLesson("Basic lessons", "Export to geojson (yaml example)")

Exemplo n.º 8
0
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

# Lesson description
lesson = Lesson("05. Create Proportional Symbols", "Layer styling",
                "00_lesson.html")

# Steps
lesson.addStep("Set 'Wake_Public_Schools' layer as active layer",
               "01_activelayer.html",
               function=lambda: setActiveLayer("Wake_Public_Schools"),
               endcheck=lambda: layerActive("Wake_Public_Schools"),
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")

lesson.addStep("Use size assistant to set symbols",
               "03_set_proportional_symbols.html",
               steptype=Step.MANUALSTEP)

lesson.addStep("Confirm results",
               "04_proportional_size_results.html",
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")
Exemplo n.º 9
0
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

# Lesson description
lesson = Lesson("07. Raster multiband styling", "Layer styling",
                "00_lesson.html")

# Steps
lesson.addStep("Set 'landsat_8_sample' layer as active layer",
               "01_activelayer.html",
               function=lambda: setActiveLayer("landsat_8_sample"),
               endcheck=lambda: layerActive("landsat_8_sample"),
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")

lesson.addStep("Set layer style to Singleband pseudocolor",
               "03_set_432_natural_color.html",
               steptype=Step.MANUALSTEP)

lesson.addStep("Confirm results",
               "04_set_432_natural_color_results.html",
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")
Exemplo n.º 10
0
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from lessons.lesson import Lesson, Step
from lessons.utils import setActiveLayer, layerActive
from qgis.utils import iface
from lessons import addLessonModule

# Lesson description
lesson = Lesson("06. Raster singleband styling", "Layer styling",
                "00_lesson.html")

# Steps
lesson.addStep("Set 'dem25' layer as active layer",
               "01_activelayer.html",
               function=lambda: setActiveLayer("dem25"),
               endcheck=lambda: layerActive("dem25"),
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")

lesson.addStep("Set layer style to Singleband pseudocolor",
               "03_set_singleband_pseudocolor.html",
               steptype=Step.MANUALSTEP)

lesson.addStep("Confirm results",
               "04_set_singleband_pseudocolor_results.html",
               steptype=Step.MANUALSTEP)

lesson.addMenuClickStep("Layer/Properties...", "02_open_properties.html")