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

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

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

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

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

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

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

2023-08-17 Thread Ludwig Kniprath via QGIS-User
orking 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, that You

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

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 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 excel)

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=PLeuKJkIxCDj2xbV45C45wz3N89FvmTuSu It describes the PCRaster-installation with the *same OSGeo4W-Installer as used for

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):

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

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: