qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.5k stars 2.99k forks source link

Wrong label in UI for "Create point for each part" on "Centroids" processing algorithm #32940

Closed phidrho closed 4 years ago

phidrho commented 4 years ago

Describe the bug Current misleading label says "Create point on surface for each part" which is probably copied from Point on surface algorithm. This assumes if checked, point on surface algorithm should be used, which is not correct. Should be corrected to "Create a centroid for each part".

OLD VERSION OF THIS BUG REPORT (IGNORE, HERE ONLY FOR REFERENCE):

When option "Create point on surface for each part" is checked, all created 'centroid' points should be inside polygon, but for some reason they don't. See video demo. If I am understanding it correctly it shoud behave as ST_PointOnSurface.

bug_qgis_centroids.zip

QGIS and OS versions

QGIS version 3.10.0-A Coruña QGIS code revision 6ffa89eb3e Compiled against Qt 5.11.2 Running against Qt 5.11.2 Compiled against GDAL/OGR 3.0.2 Running against GDAL/OGR 3.0.2 Compiled against GEOS 3.8.0-CAPI-1.13.1 Running against GEOS 3.8.0-CAPI-1.13.1 Compiled against SQLite 3.29.0 Running against SQLite 3.29.0 PostgreSQL Client Version 11.5 SpatiaLite Version 4.3.0 QWT Version 6.1.3 QScintilla2 Version 2.10.8 Compiled against PROJ 6.2.1 Running against PROJ Rel. 6.2.1, November 1st, 2019 OS Version Windows 10 (10.0) Active python plugins gml_application_schema_toolbox; LAStools; mmqgis; db_manager; MetaSearch; processing

nirvn commented 4 years ago

This label is misleading, it should read "create a centroid for each part". What you want to use is the point on surface algorithm.

phidrho commented 4 years ago

Oh, I didn't know that they are separate algorithms, I've found it now in Processing Toolbox. So It's only a bug in UI, it should be easy fix. It would be nice to have POS algorithm in menu next to Centroids algorithm.

gioman commented 4 years ago

So It's only a bug in UI, it should be easy fix.

please update accordingly the subject and description of this ticket, thanks.

havatv commented 4 years ago

Shouldn't this be backported to the current LTR (3.4)? PR #32955 should fix this (I have only replaced "point on surface" with "centroid", as in the original PR.