Skip to content

Instantly share code, notes, and snippets.

@sdenier
Last active January 15, 2022 13:54
Show Gist options
  • Save sdenier/3566b13eae1cfd6751a95e5322584928 to your computer and use it in GitHub Desktop.
Save sdenier/3566b13eae1cfd6751a95e5322584928 to your computer and use it in GitHub Desktop.
QGis procedure to visualize orienteering track file (Garmin tcx) + map "a la QuickRoute"

QuickRoute-like Visualisation for Orienteering GPS Tracks using QGis

See QuickRoute website for the one and only inspiration. Unfortunately, since my Mac is a bit old and running VMWare and the like are consuming, I no longer bother to launch it. But I still miss QuickRoute features! So I resolved to play a bit with GPS track files and QGis to get something similar.

For commodity, since I usually upload my Forerunner data to Garmin Connect, I start with a Garmin tcx file, not a gpx. Though a similar procedure can be applied on gpx, Garmin tcx already contains speed field for each point. That's one less thing to do!

1. Extract GPS Track Points

  • On Garmin Connect, select the desired activity and export as tcx
  • Run the Python script tcx2csv.py3 to extract tcx data as CSV for QGis
python tcx2csv.py3 <activity.tcx>

It outputs a trackdata.csv with latitude, longitude, altitude (not used), distance (used as order), speed.

Run with Python3, install lxml dependency. As usual with Python, it is recommended to use virtualenv:

python3 -m venv tcx2csv
source tcx2csv/bin/activate
pip install lxml

2. Import Track Points in QGis

  • Launch QGis (3.x) and create a new project

  • Select appropriate project CRS (e.g. EPSG:2154 for France) - otherwise your scanned map may be a little too distorted and won't match well with track points

  • Add trackdata.csv as a Delimited Text file with the Data Source Manager. Check import options are appropriate:

    • in Geometry Definition, point coordinates X/Y should have been set automatically to longitude/latitude
    • keep Geometry CRS as EPSG:4326 since we are dealing with GPS coordinates
  • [optional] Add an OpenStreetMap layer as background to quickcheck points match with location

  • Load style track_speed_color.qml for track data symbology to color-code points with the speed field

    • this is a graduated symbology with a red-orange-yellow-green semi-transparent color ramp based on the speed field (given in meter per second)
    • you might click on the classify button to recompute color classes - 5 classes based on "Equal Count (Quantile)" seems to give good visual results (but that might be perfected)

To give a better sense of track continuity, we can compute a path from points:

  • Open the Processing toolbox and look for the Points to path process
  • Select the trackdata layer as input
  • Select the distance attribute as Order field (this is the relative distance traveled from start, so is a good proxy for order)
  • Run the algorithm and put the layer under the points layer
  • Load style track_path.qml to better visualize the track path continuity

3. Import and Georeference the Map

Before proceeding, you should retrieve a high-quality image or scan of your map, e.g. in TIFF format.

  • Open the Georeferencer tool in the Raster menu

  • Open Georeferencer Transformation Settings and check parameters - in particular Target SRS which should match the project one (e.g. EPSG:2154)

  • Now add points to georeference the map:

    • spot an easy-to-identify track point (start, control point, sharp change of direction) and its location on the map
    • click point on map location then in popup, click on From Map Canvas button and click on matching point in the main view
    • repeat for 2 or 3 points, preferably away from each other, on the edge of the track
  • Run the Start Georeferencing button to add the map as a raster layer and move it below track layers

You're done! You should have a colorful track layer on top of your raster map. You can reiterate with the above steps for better visualisation/alignment.

4. Export as Image

This is the simplest way to export, but other procedures may apply.

  • Zoom to track points layer - or zoom until you are satisfied with the overall rendering (size of points/path compared to the georeferenced map)
  • Choose Export Map to Image with georeferenced map as extent

Area for Improvement

  • GPX file import (need to recompute speed)
  • point/path symbology (e.g. display path with the color-coded range)
  • map georeferencing (best transformation settings, e.g. type, SRS...)
