Skip to main content

New answers tagged

0 votes

Identifying dead-end/cul-de-sac areas in a road network

There are four simple steps that work like this in any geospatial software, here for QGIS: Explode the road lines: each segement is a separate feature. Extract start- and end-points of each line and ...
Babel's user avatar
  • 80.5k
4 votes

QGIS The colors I choose and the colors that are on the screen are not the same

There's not quite enough information to debug what specifically is going wrong here, but here's what I do to troubleshoot weird raster colour shifts: Temporarily make this raster layer the only ...
Houska's user avatar
  • 8,829
1 vote

QGIS 3.40.6 - Labeling Auxiliary Storage & arcgis-feature-server (REST)

The auxiliary data are saved with the QGIS project (you can access it if you unzip the [project_name].qgz, the auxiliary data are in the [project_name].qgd file that can be opened as a SpatiaLite ...
J.R's user avatar
  • 18.3k
3 votes
Accepted

Override default keyboard shortcut while QGIS plugin window is active

In the end the solution I've used is: On plugin startup, get a list of existing QGIS shortcuts Add an eventFilter to my QMainWindow, and listen for WindowDeactivate and WindowActivate events When ...
Jesse Reilly's user avatar
1 vote

More control of CSV in the QGIS model builder

You don’t necessarily need the Model Builder to solve this. QGIS can load a CSV file with an automatically detected delimiter using Python and PyQGIS. Python’s built-in csv module contains a Sniffer ...
Taras's user avatar
  • 36k
1 vote

Using WFS layer as input on the QGIS Model Designer

Just use "Vector Features" as an input. This will allow you to use a WFS layer: In python, your algorithm parameters will look like this: { CLIP: True, EXTENT: '397745.6653,404496.5114,...
Andre Geo's user avatar
  • 860
1 vote

Applying get_feature function over CSV layer in QGIS

Your expression is almost correct, you're literally just one( two) characters away from the solution: delete the last bracket and insert it before the last comma. You need a closing bracket after ...
Babel's user avatar
  • 80.5k
1 vote

Applying get_feature function over CSV layer in QGIS

Try aggregate: I have a line layer roads with the attribute Object-Nr, and a csv table colors with the same Object-Nr column and a column with color names color_name. The expression also works with ...
Bera's user avatar
  • 82.5k
0 votes

Auto adjustment of table size automatically in ATLAS from QGIS

Also you can try playing around with the cel size of the table: Attribute Table -> Item properties -> Main Properties -> Attributes... There you can define the width of the column, alignment ...
Helen Pater's user avatar
0 votes

Missing GRASS in QGIS Processing Toolbox

So I had this problem - I had a two part solution. a) Had to run the OSGeo4W installer again, to actually install GRASS.(It was not installed by default initially when I ran the installer) b) Then I ...
nr_aus's user avatar
  • 3,870
0 votes

Converting las data into xyz with QGIS

I cannot comment yet on this platform, but I wanted to add to Marco's answer. For me, installing the plugin in QGIS wasn't enough for me. It was not finding the "bin" folder. Turns out I ...
Michael S's user avatar
3 votes

Why Select Within Distance set to 1m selects every waterbody?

Use the following expression to create a unique ID for all polygons that are contiguous or have a distance of max 10 units (change that value on line 6). You could use this to create a new field with ...
Babel's user avatar
  • 80.5k
0 votes

Labelling feature with count of values from another layer in QGIS

