├── img
├── line_poly_dimensions.png
├── line_with_dimensions.png
└── polygon_with_dimensions.png
├── .gitignore
├── LICENSE.md
├── qml
└── dimensions
│ ├── README.md
│ ├── Line_with_dimensions_QGIS_3-8.qml
│ └── Polygon_with_dimensions_QGIS_3-8.qml
├── README.md
└── es
└── README.md
/img/line_poly_dimensions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/edurojasr/QGIS-Geometry-Generator/HEAD/img/line_poly_dimensions.png
--------------------------------------------------------------------------------
/img/line_with_dimensions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/edurojasr/QGIS-Geometry-Generator/HEAD/img/line_with_dimensions.png
--------------------------------------------------------------------------------
/img/polygon_with_dimensions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/edurojasr/QGIS-Geometry-Generator/HEAD/img/polygon_with_dimensions.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/windows,visualstudiocode
2 | # Edit at https://www.gitignore.io/?templates=windows,visualstudiocode
3 |
4 | ### VisualStudioCode ###
5 | .vscode/*
6 | !.vscode/settings.json
7 | !.vscode/tasks.json
8 | !.vscode/launch.json
9 | !.vscode/extensions.json
10 |
11 | ### VisualStudioCode Patch ###
12 | # Ignore all local history of files
13 | .history
14 |
15 | ### Windows ###
16 | # Windows thumbnail cache files
17 | Thumbs.db
18 | Thumbs.db:encryptable
19 | ehthumbs.db
20 | ehthumbs_vista.db
21 |
22 | # Dump file
23 | *.stackdump
24 |
25 | # Folder config file
26 | [Dd]esktop.ini
27 |
28 | # Recycle Bin used on file shares
29 | $RECYCLE.BIN/
30 |
31 | # Windows Installer files
32 | *.cab
33 | *.msi
34 | *.msix
35 | *.msm
36 | *.msp
37 |
38 | # Windows shortcuts
39 | *.lnk
40 |
41 | # End of https://www.gitignore.io/api/windows,visualstudiocode
42 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Eduardo Rojas Rodríguez
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/qml/dimensions/README.md:
--------------------------------------------------------------------------------
1 | # Dimensions
2 |
3 | Visualizing dimensions in geometries is usually one of the most common needs
4 | when planning. This task is usually easy with CAD or BIM software, however, it
5 | is very difficult to perform in GIS.
6 |
7 | Some ways of performing this task involve calculating the different dimensions
8 | of our geometry in the fields of the attribute table, but this creates a problem
9 | since every time a geometry is added or changed, we must recalculate the
10 | dimensions in the table of attributes which is not optimal.
11 |
12 | Below are some examples of how to use the geometry generator to add dimensions
13 | to our geometries in this way we will not have to calculate fields with the
14 | measurements since these will change or be added every time we modify or create
15 | a geometry
16 |
17 | ## QGIS versions available
18 |
19 | Use this .qml with:
20 |
21 | - QGIS 3.8
22 |
23 | ## CRS and metric system
24 |
25 | All of this dimensions are in meters because the CRS is EPSG:5367
26 |
27 |
28 | ## Polygon with dimensions
29 |
30 | 
31 |
32 | Add smart dimensions to you geometries, so when you change some vertex o line
33 | the measure changes
34 |
35 | ## Line with dimensions
36 |
37 | 
38 |
39 | Add smart dimensions to you geometries, so when you change some vertex o line
40 | the measure changes
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Tutorial and examples of how to use the QGIS geometry generator
2 |
3 | Tutorial and examples of how to use the QGIS geometry generator.
4 |
5 | The geometry generator in QGIS is a estrange rendering tool that some users fear
6 | and with which they are not familiar. In this repo I will try to teach how to
7 | use the tool and reveal the great power it hides.
8 |
9 | ## What is the QGIS geometry generator
10 |
11 | **From QGIS documentation**
12 | The geometry generator symbol layer allows to use expression syntax to generate
13 | a geometry on the fly during the rendering process. The resulting geometry does
14 | not have to match with the original geometry type and you can add several
15 | differently modified symbol layers on top of each other.
16 |
17 | ## Special Thanks To
18 |
19 | This is the people that inspire me to create this repo and from who I learn so
20 | much!
21 |
22 | **Michel Stuyts:**
23 |
24 | - [Michel Stuyts
25 | GitLab](https://gitlab.com/GIS-projects/qgis-geometry-generator-examples)
26 | - [Michel Stuyts Page](https://michelstuyts.be/)
27 |
28 | **Anita Graser:**
29 |
30 | - [Anita Graser GitHub](https://github.com/anitagraser/QGIS-resources)
31 | - [Anita Graser Page](https://anitagraser.com/)
32 |
33 | **Klas Karlsson:**
34 |
35 | - [Klas Karlsson GitHub](https://github.com/klakar/QGIS_resources)
36 | - [Klas Karlsson
37 | YouTube](https://www.youtube.com/channel/UCxs7cfMwzgGZhtUuwhny4-Q)
38 |
39 | **QGIS Community.**
40 |
41 | - [QGIS Web](https://www.qgis.org/en/site/)
42 |
43 | ## Available Tutorials
44 |
45 | Learn how use the geometry generator with this tutorials and see some tricks
46 | using some clever expressions that can be helpful for your work flow
47 |
48 | ### Smart Dimensions
49 |
50 | [Dimensions](/tutorials/dimensions)
51 |
52 | Learn how add smart and dynamic dimensions for your geometries ( lines and
53 | polygon)
54 |
55 | ## How use the .qml files
56 |
57 | [QML Files](/qml)
58 |
59 | The .qml files are used for sharing the different layes styles in QGIS, use them
60 | to see the different representations of the geometry generator
61 |
62 | ## Styles directory (qml)
63 |
64 | here you have the directory of qml files to be used in QGIS
65 |
66 | ### Dimensions
67 |
68 | 
69 |
70 | [Dimensions](/qml/dimensions)
71 |
72 | Add smart dimensions to you geometries, so when you change some vertex o line
73 | the measure changes
74 |
75 | ## Español
76 |
77 | Voy a proveer también los materiales
78 | [En Español](/es/README.md)
79 |
80 | ## License
81 |
82 | [MIT License](LICENSE.md)
83 |
--------------------------------------------------------------------------------
/es/README.md:
--------------------------------------------------------------------------------
1 | # Tutorial y ejemplos de como usar el generador de geometrías en QGIS
2 |
3 | Tutorial y ejemplos de como usar el generador de geometrías en QGIS
4 |
5 | El generador de geometrías de QGIS es una herramienta extraña que algunos
6 | usuarios temen y con la cual no están familiarizados. En este repo voy a tratar
7 | de enseñarles como usar la herramienta y revelar el gran poder que contiene.
8 |
9 | ## Que es el generados de geometrías
10 |
11 | **De la comunidad de QGIS:**
12 |
13 | Disponible con todo tipo de símbolos, la capa de símbolos del generador de geometría permite usar la sintaxis de expresión para generar una geometría sobre la marcha durante el proceso de renderizado. La geometría resultante no tiene que coincidir con el tipo de geometría original y puede agregar varias capas de símbolos modificadas de forma diferente una encima de la otra.
14 |
15 | ## Agradecimientos especiales para:
16 |
17 | Estas son las personas que me inspiraron a crear este repo y de las cuales he
18 | aprendido mucho!
19 |
20 | **Michel Stuyts:**
21 |
22 | - [Michel Stuyts
23 | GitLab](https://gitlab.com/GIS-projects/qgis-geometry-generator-examples)
24 | - [Michel Stuyts Page](https://michelstuyts.be/)
25 |
26 | **Anita Graser:**
27 |
28 | - [Anita Graser GitHub](https://github.com/anitagraser/QGIS-resources)
29 | - [Anita Graser Page](https://anitagraser.com/)
30 |
31 | **Klas Karlsson:**
32 |
33 | - [Klas Karlsson GitHub](https://github.com/klakar/QGIS_resources)
34 | - [Klas Karlsson YouTube](https://www.youtube.com/channel/UCxs7cfMwzgGZhtUuwhny4-Q)
35 |
36 | **QGIS Community.**
37 |
38 | - [QGIS Web](https://www.qgis.org/en/site/)
39 |
40 | ## Tutoriales disponibles
41 |
42 | Aprende como usar el generador de geometrías con estos tutoriales y mira algunos
43 | trucos usando expresiones que pueden ser útiles para tu trabajo
44 |
45 | ### Dimensiones inteligentes
46 |
47 | [Dimensiones](/tutoriales)
48 |
49 | Aprende como agregar dimensiones dinámicas e inteligentes a tus geometrías
50 | (polígonos y líneas)
51 |
52 |
53 | ## Como usar los archivos .qml
54 |
55 | [Archivos QML](../qml)
56 |
57 | Los archivos .qml son usados para compartir los diferentes estilos de las capas
58 | de QGIS, úsalos para ver las diferentes representaciones del generador de
59 | geometrías
60 |
61 | ## Directorio de estilos
62 |
63 | Acá puedes encontrar el directorio de archivos .qml para usarlos en QGIS
64 |
65 | ### Dimensiones
66 |
67 | 
68 |
69 | [Dimensiones](/qml/dimensions)
70 |
71 | Agregar dimensiones inteligentes a tus polígonos, para cuando cambies algún nodo la dimension cambie inmediatamente
72 |
73 | ## El material en español
74 |
75 | El material que se encuentra disponible en español se encuentra en la carpeta
76 | llamada "es"
77 |
78 | ## License
79 |
80 | [MIT License](LICENSE.md)
81 |
--------------------------------------------------------------------------------
/qml/dimensions/Line_with_dimensions_QGIS_3-8.qml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | 1
6 | 1
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
209 |
212 |
213 |
214 |
215 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 | 0
240 | 0
241 | 1
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 | 0
312 |
313 |
330 | 0
331 | generatedlayout
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 | id
342 |
343 | 1
344 |
345 |
--------------------------------------------------------------------------------
/qml/dimensions/Polygon_with_dimensions_QGIS_3-8.qml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | 1
6 | 1
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
139 |
142 |
143 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
221 |
224 |
225 |
226 |
227 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 | 0
272 | 0
273 | 1
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 | 0
357 |
358 |
375 | 0
376 | generatedlayout
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 | nombre
389 |
390 | 2
391 |
392 |
--------------------------------------------------------------------------------