Re: [Qgis-user] removing fields from drag and drop designer (leads to segmentation fault)

2024-07-28 Thread Ludwig Kniprath via QGIS-User
Hi Roland, I pasted your script into QGis-Version 3.38.1, and had some crashes, too, but not always. But even if there was no crash, then the form-configuration afterwards had no fields. I think, the problem could be, that you first store the tabs, than clear them and later use the previou

Re: [Qgis-user] ReportLab integration into QGIS returns error message "no module named reportlab"

2022-05-09 Thread Ludwig Kniprath via Qgis-user
Hi, Python inside QGis has no access to plugins installed by pip if called from normal shell. But running "pip install reportlab" from the osgeo4w-shell should do it. "pip show reportlab" after pip-from-shell-installation returns "Location: c:\users\ludwi\appdata\local\programs\python\pyth

Re: [Qgis-user] QGIS and geopackages in sharepoint environement

2022-08-05 Thread Ludwig Kniprath via Qgis-user
Hi, my personal experience with file based data storage in my very private cloud (something like sharepoint) was, that just opening a Qgis project with gpg layers causes many uploads, because each access (open, read, write... ) changes these files. In a multi-user environment this would certa

Re: [Qgis-user] How to count number of layers loaded in layer panel of QGIS

2023-03-15 Thread Ludwig Kniprath via QGIS-User
That depends on the kind and state of layers You want to count: # All layers (as listed in TOC, included: "non-drawable" and invalid layers) layers = QgsProject.instance().layerTreeRoot().findLayers() # list-items: "QgsLayerTreeLayer" # All valid layers (included: "non-drawable"-layers): laye

Re: [Qgis-user] Installing PC Raster

2023-03-21 Thread Ludwig Kniprath via QGIS-User
Hello Uwe, I managed to install and run PCRaster on Windows in the past by following the YouTube-Video from Hans van der Kwast: https://www.youtube.com/watch?v=pja_EX0tVZA&list=PLeuKJkIxCDj2xbV45C45wz3N89FvmTuSu It describes the PCRaster-installation with the *same OSGeo4W-Installer as used

Re: [Qgis-user] Equations cells imported to QGIS

2023-06-16 Thread Ludwig Kniprath via QGIS-User
Hi Simon, Excel tables don't need to be saved as delimited text, they can be imported direct to QGis, f.e. with drag&drop. Calculated contents in the spreadsheets are no problem, below my test with a simple table: (note: screenshot from LibreOffice, I hope there is no difference using exc

Re: [Qgis-user] QGIS3 quits after PyQt Script 2 run

2023-08-16 Thread Ludwig Kniprath via QGIS-User
Hi Julierme, I think Your problem is, that You try to create a new application with "app = QApplication(sys.argv)" inside a running QGis, which already is a running Qt-application. Simplified code should perform without crash: import sys from PyQt5.QtCore import (QSize,Qt) from PyQt5.QtWidge

Re: [Qgis-user] QGIS3 quits after PyQt Script 2 run

2023-08-17 Thread Ludwig Kniprath via QGIS-User
hods are working properly like the self.setFixedSize(QSize(400,300)). I am sending a window screenshot in attachment. I appreciated your time and help. Kind regards Julierme On Wed, Aug 16, 2023 at 4:07 PM Ludwig Kniprath via QGIS-User wrote: Hi Julierme, I think Your problem is

Re: [Qgis-user] how to count overlays of objects

2023-08-19 Thread Ludwig Kniprath via QGIS-User
Hi Daniela, possible solution: 1. run the "Union" algorithm that splits the input polygons 2. add a new integer-column to the "Union"-result-layer f. e. "num_overlays" 3. optionally an additional column with type "integer list" or "string", if You want to see afterwards, which features inters

Re: [Qgis-user] Readonly geometries

2023-10-25 Thread Ludwig Kniprath via QGIS-User
Oh my, QGis without GIS functionalities... Not with on-board resources, I'm afraid, but some thoughts: In QGis/PyQGis (script/plugin): - connect the QgsVectorLayer::editingStarted-signal to disable/remove/hide the vertex-tool-icon and the "Advanced Digitizing Toolbar" - connect the QgsVec

Re: [Qgis-user] zoomToLayers pyqgis

2023-11-18 Thread Ludwig Kniprath via QGIS-User
Hi Patrick, what about iface.mapCanvas().setExtent(layer.extent()) iface.mapCanvas().refresh() or iface.setActiveLayer(layer) iface.zoomToActiveLayer() hth Ludwig Am 18.11.23 um 09:32 schrieb Patrick Dunford via QGIS-User: Good day to all I want to call zoomToLayers in a pyqgis script to