import os, csv, sys
import lxml.etree as etree
if len(sys.argv) == 1:
sys.exit("give me a tcx file to read!")
cd = os.path.dirname(os.path.abspath(__file__))
xmlfile = sys.argv[1]
dom = etree.parse(os.path.join(cd, xmlfile))
columns = ['latitude', 'longitude', 'altitude', 'distance', 'speed']
with open(os.path.join(cd, 'trackdata.csv'), 'w') as m:
writer = csv.writer(m)
writer.writerow(columns)
for trackpoint in dom.getroot().iter('{*}Trackpoint'):
latitude = trackpoint.find('.//{*}LatitudeDegrees').text
longitude = trackpoint.find('.//{*}LongitudeDegrees').text
altitude = trackpoint.find('.//{*}AltitudeMeters').text
distance = trackpoint.find('.//{*}DistanceMeters').text
speed = trackpoint.find('.//{*}Speed').text
writer.writerow([latitude, longitude, altitude, distance, speed])
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis simplifyAlgorithm="0" simplifyLocal="1" simplifyDrawingTol="1" simplifyDrawingHints="1" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0" version="3.12.2-București" minScale="100000000" simplifyMaxScale="1" labelsEnabled="0" readOnly="0" maxScale="0">
<flags>
<Identifiable>1</Identifiable>
<Removable>1</Removable>
<Searchable>1</Searchable>
</flags>
<renderer-v2 type="singleSymbol" enableorderby="0" symbollevels="0" forceraster="0">
<symbols>
<symbol type="line" clip_to_extent="1" name="0" force_rhr="0" alpha="0.5">
<layer enabled="1" pass="0" locked="0" class="SimpleLine">
<prop v="square" k="capstyle"/>
<prop v="5;2" k="customdash"/>
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
<prop v="MM" k="customdash_unit"/>
<prop v="0" k="draw_inside_polygon"/>
<prop v="bevel" k="joinstyle"/>
<prop v="35,35,35,255" k="line_color"/>
<prop v="solid" k="line_style"/>
<prop v="3.06" k="line_width"/>
<prop v="MM" k="line_width_unit"/>
<prop v="0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="0" k="ring_filter"/>
<prop v="0" k="use_custom_dash"/>
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
<layer enabled="1" pass="0" locked="0" class="SimpleLine">
<prop v="square" k="capstyle"/>
<prop v="5;2" k="customdash"/>
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
<prop v="MM" k="customdash_unit"/>
<prop v="0" k="draw_inside_polygon"/>
<prop v="bevel" k="joinstyle"/>
<prop v="255,255,255,255" k="line_color"/>
<prop v="solid" k="line_style"/>
<prop v="2.06" k="line_width"/>
<prop v="MM" k="line_width_unit"/>
<prop v="0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="0" k="ring_filter"/>
<prop v="0" k="use_custom_dash"/>
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
<rotation/>
<sizescale/>
</renderer-v2>
<customproperties>
<property key="dualview/previewExpressions" value="&quot;begin&quot;"/>
<property key="embeddedWidgets/count" value="0"/>
<property key="variableNames"/>
<property key="variableValues"/>
</customproperties>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerOpacity>1</layerOpacity>
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Histogram">
<DiagramCategory spacingUnitScale="3x:0,0,0,0,0,0" lineSizeType="MM" penWidth="0" labelPlacementMethod="XHeight" height="15" opacity="1" backgroundColor="#ffffff" backgroundAlpha="255" barWidth="5" rotationOffset="270" width="15" spacing="5" penColor="#000000" minScaleDenominator="0" penAlpha="255" sizeScale="3x:0,0,0,0,0,0" showAxis="1" maxScaleDenominator="1e+08" scaleBasedVisibility="0" lineSizeScale="3x:0,0,0,0,0,0" spacingUnit="MM" minimumSize="0" sizeType="MM" enabled="0" diagramOrientation="Up" scaleDependency="Area" direction="0">
<fontProperties style="" description=".SF NS Text,13,-1,5,50,0,0,0,0,0"/>
<axisSymbol>
<symbol type="line" clip_to_extent="1" name="" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleLine">
<prop v="square" k="capstyle"/>
<prop v="5;2" k="customdash"/>
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
<prop v="MM" k="customdash_unit"/>
<prop v="0" k="draw_inside_polygon"/>
<prop v="bevel" k="joinstyle"/>
<prop v="35,35,35,255" k="line_color"/>
<prop v="solid" k="line_style"/>
<prop v="0.26" k="line_width"/>
<prop v="MM" k="line_width_unit"/>
<prop v="0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="0" k="ring_filter"/>
<prop v="0" k="use_custom_dash"/>
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</axisSymbol>
</DiagramCategory>
</SingleCategoryDiagramRenderer>
<DiagramLayerSettings zIndex="0" linePlacementFlags="18" placement="2" dist="0" priority="0" obstacle="0" showAll="1">
<properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</properties>
</DiagramLayerSettings>
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
<activeChecks/>
<checkConfiguration/>
</geometryOptions>
<referencedLayers/>
<referencingLayers/>
<fieldConfiguration>
<field name="fid">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="begin">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="end">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
</fieldConfiguration>
<aliases>
<alias field="fid" index="0" name=""/>
<alias field="begin" index="1" name=""/>
<alias field="end" index="2" name=""/>
</aliases>
<excludeAttributesWMS/>
<excludeAttributesWFS/>
<defaults>
<default field="fid" applyOnUpdate="0" expression=""/>
<default field="begin" applyOnUpdate="0" expression=""/>
<default field="end" applyOnUpdate="0" expression=""/>
</defaults>
<constraints>
<constraint field="fid" unique_strength="1" exp_strength="0" constraints="3" notnull_strength="1"/>
<constraint field="begin" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
<constraint field="end" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
</constraints>
<constraintExpressions>
<constraint exp="" field="fid" desc=""/>
<constraint exp="" field="begin" desc=""/>
<constraint exp="" field="end" desc=""/>
</constraintExpressions>
<expressionfields/>
<attributeactions>
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
</attributeactions>
<attributetableconfig actionWidgetStyle="dropDown" sortOrder="0" sortExpression="">
<columns>
<column hidden="0" type="field" width="-1" name="begin"/>
<column hidden="0" type="field" width="-1" name="end"/>
<column hidden="1" type="actions" width="-1"/>
<column hidden="0" type="field" width="-1" name="fid"/>
</columns>
</attributetableconfig>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
<storedexpressions/>
<editform tolerant="1"></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""
QGIS forms can have a Python function that is called when the form is
opened.
Use this function to add extra logic to your forms.
Enter the name of the function in the "Python Init function"
field.
An example follows:
"""
from qgis.PyQt.QtWidgets import QWidget
def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget, "MyLineEdit")
]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable>
<field editable="1" name="begin"/>
<field editable="1" name="end"/>
<field editable="1" name="fid"/>
</editable>
<labelOnTop>
<field name="begin" labelOnTop="0"/>
<field name="end" labelOnTop="0"/>
<field name="fid" labelOnTop="0"/>
</labelOnTop>
<widgets/>
<previewExpression>begin</previewExpression>
<mapTip></mapTip>
<layerGeometryType>1</layerGeometryType>
</qgis>
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis simplifyAlgorithm="0" simplifyLocal="1" simplifyDrawingTol="1" simplifyDrawingHints="0" styleCategories="AllStyleCategories" hasScaleBasedVisibilityFlag="0" version="3.12.2-București" minScale="100000000" simplifyMaxScale="1" labelsEnabled="0" readOnly="0" maxScale="0">
<flags>
<Identifiable>1</Identifiable>
<Removable>1</Removable>
<Searchable>1</Searchable>
</flags>
<renderer-v2 type="graduatedSymbol" enableorderby="0" graduatedMethod="GraduatedColor" symbollevels="0" forceraster="0" attr="speed">
<ranges>
<range symbol="0" upper="1.361999988555908" label="0 - 1,36" render="true" lower="0.000000000000000"/>
<range symbol="1" upper="1.773000001907349" label="1,36 - 1,77" render="true" lower="1.361999988555908"/>
<range symbol="2" upper="2.164999961853027" label="1,77 - 2,16" render="true" lower="1.773000001907349"/>
<range symbol="3" upper="2.575000047683716" label="2,16 - 2,58" render="true" lower="2.164999961853027"/>
<range symbol="4" upper="4.468999862670898" label="2,58 - 4,47" render="true" lower="2.575000047683716"/>
</ranges>
<symbols>
<symbol type="marker" clip_to_extent="1" name="0" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
<prop v="0" k="angle"/>
<prop v="215,25,28,204" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="3" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" clip_to_extent="1" name="1" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
<prop v="0" k="angle"/>
<prop v="244,138,80,205" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="3" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" clip_to_extent="1" name="2" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
<prop v="0" k="angle"/>
<prop v="255,216,145,205" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="3" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" clip_to_extent="1" name="3" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
<prop v="0" k="angle"/>
<prop v="233,247,184,204" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="3" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" clip_to_extent="1" name="4" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
<prop v="0" k="angle"/>
<prop v="169,222,162,204" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="3" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
<source-symbol>
<symbol type="marker" clip_to_extent="1" name="0" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleMarker">
<prop v="0" k="angle"/>
<prop v="141,90,153,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="3" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</source-symbol>
<colorramp type="gradient" name="[source]">
<prop v="215,25,28,204" k="color1"/>
<prop v="169,222,162,204" k="color2"/>
<prop v="0" k="discrete"/>
<prop v="gradient" k="rampType"/>
<prop v="0.330529;253,174,97,205:0.663462;255,255,191,204" k="stops"/>
</colorramp>
<classificationMethod id="Quantile">
<symmetricMode enabled="0" symmetrypoint="0" astride="0"/>
<labelFormat format="%1 - %2" labelprecision="4" trimtrailingzeroes="1"/>
<parameters>
<Option/>
</parameters>
<extraInformation/>
</classificationMethod>
<rotation/>
<sizescale/>
</renderer-v2>
<customproperties>
<property key="dualview/previewExpressions" value="&quot;latitude&quot;"/>
<property key="embeddedWidgets/count" value="0"/>
<property key="variableNames"/>
<property key="variableValues"/>
</customproperties>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerOpacity>1</layerOpacity>
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Histogram">
<DiagramCategory spacingUnitScale="3x:0,0,0,0,0,0" lineSizeType="MM" penWidth="0" labelPlacementMethod="XHeight" height="15" opacity="1" backgroundColor="#ffffff" backgroundAlpha="255" barWidth="5" rotationOffset="270" width="15" spacing="5" penColor="#000000" minScaleDenominator="0" penAlpha="255" sizeScale="3x:0,0,0,0,0,0" showAxis="1" maxScaleDenominator="1e+08" scaleBasedVisibility="0" lineSizeScale="3x:0,0,0,0,0,0" spacingUnit="MM" minimumSize="0" sizeType="MM" enabled="0" diagramOrientation="Up" scaleDependency="Area" direction="0">
<fontProperties style="" description=".SF NS Text,13,-1,5,50,0,0,0,0,0"/>
<axisSymbol>
<symbol type="line" clip_to_extent="1" name="" force_rhr="0" alpha="1">
<layer enabled="1" pass="0" locked="0" class="SimpleLine">
<prop v="square" k="capstyle"/>
<prop v="5;2" k="customdash"/>
<prop v="3x:0,0,0,0,0,0" k="customdash_map_unit_scale"/>
<prop v="MM" k="customdash_unit"/>
<prop v="0" k="draw_inside_polygon"/>
<prop v="bevel" k="joinstyle"/>
<prop v="35,35,35,255" k="line_color"/>
<prop v="solid" k="line_style"/>
<prop v="0.26" k="line_width"/>
<prop v="MM" k="line_width_unit"/>
<prop v="0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="0" k="ring_filter"/>
<prop v="0" k="use_custom_dash"/>
<prop v="3x:0,0,0,0,0,0" k="width_map_unit_scale"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</axisSymbol>
</DiagramCategory>
</SingleCategoryDiagramRenderer>
<DiagramLayerSettings zIndex="0" linePlacementFlags="18" placement="0" dist="0" priority="0" obstacle="0" showAll="1">
<properties>
<Option type="Map">
<Option type="QString" value="" name="name"/>
<Option name="properties"/>
<Option type="QString" value="collection" name="type"/>
</Option>
</properties>
</DiagramLayerSettings>
<geometryOptions removeDuplicateNodes="0" geometryPrecision="0">
<activeChecks/>
<checkConfiguration/>
</geometryOptions>
<referencedLayers/>
<referencingLayers/>
<fieldConfiguration>
<field name="latitude">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="longitude">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="altitude">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="distance">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="speed">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
</fieldConfiguration>
<aliases>
<alias field="latitude" index="0" name=""/>
<alias field="longitude" index="1" name=""/>
<alias field="altitude" index="2" name=""/>
<alias field="distance" index="3" name=""/>
<alias field="speed" index="4" name=""/>
</aliases>
<excludeAttributesWMS/>
<excludeAttributesWFS/>
<defaults>
<default field="latitude" applyOnUpdate="0" expression=""/>
<default field="longitude" applyOnUpdate="0" expression=""/>
<default field="altitude" applyOnUpdate="0" expression=""/>
<default field="distance" applyOnUpdate="0" expression=""/>
<default field="speed" applyOnUpdate="0" expression=""/>
</defaults>
<constraints>
<constraint field="latitude" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
<constraint field="longitude" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
<constraint field="altitude" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
<constraint field="distance" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
<constraint field="speed" unique_strength="0" exp_strength="0" constraints="0" notnull_strength="0"/>
</constraints>
<constraintExpressions>
<constraint exp="" field="latitude" desc=""/>
<constraint exp="" field="longitude" desc=""/>
<constraint exp="" field="altitude" desc=""/>
<constraint exp="" field="distance" desc=""/>
<constraint exp="" field="speed" desc=""/>
</constraintExpressions>
<expressionfields/>
<attributeactions>
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
</attributeactions>
<attributetableconfig actionWidgetStyle="dropDown" sortOrder="0" sortExpression="">
<columns>
<column hidden="0" type="field" width="-1" name="latitude"/>
<column hidden="0" type="field" width="-1" name="longitude"/>
<column hidden="0" type="field" width="-1" name="altitude"/>
<column hidden="0" type="field" width="-1" name="distance"/>
<column hidden="0" type="field" width="-1" name="speed"/>
<column hidden="1" type="actions" width="-1"/>
</columns>
</attributetableconfig>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
<storedexpressions/>
<editform tolerant="1"></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""
QGIS forms can have a Python function that is called when the form is
opened.
Use this function to add extra logic to your forms.
Enter the name of the function in the "Python Init function"
field.
An example follows:
"""
from qgis.PyQt.QtWidgets import QWidget
def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget, "MyLineEdit")
]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable>
<field editable="1" name="altitude"/>
<field editable="1" name="distance"/>
<field editable="1" name="latitude"/>
<field editable="1" name="longitude"/>
<field editable="1" name="speed"/>
</editable>
<labelOnTop>
<field name="altitude" labelOnTop="0"/>
<field name="distance" labelOnTop="0"/>
<field name="latitude" labelOnTop="0"/>
<field name="longitude" labelOnTop="0"/>
<field name="speed" labelOnTop="0"/>
</labelOnTop>
<widgets/>
<previewExpression>latitude</previewExpression>
<mapTip></mapTip>
<layerGeometryType>0</layerGeometryType>
</qgis>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment