Skip to content

QGIS Expression - overlay_intersects #59408

Description

@pigreco

What is the bug or the crash?

I noticed that using the return_details and sort_by_intersection_size options does not give the expected results.

If the object to evaluate has more parts or is multipart, the output is incorrect, that is, the output returns only the length (or area) of the largest part.

In the image below I highlight the fact that the L-shaped segment is calculated only the length of the longest segment.
image

In the case of Multipolygon with separate parts, the area of ​​the largest overlap is calculated and not the overall area.
image

Steps to reproduce the issue

I attach an example project (use the views to correctly display the two cases)I attach an example project (use the views to correctly display the two cases)

progetto_overlap.zip

https://discourse.osgeo.org/t/espressione-di-qgis-overlay-intersects/111118/1

Versions

Versione di QGIS3.41.0-Master
Revisione codice QGISfda2aa46e9
 
Librerie
Versione Qt5.15.13
Versione Python3.12.7
Versione GDAL/OGR3.11.0dev-b281c45d9a
Versione PROJ9.5.0
Versione database del Registro EPSGv11.016 (2024-08-31)
Versione GEOS3.13.0-CAPI-1.19.0
Versione SQLite3.46.1
Versione PDAL2.8.1
Versione client PostgreSQL16.2
Versione SpatiaLite5.1.0
Versione QWT6.3.0
Versione QScintilla22.14.1
Versione SOWindows 11 Version 2009
Questa copia di QGIS scrive messaggi di debug.
 
Plugins Python attivi
DataPlotly4.2.0
felt3.1.5
gps_replay0.0.5
HCMGIS24.10.20
mmqgis2021.9.10
nominatim_locator_filter0.3.2
profile-manager0.31
qconsolidate1.1.0
qduckdb1.0.1
quick_map_services0.19.34
relazioniplugin1.1
SelectionFilter1.0
db_manager0.1.20
MetaSearch0.3.6
processing2.12.99

The problem is present on QGIS 3.34.12, QGIS 3.40.0 and the master

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!ExpressionsRelated to the QGIS expression engine or specific expression functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions