Questions tagged [geometry-generator]
For questions about the geometry generator symbol layer style in QGIS.
186
questions
4
votes
0
answers
106
views
How to change the Point Cluster circle symbol to a convex hull
I am using the expression presented by the user JGH to solve the question 'Point Clustering in QGIS, but values show a percentage and not count of points'
This shows my example:
As you can see I use ...
0
votes
1
answer
41
views
Style a Polygon (speed restriction area) with just an SVG Road Sign at either end of the polygon in QGIS 3
I have a series of "zones" which are polygons along a road which have a speed attribute, I'd like to rather than just shade the polygons based on speed, actually show the 20mph or 30mph sign ...
5
votes
1
answer
75
views
How to convert a set of points to ellipses with support for overlay_nearest grouping and field filters
I am trying to build an expression that transforms in real time using geometry generator the geometry from points to ellipses.
The expression I am working with is the following:
oriented_bbox(
...
2
votes
0
answers
67
views
How to group points by distance and plot a minimum circle with a constant radius with centroid in the grouping
I am working with the following expression to try to draw a minimal circle of constant radius that groups the points by nearest:
minimal_circle (
convex_hull(
collect(
$...
0
votes
0
answers
34
views
Angle of wedge buffer not rendering on one point
I have been making pie charts with wedge buffers in QGIS for temporal controller. I just bumped into an issue with one point which completely ignores the azimuth angle for one color. The formula for ...
0
votes
0
answers
46
views
Dynamic link visualization between polygons and line with Geometry Generator in QGIS
Let's say we have 4 polygons in a polygon layer called 'Flaeche':
Polygon A
Polygon B
Polygon C
Polygon D
The attribute table of this polygon layer contains 3 columns called 'Name', 'Einzelflaeche', ...
2
votes
1
answer
80
views
How to obtain the nearest line between two point layers with the constraint of a line distance layer
From three layers:
'POINTS': Points of house facades
'CONTROL': Waste collection points
'STREETS': Street axes
When you apply an standard expression like the following to find and draw the nearest ...
3
votes
1
answer
108
views
Labelling line with angles from 0º to 360º in QGIS
Labelling lines with the following function:
round(degrees(atan2(yat(-1)-yat(0), xat(-1)-xat(0))), 1) || ' º'
As you can see in the screenshot, this expression calculates the orientation angle of the ...
3
votes
1
answer
92
views
How to obtain the closest mean distance between two pseudoparallel lines
From two layers (LINE_1 and LINE_2) with a irregular pseudoparallel lines geometry, my goal is to obtain the closest mean distance between two pseudoparallel lines.
Here I publish a screenshot with ...
2
votes
0
answers
57
views
Using geometry generator to show point and uncertainty
I am mapping lightning strikes, my data set contains of, among other things, a point and an uncertainty ellipse. I am storing the data set in a postgis database. The schema for the table is
create ...
1
vote
0
answers
58
views
Automatically label vertices of a selected polygon in QGIS 3 Map composer
I am looking at how to automate my repetitive tasks.
So How can I automate the labeling of vertices of selected plot in QGIS3? And is it possible to have all the labels outside the polygon? See image ...
5
votes
1
answer
162
views
Connecting points to the two closest highest values grouped by category
In a points layer with the fields "POP" (corresponding to the population value) and "CATEG" (corresponding to municipality id), my goal is to connect the points of each ...
5
votes
1
answer
360
views
Using QGIS Geometry Generator to create labels between associated features in different layers
This question arose from a comment on this answer to Calculating distance between multiple points within buffer using QGIS.
I have followed the steps there, which use a one-to-many spatial join to ...
4
votes
1
answer
156
views
Drawing line arrow from origin/destination coordinates fields using Geometry Generator in QGIS
From the following table structure with the fields "ORIG_LATITUDE", "ORIG_LONGITUDE", "DEST_LATITUDE", "DEST_LONGITUDE":
I clarify that the field names ...
5
votes
2
answers
137
views
Create line-type symbology perpendicular to a segment in QGIS
I want to create a symbology (line type) for a point layer in QGIS. This line must be perpendicular to the segments of a polygon. I attach an image:
To do this I entered an expression in the rotation ...
1
vote
1
answer
94
views
Creating arrow effect using QGIS geometry generator
In another answer, there was a QGIS screenshot posted that shows lines created by geometry generator, connecting points in a hierarchical order. As a follow up question (see comment): Could you ...
5
votes
2
answers
208
views
Drawing line to the nearest point following a attribute hierarchy
With a point layer and a attribute table formed by the field "HIERACHY", where there are 3 values (3,2,1). The meaning of the values is from highest to lowest relevance in descending order: ...
4
votes
1
answer
110
views
Drawing line to the centroid of the concave hull composed by the set of each group of points within the same polygon
I am using the following Geometry Generator expression with which, for each point geometry, I draw a line to the centroid of the polygon the point is within:
make_line (
$geometry,
...
2
votes
1
answer
57
views
Count features within a convex_hull polygon
I have a point geometry layer with which I have built an expression that creates a convex_hull for the features closest to the features that have a given value:
convex_hull(
collect(
$...
1
vote
2
answers
71
views
Squished circles [closed]
I'm looking to squish some circles while maintaining the area.
Initially I buffer a circle from centre. This gives an area.
I want the area to be affected by an influence from North, East, South or ...
3
votes
1
answer
68
views
Shortest line forced to field attribute
I have a layer with point geometry with a field STREETCODE that represents the entry number of each house. On the other hand, I have, a layer with line geometry with the field STREETCODE, representing ...
0
votes
1
answer
61
views
Line geometries thematized by graduated size according median length and angled by median angle
I would like to find a dynamic method, using a Geometry Generator expression, to draw a categorized lines geometries from a range values of lines angles
I try to expose the initial state of the lines ...
2
votes
0
answers
78
views
How to connect nearest points to increasing closest date
Given a points collection layer containing the data field ("DATADIA") with the date (YYYYY-MM-dd), how could I connect the nearest points in order of increasing date?
The expression should ...
1
vote
2
answers
100
views
QGIS how to combine a single line and a centered short and constant offset arrow line
I am making a flow map where I want to have a double geometry: a single line and a centered offset arrow line.
For the moment, I use a buffer but of course I don't get the desired effect of an arrow ...
1
vote
1
answer
90
views
Create radius line and label the length to a buffer geometry generated
From a point geometry layer, I'm using an expression with buffer function as shown in the screenshot below:
I would like to add two more expressions to this point geometry layer:
An expression for ...
1
vote
1
answer
78
views
Geometry generator QGIS 3.28
In QGIS 3.22.4, I've a WFS layer with measurements of soil-depths (LayerFrom & LayerTo) in the attribute table. With the symbology-geometry generator, I've created scalable circles (geometry type =...
3
votes
2
answers
115
views
Duplicate line with offset if second field is filled
I have a line layer with two fields Field A and Field B using the same value representation. Every object has a value in Field A, only some objects have a value in Field B.
I am looking to create a ...
5
votes
1
answer
113
views
Set the Units of a QgsGeometryGeneratorSymbolLayer object in PyQGIS
I am pretty much following the procedure of this answer but I can't get my head around as to where to set the 'Units' from 'Map Units' (default) to Millimeters that is.
So far, I tried several ...
6
votes
2
answers
204
views
Applying Geometry Generator for MultiPoint feature in QGIS
I have used the Geometry Generator in QGIS to successfully create a polygon around a point that represents the canopy of a tree based on the cardinal direction recordings.
What I cannot figure out or ...
1
vote
1
answer
49
views
Creating line from center of points, and define angle using azimuth stored in the attribute table
Similar to this question I would like to create lines on points in a point layer. The attribute table of the points layer includes a column named azimuth which contains the azimuth/direction these ...
1
vote
0
answers
69
views
QGIS Geometry Generator, How can I move Line symbols by a y value
I have a lot of lines on top of each other in QGIS, and I would like to show them kind of like London Tube Underground Map.
My main aim is to move each symbol vertically down by a certain amount so ...
6
votes
1
answer
112
views
Detect largest area and generates polygons that arise from lines geometry
Starting from a layer with points geometry, the Geometry generator is used to create a line geometry layer that connects with the 8 nearest points. The function used is the following:
...
2
votes
3
answers
170
views
Use QGIS Geometry Generator to expand overview map frame
I have a QGIS (3.16) map layout (maps generated using Atlas) that I have created a map inset, which shows the full extent of the state. Within it, I have an "overview" frame that shows the ...
6
votes
1
answer
134
views
How to label a point layer with the percentage of points within another polygon layer?
I would like to find a method using Geometry generator to label a point layer with the percentage of points inside another polygons layer.
I'm working on implementing a solution based on the COUNT and ...
1
vote
2
answers
100
views
Interpolating points with QGIS native Temporal Controller along a line
This question is a follow up on @Babel's answer to Interpolating points with QGIS native Temporal Controller.
Having successfully implemented the aforementioned method, as seen here:
I would like to ...
5
votes
1
answer
116
views
Count the number of features joined by shortest_line function conditioned
Using the shortest_line function conditioned to a table attribute to return the shortest line joining features of the same layer as it shows in this expresion:
shortest_line(
$geometry,
...
10
votes
1
answer
475
views
Finding the largest empty circle that fits within point layer in QGIS
Is there any solution to calculate with a QGIS expression the largest empty circle of a point layer as shown in the image below?
Maybe there is some solution combining or improving the functions pole ...
3
votes
1
answer
75
views
Is it possible to use both "standard" and inverted polygon symbology on a single layer in QGIS 3.x?
I have multiple polygon shapefiles, each containing several features with a single attribute, given a value of either 0 or 1. The "1" features show areas of interest. There are often "0&...
1
vote
1
answer
117
views
Geometry generator - classify objects in QGIS [closed]
How can I display objects classified/dissolved by a specific attribute (f.e. dissolving polygons by state in the attributes), by using the Gemoetry Generator?
FID
name
state
1
Peter
BB
2
Ann
MV
3
...
4
votes
1
answer
207
views
Vector smooth algorithm in QGIS has sharp corners
I am using the smooth function in a shape generator to represent tree canopies following this example
It mostly works really well but I always get one sharp corner and its always at the second vertex. ...
6
votes
2
answers
575
views
Drawing slope signature in QGIS
I would like to have a slope signature (in German "Böschungsschraffen") like this :
https://bauforum.wirklichewelt.de/index.php?id=9672 (German)
https://www.akgsoftware.de/docs/de/...
1
vote
0
answers
80
views
QGIS specified make_line curved between points
This question is a continuation of this answer
I want to draw curved lines between specific points that are related to each other.
On my points layer each point has:
unique FID and relation field to ...
1
vote
0
answers
74
views
Use geometry from a second PostGIS geometry field
I am trying to use multiple PostGIS geometry fields in a single QGIS layer
In the Data Source Manager, I properly see the two entries, one with Linestring:4326, the other one with Point:4326
When used ...
1
vote
0
answers
80
views
Arrow pathways in QGIS using geometry generator
I’ve been trying to draw trade pathway arrows following the fabulous posts from @underdark for Flow Maps on QGIS from 2019-05-04 (https://anitagraser.com/2019/05/04/flow-maps-in-qgis-no-plugins-needed/...
1
vote
1
answer
39
views
How to switch expression generated line sections in QGIS?
According to this thread about "Changing length of Shortest_Line for CAD-like slope pattern using QGIS" (https://gis.stackexchange.com/a/386104/212966) I would like to learn how to switch ...
3
votes
1
answer
195
views
Adding point feature with Geometry by Expression in QGIS
I am trying to use "Geometry by Expression" to add a point feature in a layer but I am getting unexpected results.
I added the expression make_point(0,0) but it just takes all the existing ...
6
votes
3
answers
543
views
Best practices to show extent of Print Composer maps in main canvas in QGIS
I want to display the extents of print composer maps in the main canvas as polygons ("map footprints"). Currently I am using the geometry generator with the expression make_rectangle_3points ...
2
votes
1
answer
84
views
Create true length scalebar for different latitudes with QGIS geometry generator in Mercator projection
In Mercator projection, distances are heavily distorted, the closer you get to the poles. True distances can only be measured only on the equator. The distortion is constant along parallels - so e.g. ...
5
votes
1
answer
462
views
Interpolating points with QGIS native Temporal Controller
QGIS introdced native temporal controller in QGIS version 3.14, thus replacing the older TimeManger Plugin. However, as of QGIS version 3.26, there are still some functionalities in the plugin that ...
3
votes
0
answers
48
views
QGIS: Adjust line for labels at the feature end (Easy Custom Labeling)
I work on a map of overlapping public transport fare areas, e.g., Frankfurt(Oder) AB/BC, which imply different fares for using the bus.
By utilising the Plugin Easy Custom Labeling I was able to ...