Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function is_closed() is not working #27529

Closed
qgib opened this issue Aug 27, 2018 · 5 comments
Closed

Function is_closed() is not working #27529

qgib opened this issue Aug 27, 2018 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions

Comments

@qgib
Copy link
Contributor

qgib commented Aug 27, 2018

Author Name: Zoran Petrovic (Zoran Petrovic)
Original Redmine Issue: 19704
Affected QGIS version: 3.2.2
Redmine category:geometry


When using Select by expression or Field calculator, function is_closed is not working.
For example:

this works:

CASE WHEN
x(start_point($geometry)) = x(end_point($geometry))
AND
y(start_point($geometry)) = y(end_point($geometry))
THEN 'closed' END

but this doesn't:

CASE WHEN
is_closed($geometry)
THEN 'closed' END

@qgib
Copy link
Contributor Author

qgib commented Aug 27, 2018

Author Name: Nyall Dawson (@nyalldawson)


Can you share the wkt for some geometries this fails for?

@qgib
Copy link
Contributor Author

qgib commented Aug 27, 2018

Author Name: Zoran Petrovic (Zoran Petrovic)


Nyall Dawson wrote:

Can you share the wkt for some geometries this fails for?

Here is the sample (EPSG 3908):

MultiLineString ((6501338.13976828 4850981.51459331, 6501343.09036573 4850984.01453377, 6501338.13976828 4850988.96491092, 6501335.63971657 4850984.01453377, 6501338.13976828 4850981.51459331))

MultiLineString ((6501793.14917959 4851116.51137828, 6501798.09977704 4851119.01131875, 6501793.14917959 4851120.67794572, 6501791.48247845 4851119.01131875, 6501793.14917959 4851116.51137828))

MultiLineString ((6502558.16500301 4851122.3445727, 6502563.11560045 4851124.01119967, 6502558.16500301 4851128.96157683, 6502553.21440556 4851124.01119967, 6502558.16500301 4851122.3445727))

Is_closed is probably having issues with the MultiLineString type.

@qgib
Copy link
Contributor Author

qgib commented Aug 27, 2018

Author Name: Nyall Dawson (@nyalldawson)


#7728


  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Aug 29, 2018

Author Name: Nyall Dawson (@nyalldawson)


Applied in changeset e5e14dd.


  • done_ratio was changed from 0 to 100
  • status_id was changed from In Progress to Closed

@qgib qgib closed this as completed Aug 29, 2018
@qgib
Copy link
Contributor Author

qgib commented Aug 29, 2018

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions
Projects
None yet
Development

No branches or pull requests

1 participant