Re: [Qgis-user] spatial analysis toolbox - testing for autocorrelation
Hi Andrea, I tested this from a fresh Windows. I found that geopandas was not installed on Firenze.I don't have any more licenses and I don't know where to look in the source code. How about PDAL? -Thayer On Saturday, August 19, 2023 at 08:00:01 AM EDT, qgis-user-requ...@lists.osgeo.org wrote: -- Date: Sat, 19 Aug 2023 11:49:45 +0200 From: Andrea Giudiceandrea To: qgis-user@lists.osgeo.org Subject: Re: [Qgis-user] spatial analysis toolbox - testing for autocorrelation Message-ID: <77af0f5e-52bd-4666-8f9d-5058c3e51...@libero.it> Content-Type: text/plain; charset=UTF-8; format=flowed > Thayer Young via QGIS-User Fri, 18 Aug 2023 13:28:49 -0700 > this means that geopandas is not installed. (It is installed in Lima not > Firenze.) Hi Thayer, it seems to me the Python module "geopandas" is installed by default by both the current QGIS all-in-one stand-alone OSGeo4W .msi installer and the "network" OSGeo4W .exe installer (for qgis-full and qgis-ltr-full packages) for both QGIS 3.28 and QGIS 3.32. Anyway, another simple way to install the required Python packages, avoiding to use the shell and type commands in the CLI, is to use the OSGeo4W "Setup" program: all the required packages could be installed with few clicks. Best regards. Andrea - ___ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] how to count overlays of objects
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 intersect, f. e. "overlay_ids" 4. run the script below, that performs a self-intersection for each feature to find the spatial identical overlaps (Note: Layer- and column-names hard coded, adjust if necessary) union_layer = QgsProject.instance().mapLayersByName('Union')[0] union_layer.startEditing() for union_feature_1 in union_layer.getFeatures(): num_overlays = 0 overlay_ids = [] for union_feature_2 in union_layer.getFeatures(): if union_feature_1.geometry().equals(union_feature_2.geometry()) and union_feature_1.id() != union_feature_2.id(): num_overlays += 1 overlay_ids.append(union_feature_2.id()) union_feature_1['num_overlays'] = len(overlay_ids) # solution for column type "string" instead of "integer list": # union_feature_1['overlay_ids'] = ','.join(str(id) for id in overlay_ids) union_feature_1['overlay_ids'] = overlay_ids union_layer.updateFeature(union_feature_1) union_layer.commitChanges() hth Ludwig Am 18.08.23 um 16:15 schrieb Daniela Friebel via QGIS-User: Dear Community I have a vectorlayer with many objects (polygons) that overlap. Now I want to create a new layer, where each overlap results in a separate object, which has an attribute with the number of overlaps. I have already tried various things, but have not yet found a solution. With the "union" tool I can generate the overlaps as objects, but I cannot count the number of overlaps. I am grateful for any help and hints. (I would like to count the overlaps to eventually create a heatmap. If there is a completely different way of doing this, I would also appreciate a tip). Kind regards Daniela ___ QGIS-User mailing list QGIS-User@lists.osgeo.org List info:https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user___ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] spatial analysis toolbox - testing for autocorrelation
Thayer Young via QGIS-User Fri, 18 Aug 2023 13:28:49 -0700 this means that geopandas is not installed. (It is installed in Lima not Firenze.) Hi Thayer, it seems to me the Python module "geopandas" is installed by default by both the current QGIS all-in-one stand-alone OSGeo4W .msi installer and the "network" OSGeo4W .exe installer (for qgis-full and qgis-ltr-full packages) for both QGIS 3.28 and QGIS 3.32. Anyway, another simple way to install the required Python packages, avoiding to use the shell and type commands in the CLI, is to use the OSGeo4W "Setup" program: all the required packages could be installed with few clicks. Best regards. Andrea ___ QGIS-User mailing list QGIS-User@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user