[openstreetmap/openstreetmap-website] In node browse section, node is said to be part of 2 ways when it is the first and the last node of a closed way (Issue #3519)
ricloy
notifications at github.com
Wed Mar 30 19:40:11 UTC 2022
Example: https://www.openstreetmap.org/node/5749689931
Only one way is shown (which is correct) but the number given is 2.
The sum is also wrong in the rarer cases where a node is the first and last node of multiple closed ways (e.g. https://www.openstreetmap.org/node/4206797803 in which case the node belongs to 19 ways and for 14 of them is the first and the last node).
I think the problem may reside here:
https://github.com/openstreetmap/openstreetmap-website/blob/70d7d8d850148f714b70a3297c02a8203214dec6/app/views/browse/_node.html.erb#L17
I have done some tests with a local docker container and using **distinct.count** instead of **count** seemed to solve the problem, but I don't know Ruby on Rails so I haven't created a pull request.
Kind regards,
Marco.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3519
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/3519 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220330/02458be7/attachment.htm>
More information about the rails-dev
mailing list