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

automatically download adjacent ways when splitting a line #10615

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Dec 20, 2024

Closes #10469, Closes #10316

This error message has been removed:

image

and replaced with a popup that allows you to download the adjacent relation members and then continue the split operation:

image

@k-yle

This comment was marked as outdated.

// display the loading indicator
button.classed('loading', true);
context.loadEntity(d.relation.id, function() {
if (d.relation.members.length > 250) {
Copy link
Collaborator

@1ec5 1ec5 Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the relation has more than ~300 members, clicking the button will crash iD.

In my experience, 300 members isn’t that extreme and definitely wouldn’t risk a crash in general. A mid-sized U.S. state or a statewide bike trail would easily surpass this threshold. A confirmation dialog wouldn’t hurt, but the wording doesn’t need to be so certain and alarming. If this prevents the user from downloading the full relation, that could be unfortunate. Is there any way we could offer a third option to download the full relation at your own risk?

Mainland Australia1 has 3,583 members, which is a lot, but downloading it works for me without crashing in Firefox 134. It’s just very slow. I regularly work with large boundary relations in OpenHistoricalMap’s fork of iD that don’t incur any noticeable performance penalty. The performance issue is probably a function of the total number of nodes rather than the number of members, and maybe other factors too. For example, this multipolygon, which represents some marshes on the outskirts of San José, California, has only three members, but drawing an area that intersects it slows down iD even more than mainland Australia for me.

Footnotes

  1. Why the heck is there a boundary relation for a continent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I wonder if this is the total wrong approach. #10316 is the root of the problem, which this doesn't even't solve. This is more of a hack so I can edit my local beach 😅

I'm starting to think that we need a different popup which interrupts the split operation, and offers to download the prev+next members. And then we leave this download button alone.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I've completely the changed the approach, so it directly solves #10469 by interrupting the split operation, rather than the Download Full Relation button

@k-yle k-yle force-pushed the kh/cant-split-way branch from 8431f3b to 42bada7 Compare January 3, 2025 07:16
@k-yle k-yle changed the title prevent crash when downloading enormous relations automatically download adjacent ways when splitting a line Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants