Hot answers tagged

4 votes
Accepted

Calculating main_angle of polygons using PyQGIS

See: PyQGIS 101: Using expressions to compute new field values layer = iface.activeLayer() expression1 = QgsExpression('main_angle($geometry)') context = QgsExpressionContext() context....
BERA's user avatar
  • 67.1k
4 votes

When selecting polygons in QGIS some borders are rendered behind bordering polygons

The selection is just a style, it doesn't change the rendering order so the selected geometry may be above/below others. You can instruct the layer to draw the selection on top of other features using ...
JGH's user avatar
  • 39.7k
3 votes

Calculating main_angle of polygons using PyQGIS

Another method in addition to @BERA: layer = iface.activeLayer() feats = layer.getFeatures() for f in feats: geom = QgsGeometry(f.geometry()) output_geometry, area, angle, width, height = geom....
user35594's user avatar
  • 545
2 votes
Accepted

Where layer notes in QGIS are saved

The notes are saved in the QGIS project file (.qgz or .qgs) per layer and if you save a layer file (.qlr) for a layer with notes, the notes will also be saved to the .qlr file. There's some ...
user2856's user avatar
  • 63.8k
2 votes

Why is the "Label Properties" window greyed out for editing in QGIS?

To activate it, you have make some settings: Go to the layers styling Dock (F7) Click on the Data-definded overide box of the item which you want to change Activate "Store Data in the Project&...
eurojam's user avatar
  • 9,510
2 votes
Accepted

Loading S3 hosted COPC (LAZ) in QGIS 3.28.9 using Python

Change the provider from "pdal" to "copc" With this code: from qgis.core import * #S3 URL files=["https://astrogeo-ard.s3-us-west-2.amazonaws.com/moon/lro/lola/...
user2856's user avatar
  • 63.8k
2 votes
Accepted

When selecting polygons in QGIS some borders are rendered behind bordering polygons

I had never noticed it did that. You can modify the rendering behavior under the "Layer Properties" -> "Symbology" -> "Layer Rendering" -> "Control feature ...
Louis Cottereau's user avatar
2 votes

QGIS label callouts anchor from the edge of the symbol

There may be several ways to put the labels outside the polygons, but I will suggest one method that could be helpful: Right the polygon boundary and select Duplicate layer. Put the duplicate layer ...
ahmadhanb's user avatar
  • 40.3k
1 vote

Labels covering point layer symbols QGIS 3.28

As far as I know label are Always drawn on top of feature symbol : feature symbol are drawn (following layer panel order then for each layer the feature rendering order if defined) then label are ...
J.R's user avatar
  • 14.5k
1 vote
Accepted

Maximum width of screen in the QGIS modelbuilder

I've tested it out in the modeller pane and checked all the settings and it seems that, yes, there is functionally a limit to the (graphical) extent of your model. I've run through the source code (...
OBeighton's user avatar
1 vote

Getting label geometry using PyQGIS 3

This will return all label geometries of the labels in current map extent: extent = iface.mapCanvas().extent() labelresults = iface.mapCanvas().labelingResults() labelsinextent = labelresults....
BERA's user avatar
  • 67.1k
1 vote

Is it possible to open a raster or raster dataset contained in a file geodatabase with QGIS 3.X?

The functionality to handle File GDB raster datasets was recently added to GDAL, so it would be possible to export any raster dataset to e.g. GeoTIFF with gdal_translate and put those into QGIS. If ...
Nuighon's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible