README.md 3.48 KB
Newer Older
Michel Stuyts's avatar
Michel Stuyts committed
1 2
# QGIS Geometry Generator examples

Michel Stuyts's avatar
Michel Stuyts committed
3
I use **Geometry Generator** a lot in [QGIS](https://qgis.org). I promised to make some of my use cases available online: https://twitter.com/michelstuyts/status/1057049855489646592, so here they are. A great introduction to QGIS Geometry Generator by [Klas Karlsson](https://twitter.com/klaskarlsson) can be found on Youtube: https://www.youtube.com/watch?v=0YxjJ-9zIJ0. This repository contains some of my use cases of Geometry Generators.
Michel Stuyts's avatar
Michel Stuyts committed
4

Michel Stuyts's avatar
Michel Stuyts committed
5
All examples in this repository were created in **QGIS 3.4**  with both the project and the layers set to the Lambert 72 Belgium CRS ([EPSG:31370](https://epsg.io/31370)), that has meters as units. In the style settings the units to set sizes "Map Units" and "Meters at scale" are frequently used, so in EPSG:31370 both will result in Meters.
Michel Stuyts's avatar
Michel Stuyts committed
6

Michel Stuyts's avatar
Michel Stuyts committed
7
Below you will find an example of all styles currently in this repository.  This repository contains all **QML-files** and **sample data** to try the styles yourself. You can also download this entire repository at once: https://gitlab.com/GIS-projects/qgis-geometry-generator-examples/-/archive/master/qgis-geometry-generator-examples-master.zip
8 9

## Dimensions for Polygons
Michel Stuyts's avatar
Michel Stuyts committed
10 11
<table><tr><td><a href="QML-files/dimensions/"><img src="Example_images/dimensions_polygon.png"></a></td></tr></table> 

12 13 14 15 16 17 18
[Details of this Geometry Generator Style](QML-files/dimensions/)

## Dimensions for Lines
<table><tr><td><a href="QML-files/dimensions/"><img src="Example_images/dimensions_line.png"></a></td></tr></table> 

[Details of this Geometry Generator Style](QML-files/dimensions/)

Michel Stuyts's avatar
Michel Stuyts committed
19
## Direction 
20
### One arrow per line of a polyline
21 22
<table><tr><td><a href="QML-files/direction/"><img src="Example_images/direction.png"></a></td></tr></table> 

Michel Stuyts's avatar
Michel Stuyts committed
23 24 25 26 27
[Details of this Geometry Generator Style](QML-files/direction/)

## Labels with a leader 
<table><tr><td><a href="QML-files/label_with_leader/"><img src="Example_images/label_with_leader.png"></a></td></tr></table> 

28 29 30 31
[Details of this Geometry Generator Style](QML-files/label_with_leader/)

## Pseudo-random points
<table><tr><td><a href="QML-files/pseudo-random_points_edge/"><img src="Example_images/pseudo-random_points_edge.png"></a></td></tr></table> 
Michel Stuyts's avatar
Michel Stuyts committed
32

33 34 35 36 37
[Details of this Geometry Generator Style](QML-files/pseudo-random_points_edge/)

## Points as buildings
<table><tr><td><a href="QML-files/points_as_building/"><img src="Example_images/points_as_building.png"></a></td></tr></table> 

Michel Stuyts's avatar
Michel Stuyts committed
38 39 40 41 42 43
[Details of this Geometry Generator Style](QML-files/points_as_building/)

## Obscurify privacy sensitive data
<table><tr><td><a href="QML-files/obscurify_privacy_sensitive_data/"><img src="Example_images/obscurify_privacy_sensitive_data.png"></a></td></tr></table> 

[Details of this Geometry Generator Style](QML-files/obscurify_privacy_sensitive_data/)
44 45 46 47 48

## Mixed orthogonal stripes at an edge
<table><tr><td><a href="QML-files/mixed_orthogonal_stripes_at_an_edge/"><img src="Example_images/mixed_orthogonal_stripes_at_an_edge.png"></a></td></tr></table> 

[Details of this Geometry Generator Style](QML-files/mixed_orthogonal_stripes_at_an_edge/)
49 50

## Points as tables
Michel Stuyts's avatar
Michel Stuyts committed
51
<table><tr><td><a href="QML-files/points_as_tables/"><img src="Example_images/points_as_tables.png"></a></td></tr></table> 
Michel Stuyts's avatar
Michel Stuyts committed
52
[Details of this Geometry Generator Style](QML-files/points_as_tables/)
53 54 55


## Dynamic distance lines
Michel Stuyts's avatar
Michel Stuyts committed
56
<table><tr><td><a href="QML-files/dynamic_distance_lines/"><img src="Example_images/dynamic_distance_lines.png"></a></td></tr></table> 
57

Michel Stuyts's avatar
Michel Stuyts committed
58
[Details of this Geometry Generator Style](QML-files/dynamic_distance_lines/)