Re: [Qgis-user] Printing Qgis shown layers in new version

2023-12-08 Thread Ludwig Kniprath via QGIS-User
Hi Asim, I'm surprised that previous QGis versions should have returned three layers "Gasunie 2, Gasunie Z-509-05 and Wattinfra Kabelverbinding", because the legend image shows a single vector layer "Overzicht entities" with three classes, not three separate layers. According to https://api.

Re: [Qgis-user] Problem with Python/Qgis

2023-12-12 Thread Ludwig Kniprath via QGIS-User
Hi Gael, I'm using QGis on Linux Mint, an Ubuntu fork, with no problems, so just some notes. - Did you follow https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu? - Did you run "sudo apt update" before "sudo apt install"? - There seems to be an older installation, You cou

Re: [Qgis-user] How to catch a QgsMapCanvas::emitExtentsChanged-signal?

2024-03-15 Thread Ludwig Kniprath via QGIS-User
Hi Bernhard, what about iface.mapCanvas().extentsChanged.connect(lambda: print("the extent has changed!!!")) Or something more usefull like def extent_has_changed_slot():     print(iface.mapCanvas().extent()) iface.mapCanvas().extentsChanged.connect(extent_has_changed_slot) Btw, the *si

Re: [Qgis-user] Adding coordinates to layer

2024-12-02 Thread Ludwig Kniprath via QGIS-User
Hi Pat, Step 1 (already done): import csv as "Delimited Text Layer". Since there are no coordinates this results in a geometry-less layer. Step 2: export and load the just imported csv as vector-layer (GeoPackage, Shape), geometry-type "Point", desired projection. This results in a Point-Lay

Re: [Qgis-user] Adding coordinates to layer

2024-12-02 Thread Ludwig Kniprath via QGIS-User
Hi Pat, Step 1 (already done): import csv as "Delimited Text Layer". Since there are no coordinates this results in a geometry-less layer. Step 2: export and load the just imported csv as vector-layer (GeoPackage, Shape), geometry-type "Point", desired projection. This results in a Point-La

Re: [Qgis-user] (no subject)

2025-02-05 Thread Ludwig Kniprath via QGIS-User
Hi, 6 digit x-values without "32" is correct for EPG:25832, which has no false easting, see https://epsg.io/25832. You should use EPSG:4647 (german variant) with easting of 3250 thus getting 8-digit x-values starting with the zone prefix "32", see https://epsg.io/4647. hth Ludwig Am 05

Re: [Qgis-user] QGIS not seeing any GUID fields belonging to geopackage tables that contain geometry fields.

2025-02-02 Thread Ludwig Kniprath via QGIS-User
Hello Dennis, I don't know I understood your problem, but a GeoPackage is internally a SQlite-Database with SpataLite-extension and without native field-types GUID or UUID. The SpatiaLite-provided function CreateUUID  "returns a Version 4 (random) UUID (Universally unique identifier)" (http

Re: [Qgis-user] Size of QgsDockWidget pyqgis

2025-01-13 Thread Ludwig Kniprath via QGIS-User
Hello Denis, I didn't know about QgsDockwidget yet, but looking on https://api.qgis.org/api/classQgsDockWidget.html it's a derived QDockwidget. Image taken from https://doc.qt.io/qt-5/qdockwidget.html: https://doc.qt.io/qt-5/images/mainwindow-docks.png A docked QDockwidget uses automaticall

Re: [Qgis-user] Storing and Retrieving Vector Layers with Styles to Postgres DB

2025-04-09 Thread Ludwig Kniprath via QGIS-User
Hello Peter, everything that users do in QGis can be done by Python scripts, including your steps listed below. There are some difficulties for the desired "one step" solution, f. e. the name of the file-based layer must be converted in a valid and unique postgis table-name, the fields of th

Re: [Qgis-user] xy-Event-Layer in QGIS?

2025-05-01 Thread Ludwig Kniprath via QGIS-User
Hi Inka, there are multiple ways to import X-Y-data as vector-layer: 1. "Delimited Text Layer" (Layer > Add Layer > Add Delimited Text Layer) simple usage, but only for CSV-files, see https://docs.qgis.org/3.40/en/docs/user_manual/managing_data_source/opening_data.html#importing-a-delimited-te

Re: [Qgis-user] How to make a raster blocking other labels

2025-07-21 Thread Ludwig Kniprath via QGIS-User
t Obstacle Settings: Regards Ludwig Am 21.07.25 um 12:09 schrieb Ludwig Kniprath via QGIS-User: Hi Ann-Christin, if their number is not too high, you can use the label-toolbar to hide some of the unwanted labels manually: Note: QGis uses an "AuxiliaryLayer" attached to the