4
votes
Accepted
Calling Turf.js nearest point function equivalent in QGIS using a Python script
You can use the QgsSpatialIndex class which has a nearestNeighbor() method.
E.g. to iterate over a point layer, finding the nearest point and distance for each feature, you could do something like:
...
4
votes
OSGeo4W updating is failing - OpenCL.dll was not found
I encountered a similar issue while installing QGIS 3.34 via OSGeo4W after a fresh Windows 10 installation. After trying for hours, I was able to solve the problem by applying the following:
...
3
votes
Updating pre-3.32 HTML code in label boxes
In the composer, we now have to use the html box tool instead of the regular label box:
With this type of box the code works:
Thanks to @JGH for helping me unlock this mystery.
3
votes
QGIS text size of label is zero one decimal place if contains one decimal place
I found the problem. It was due to the installed plugin “OSM Data Sync”. Because without the plugin, it keeps the text size with one decimal place
I reported an issue to the developer.
OSM Data Sync - ...
3
votes
Accepted
"Incorrect parameter value for LAYERS" error when saving CSV to GeoPackage with PyQGIS
You can make a QgsVectorLayer of your CSV URI which will be accepted by the package algorithm.
A couple of things to note:
The %dir suffix is missing from your CSV URI in the LAYERS property of the ...
1
vote
Automatically populate a field on a form from a lookup table depending on what is selected in a different field on the same form in QGIS
One option is to use a Value Relation and Filter expression.
With lookup data table as follows (layer named "data", lookup field is 'model', result field is 'code'):
Then in the data entry ...
1
vote
Accepted
Automatically populate a field on a form from a lookup table depending on what is selected in a different field on the same form in QGIS
One way is to use a Virtual Field.
With lookup data table as follows (layer named "data", lookup field is 'model', result field is 'code'):
I created a virtual field ('code') in my data ...
1
vote
Accepted
How to use 'to_dm' function in model designer?
For this instance, the answer was to have the Field Name be the resulting Field, not an existing Field. I see now there is an option 'Create New Field' that I missed.
1
vote
In QGIS 3.x for Windows, is it possible to add more files to the Project > Open Recent menu?
Yes, Settings -> Options -> Advanced -> App -> maxRecentProjects
Source : https://github.com/qgis/QGIS/issues/33720
1
vote
Cannot create layer because "unable to open database file" in QGIS 3.2.0?
I recently produced this exact same error when trying to create an gpkg output in a folder that doesn't exist yet. I added a routine that first creates the folder and that solved the issue.
# create ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
qgis-3 × 4369qgis × 1570
pyqgis × 1104
qgis-plugins × 400
pyqgis-3 × 339
qgis-processing × 304
python × 191
coordinate-system × 150
print-composer × 144
raster × 142
symbology × 139
labeling × 138
qgis-modeler × 130
polygon × 106
attribute-table × 94
layers × 81
line × 78
fields-attributes × 76
shapefile × 73
expression × 72
point × 71
postgis × 69
field-calculator × 66
pyqt5 × 63
installation × 61