Questions tagged [geometry-generator]

For questions about the geometry generator symbol layer style in QGIS.

Filter by
Sorted by
Tagged with
1 vote
1 answer
32 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 points and ...
  • 11
5 votes
3 answers
287 views

QGIS: Better way to show extent of print composer maps in main canvas

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
52 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. ...
  • 44.9k
3 votes
1 answer
51 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 ...
  • 44.9k
2 votes
0 answers
29 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 ...
4 votes
1 answer
138 views

Creating line from polygon shapefile using QGIS

I have a shapefile of an airport that outlines the runway area. I want to take this shapefile with the runway area and create a single line that extends out 5-10 miles out each direction. I have tried ...
  • 53
1 vote
0 answers
31 views

Increasing the smoothness of a wave

I wrote a Geometry Generator expression to create a sine wave in the canvas (don't ask, just having fun): with_variable( 'points', map( 'point_middle_left', make_point(x(@...
  • 8,779
2 votes
0 answers
64 views

Create lines between points layer and line layer (but not the nearest)

I'd like to create lines between a point layer and a line layer, but not in shortest line function in geometry generator. I using this command in geometry generator: make_line ( $geometry, ...
  • 21
7 votes
1 answer
190 views

QGIS - Connection Lines using geometry generator between 2 layers in a relation N-1

I would like to know if there is any way to generate a connecting line between 2 points layers (blocks-points representing a watershed, concpoints-points representing the concentration location of the ...
4 votes
1 answer
106 views

Use point symbology tools in geometry generator of a polygon

In a polygon layer I have a simple geometry generator to get the centroid centroid($geometry). Using this I would like to apply a Heatmap symbology or Graduated by Size symbology but this is only ...
  • 7,766
1 vote
1 answer
80 views

QGIS: How to use 'case when' statement in geometry generator

I intent to expand a layer's symbology by a geometry generator using the following expression: case when attribute > 2 then buffer($geometry, attribute) end However it doesn't work (also when ...
  • 944
4 votes
1 answer
94 views

Curved labels on curved arrows

I have straight lines in a metric CRS, connecting two points. So each line has exactly two vertices. I want to display these lines as curved arrows with curved labels above these arrows. QGIS version ...
  • 27.1k
1 vote
1 answer
149 views

Merge polygons when rendering vector tile layer in QGIS

I'm using a vector tile layer in QGIS, and certain symbology effects don't work very well due to (I presume) how certain features (in this case the river) have been split up across multiple vector ...
4 votes
1 answer
140 views

Fieldname as variable in with_variable returns value not the field

I want to use a field name as a variable inside the geometry generator, but it replaces the field name with the current value of the feature instead of taking the field name as the variable. ...
2 votes
2 answers
132 views

Specify line length in Geometry Generator QGIS 3

I'm working in Geometry Generator trying to produce a line from a point in an x,y direction with a specific length of 50m. I have the direction and line but I can't figure out how to specify the ...
  • 732
2 votes
2 answers
66 views

Connecting points by line number and code in QGIS

I am looking to connect points with a line using Geometry Generator or Virtual layer. Each point has a unique number, a code and a line number. The goal is to display in QField application the lines ...
  • 21
3 votes
1 answer
188 views

Creating points along the line on either side of an intersection point

I have a center line and an intersection point. I want to create points on either side of this intersection point along the center line with an interval 50 meters(can vary) starting from the ...
2 votes
1 answer
259 views

QGIS Geometry Generator: make_line once per grouped geometries

I am using a Geometry Generator symbol layer to draw lines between grouped points. I am grouping points based on two fields letter and number, which I concatenate to make the groups (GeoPackage ...
  • 7,452
0 votes
1 answer
51 views

Rotate markers along a line using a geometry generator

I would like to create a line style for projected tracks. Every kilometer on the line there should be a marker with a number. I hope it possible using geometry generator. Making markers after 1000 ...
3 votes
1 answer
64 views

Deformed shapes after using wedge_buffer as Symbol layer in QGIS

I'm trying to display "field of view" cones on the map, using Geometry Generator as Symbol layer: wedge_buffer($geometry, dir, specs_angle, specs_distance/200000, 0) "dir" : ...
  • 336
3 votes
0 answers
60 views

Differences in QGIS expression functions using Geometry generator vs. Geometry by expression

Create a line to the closest neighbor: Geometry generator Using QGIS, I have a point layer and use the following expression with Geometry generator to create a line, connecting each point to its ...
  • 44.9k
2 votes
1 answer
79 views

Does Geometry by expression in QGIS except layer without geometry?

There is distance matrix with 9.455 features without geometries in GeoJSON format. It was created outside of QGIS with a tool similar to QGIS's "Distance matrix". The matrix looks like this: ...
  • 1
0 votes
0 answers
50 views

Registering events in geometry generator

I have a problem with a geometry generator I wrote to display lines in a specific manner. The code is similar to this simplified example: # This contains geometries in a simili-layer line_cache = {} ...
  • 139
7 votes
2 answers
197 views

Transforming points into graduated segments in QGIS

In QGIS 3.16 I've got a point layer for several sample points in a coastal stretch. The attribute "EPR0113_er" indicates the erosion rate recorded at that point and I would like to represent ...
  • 2,452
3 votes
1 answer
140 views

PyQGIS - create a centroid point symbol layer via Geometry Generator on a polygon layer

I'm trying to created a Geometry Generator symbol layer (point) that creates centroids from myLayer, a polygon map layer. Sounds easy, right? Here is my code - I think I'm missing a line to declare ...
  • 869
1 vote
1 answer
174 views

Creating line from center point, angle and length in QGIS

How can I generate a line with given center point, angle and length in QGIS? I am analyzing that auto extraction lineament for geologic structure analyze.
2 votes
0 answers
44 views

Dynamic buffer regroup [duplicate]

I am using QGIS 3.16 and I want to create a dynamic buffer around a layer of points, so that every time I move some point the buffer also moves. I have succeed by duplicating the layer and then ...
4 votes
2 answers
839 views

Combining point and polygons layers using QGIS

I'm currently trying to compare species sample points vs their actual geographic range. I have: a points layer with species names and each species has multiple corresponding points/records a polygon ...
  • 49
5 votes
1 answer
204 views

Create multipart geometry in geometry by expression

I'm trying to create a multiline geometry looking like the lines in my screenshot. I've created it by duplicating a line style 12 times on a point layer, rotating it by +30 degrees. Isn't it possible ...
  • 55.2k
4 votes
2 answers
108 views

Styling lines with centroids by two different fields in QGIS

I have a line layer showing sectors of roads that I want to style by two different fields without duplicating the layer. "Field 1" is an integer ranging from 0-25 defining road usage (...
  • 313
1 vote
2 answers
160 views

Displacing polygon labels along perimeter using QGIS

I'm working with QGIS 3.16 Hannover and I'm labelling two adjacent polygons using the following parameters: And labels are shown as this I would like to displace them along the perimeter so they do ...
  • 2,452
7 votes
1 answer
431 views

QGIS - how to use geometry generator to place a centroid in each segment of a multiline?

With geometry generator in QGIS I'm trying to place a marker in the midpoint of each segment of a multiline vector (I don't want to use the Highlight line option). My main issue is how to read each ...
6 votes
2 answers
130 views

How to make a generic "Perpillou's map" with QGIS

I try to make a Perpilou's map on QGIS, I managed to get a working code but it is not generic at all, so I am looking for ways to improve it. A Perpillou map is a (old-fashioned) cartographic method ...
  • 1,279
1 vote
1 answer
324 views

Geometry generator with QGIS expression: collect_geometries for overlaying layers, based on attributes

I have a point layer "Layer1", with an attribute called L1_att. I have a surface layer "Layer2", with an attribute called L2_att. In my symbology of Layer1, I have categorized ...
  • 825
4 votes
1 answer
190 views

Making specified shape in QGIS Geometry Generator

I am currently trying to make a special symbol in QGIS My best idea is to use Geometry Generator but I can't seem to find any good tutorials besides converting geometry to various types. Is there any ...
2 votes
1 answer
139 views

Place text made with Geometry Generator outside feature

I wished to know if there's a way to make the Font Marker don't cross or be inside the the feature, as shown in the images bellow. The text is not a label, but made in Geometry Generator with "...
  • 1,064
5 votes
2 answers
247 views

Styling line pattern fills with geometry generator

I try to style line pattern fills of polygones with the geometry-generator to get zigzag-line/wavy lines with this script Custom QGIS linestyle but somehow I never get the lines displayed. For lines &...
  • 849
3 votes
1 answer
114 views

Generating parallel points along with lines or outline of polygon

In QGIS using the Geometry generator, how can we generate the square points within a polygon (e.g. built-up layer) that parallel with other features (e.g. road layer) like in the map below?
4 votes
2 answers
459 views

Using multiple line fill patterns with common base point in QGIS

I have a polygon layer that I want to show with different symbologies. When I select a line pattern fill without a stroke line, I want the patterns of adjacent polygons to to blend seemlessly into ...
2 votes
1 answer
57 views

Duplicates Not Highlighted

Actually I am using Geometry Generator and a small script for displaying duplicate values in the data. But some duplications are not highlighted. Don't know why its happening. can any one suggest any ...
  • 269
0 votes
0 answers
156 views

QGIS - label color setting

I use rule-based labeling with geometry generator on line layer. I use expression @symbol_color, because I want to have color of labels the same as color of lines. However, @symbol_color doesn't work ...
  • 415
4 votes
1 answer
377 views

Create an inscribed square inside a polygon

I have polygons of the administrative boundaries and want to create a square polygon inside of them, which will have the maximum area and will be fully covered by these boundaries. In other words: how ...
  • 117
3 votes
2 answers
258 views

How to label points with gradient-colored data-defined rectangles in QGIS 3.18?

I am trying to symbolize a point layer with rectangles shaped and colored by gradient according to attribute values. I am trying to do this via label backgrounds rendered as "Geometry generator&...
  • 31
3 votes
1 answer
177 views

Convert lines to polygons, but closing the lines first (topographic lines not closed)

I have a topographic layer for a country. I want to select topographic lines of a certain altitude and transform the lines to polygons. All work fine except one thing: since the lines of the ...
7 votes
1 answer
2k views

Use QGIS expressions to create geometries: difference between geometry generator and geometry by expression

QGIS has a powerful expression machine that can be used (between other things) to create new geometries, based on existing layers. Basically, there are two options: Geometry generator (introduced in ...
  • 44.9k
2 votes
1 answer
166 views

Filtering features outside features of another layer using QGIS geometry generator

I am trying to filter features in one layer outside features in another layer using geometry generator. I have a buildings layer and an area layer and now I want to only show the buildings outside the ...
  • 389
3 votes
1 answer
294 views

Can the ArcGIS solution for uneven buffering be achieved in QGIS? version 2 - uneven tree canopies

I want to create tree canopies with uneven canopy extents. A previous solution is below: Representing uneven tree canopy spread around point in QGIS A solution for uneven buffering has been provided ...
  • 51
2 votes
1 answer
405 views

Get_feature and Get_feature_by_id problem

Why does the function works with get_feature_by_id and doesn't with get_feature? closest_point ( geometry (get_feature (@layer, "num_plgnal" , '1')), geometry (get_feature (@layer, ...
  • 1,064
4 votes
1 answer
157 views

Closest_point in Geometry Generator

I'm trying to understand the closest_point function in qgis. For that, I created a polygon layer with two features, and through the Geometry Generator I intend to find the closest point between those ...
  • 1,064
6 votes
0 answers
190 views

QGIS Geometry Generator not working for some features at some scales [closed]

I have a set of layers, one of them is labeled using geometry generator. Thing is, at some scales (1:800 and up) and some features (like 1/30) the geometry generator evalues to null geometry, so the ...
  • 343