Use the following expression - see the result on the screenshot below, based on the values you posted: with_variable('myarr', with_variable('varcpl', "cpl", aggregate ('tableA', '...
Babel's user avatar
  • 80.5k
0 votes

Labelling feature with count of values from another layer in QGIS

get_feature( layer, field, field_value_to_match) look it up here: https://gis.stackexchange.com/a/423479/266633
XPHUPZHJ's user avatar
0 votes

New Features not snappable

Had a similar issue today in QGIS 3.40. In my case it was caused by the new feature triggering an update on the underlying databse, which QGIS did not get notified about. Interestingly the feature was ...
MakePeaceGreatAgain's user avatar
2 votes

How to find the right basemap for an informative map about historical sites?

OpenTopoMap using QGIS 3.44 (QT6) Using this excellent script [no plugins required] from Klas https://gis.stackexchange.com/users/55741/klas-karlsson https://raw.githubusercontent.com/klakar/...
Mapperz's user avatar
  • 50.6k
0 votes

3D map view in QGIS doesn't load with many 3D models

I had a similar issue. 3D Map View was working fine but I wanted to clip the dtm raster layer I was using to tidy up the 3D view. The clipped layer was exactly the same layer format in the same CRS, ...
Sean Jarrett's user avatar
0 votes

Proper MBTiles export workflow to preserve display scaling factor in QGIS

I have a complex project that I export periodically to MBTiles, with scale-varying level visibility and symbology. I gave up on the MBTiles processing tool or even manually exporting from the canvas. ...
Houska's user avatar
  • 8,829
0 votes

Splitting Legend in QGIS in to 2 Columns - with Group Label Text spread across all Columns used by Subgoup Items?

Try the setting shown in this screenshot:
Aquamarine's user avatar
  • 1,946
3 votes

QGIS 3.30 window stuck in full screen without title bar on Windows

f11, I just had to press f11, sorry.
workerbee's user avatar
3 votes
Accepted

Elevation Profile is empty in QGIS

You just need to select the line feature on the map canvas using the "Capture Curve From Feature" Elevation Profile's tool in order to generate the profile curve along that line, as ...
Andrea Giudiceandrea's user avatar
2 votes

Empty @layer_name variable in QGIS expression using the "Geometry by expression" tool

An alternative that works with the existing installation is using varibale @layers (not @layer). I creates a list (array) of a map layers in the current project. Then loop through this array with ...
Babel's user avatar
  • 80.5k
0 votes

Preventing clipped labels from QGIS Server WMS in Leaflet JS

Client-Side Alternative: Leaflet WMS Gutter Plugin While the accepted answer correctly identifies server-side configuration as the standard solution, I've created a client-side plugin for cases where ...
aronsommer's user avatar
6 votes
Accepted

Empty @layer_name variable in QGIS expression using the "Geometry by expression" tool

This is a bug (#54869) in the native (C++) Geometry By Expression tool as the tool is missing the input layer scope. Instead, use the Processing parameter(name) function and pass it the 'INPUT' ...
user2856's user avatar
  • 74.9k
1 vote

Aggregation of multiple values within a polygon

You can use a Virtual Layer. All buildings with centroids overlapping a block are grouped per block, and the usage for each energy type is summed and reported in separate columns. SELECT a.block_id,...
Bera's user avatar
  • 82.5k
4 votes
Accepted

Can I rescale many features on multiple layers at once?

For the vector data, you could use the Geometry by expression processing tool with an expression that uses the scale function to enlarge the geometries around the centroid of all aggregated geometries ...
user2856's user avatar
  • 74.9k
1 vote

Getting the name of 3D map view with PyQGIS

The 3D canvas widgets themselves don’t expose their name through methods like canvas.title() or canvas.objectName(). All of those return empty values for 3D map views. However, the parent widget does ...
Taras's user avatar
  • 36k
0 votes

Make part of legend label italics either for layer header or items in QGIS Print Composer

I'm working on Bratislava 3.40.10 qGis and in the legend section, my items are scientific names for different species, and it worked! < i > (non separated) Balaenoptera acutorostrata However, ...
RSC's user avatar
  • 1
2 votes

ESA Sentinel-5 data in QGIS: "invalid projection"

Sentinel-5P .nc file is not a regular raster. Its coordinates are irregular arrays (swaths). Each pixel has its own coordinates. To have your file correctly geolocated, run this command in the OSGeo4W ...
Fabio Zanini's user avatar
6 votes
Accepted

Calculating two highest maximum values of field in QGIS

You can use the following expression: array_to_string( array_slice( array_agg( "distance", "id", order_by:="distance" ), -2, -1 ), ', ' ) It creates an array ...
Andrea Giudiceandrea's user avatar
6 votes

Calculating two highest maximum values of field in QGIS

the following results in an array with the two maximum values for column "dist" grouped by "id" array_slice( array_sort(array_agg( "dist","id"),false),0,1)
eurojam's user avatar
  • 13.1k
1 vote
Accepted

SQL syntax for joining multiple CSV in QGIS model builder

If you only have one input data source to "Execute SQL" tool, it will always be named input1. But it is possible to select multiple inputs by clicking the three dots symbol. They will then ...
Bera's user avatar
  • 82.5k
4 votes

Editing label text on the map and updating attribute automatically in QGIS

I can't answer for 3.22, it's quite old now and was released in 2021. However, as of 3.44 what you want (edit in place) is not possible. You should submit an enhancement request. The closest you can ...
user2856's user avatar
  • 74.9k
3 votes

Understanding scale in QGIS

For QGIS 3.38 and lower the scale is calculated at the bottom of the map (starting at QGIS 3.40 and up you can choose the method : Add scale method option for layout scale bar). For ArcMap it seem the ...
J.R's user avatar
  • 18.3k
6 votes

Is there a QGIS plugin that creates evenly spaced points within a polygon layer?

You can create a grid consisting of points (create grid tool) with the desired spacing and then clip the grid using the polygons.
Erik's user avatar
  • 18.5k
0 votes

WMS not showing in QGIS 3.34.3

The link response is: Error occurred while processing request Type: Status Report Message: Description: http.499: ArcGIS Server Was the URL provided to you by the data owner? If not it could be that ...
GforGIS's user avatar
  • 3,415
1 vote

Why does QGIS not recognize FlatGeobuf CRS?

The CRS of the layer is correctly recognized by the latest QGIS LTR 3.40.12 version on Windows 10 as EPSG:4269 NAD83 You need to verify that the installation of QGIS in your system is correct. You ...
Andrea Giudiceandrea's user avatar
0 votes

Producing raster data clipped automatically by multiple polygons in QGIS

Thanks to GDAL, automatic cropping/clipping of QGIS raster layers during Atlas creation is possible with just a few lines of Python Expression code. I have uploaded an example project with some ...
christoph's user avatar
  • 6,937
0 votes

SoilGrids WCS and WMS from ISRIC platform appear not to be working. Are they, or it's me?

from soilgrids import SoilGrids soil = SoilGrids() # مثال للـ bounding box: لازم تحسبيه بدقة لمحافظة كفر الشيخ (lat / lon) # القيم دي مثال تقريبي، ولازم تأكدها: west = 30.7 # أقل خط طول (غرب) ...
Nouran Makhlouf's user avatar
2 votes

QGIS with Semi Automatic Categorization (SCP) for Mint 22

Simplest is probably to use the flatpak installation method: flatpak install --user flathub org.qgis.qgis See the note about plugin dependencies: Extension support If you need to install additional ...
user2856's user avatar
  • 74.9k
0 votes

Interactively create route that snaps to route layer in QGIS

I am a bit late in this discussion. Try this plug-in in Qgis from geoplatform / github. Go there: https://plugins.qgis.org/plugins/gpf_isochrone_isodistance_itineraire/ It is working on every type of ...
dsbi's user avatar
  • 1
4 votes

Understanding scale in QGIS

In order to have a map in a proper scale, you need set the CRS of the map item in the print layout to a projected coordinate reference system, like an UTM CRS, suitable for you area of interest.
Andrea Giudiceandrea's user avatar
1 vote

Filtering OS NGD data to only import data within a given boundary from a WFS connexion in QGIS

Try setting a Filter (right-click layer - Filter)
Bera's user avatar
  • 82.5k
0 votes

Network analysis for several points in QGIS

Code below will execute Shortest path (point to layer) for each start point. Then merge all outputs into a line layer. I suggest you try it on a subset of points, the execution time can be long. def ...
Bera's user avatar
  • 82.5k
3 votes

Vectorize multiband raster to points/polygons with multiple values

I would use the new GDAL CLI tool (first available in GDAL version 3.12) https://gdal.org/en/stable/programs/gdal_raster_as_features.html Usage example: gdal raster as-features --geometry-type point -...
user30184's user avatar
  • 71.9k
2 votes

Vectorize multiband raster to points/polygons with multiple values

You can execute Raster pixels to points for the first band, name the output column band1 then sample raster values for each band using an expression in Refactor fields: raster_value( layer:= @...
Bera's user avatar
  • 82.5k
1 vote

Getting quantity of intersecting lines of polygons in QGIS

You can use the overlay_intersects function to create an array of the ids of the lines intersecting each polygon. Then count distinct ids. Change Path to the name of your line layer. array_length( ...
Bera's user avatar
  • 82.5k
0 votes
Accepted

Setting up QGIS plugin debugging in PyCharm

Got debug to work finally by changing the location of the debugger initialization from the __init__ method to a point after the plugin is created. In my case the plugin initialization creates a ...
marcp's user avatar
  • 915
5 votes

QGIS using raster in expression doesn't work with certain layer names

The string specified as the first parameter of the raster_value function and the raster layer's name string must be exactly the same: i.e. each utf-8 character contained in each string must be exactly ...
Andrea Giudiceandrea's user avatar
1 vote

Extracting min and max value from points shapefile in QGIS

I don't know if it's a bit late to reply, but I had the same need and couldn't figure it out. After a lot of trial and error and searching the manuals, I managed to do it like this: select: "...
FabioZampieri's user avatar

Top 50 recent answers are included