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

consider lifecycle prefixes in osmTagSuggestingArea #8881

Merged
merged 2 commits into from
Jun 6, 2022

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Jan 7, 2022

Ways with lifecycle prefixes as always rendered as a line in iD, even if the feature would normally be treated as an area (for example disused:amenity=school or abandoned:leisure=stadium).

This PR makes iD consider lifecycle prefixes when deciding whether a way is a line or an area.

Example for proposed:building=yes:

image

Copy link
Collaborator

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

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

Great idea!

modules/osm/tags.js Show resolved Hide resolved
@@ -210,7 +199,7 @@ export function rendererFeatures(context) {

for (var i = 0; i < strings.length; i++) {
var s = strings[i];
if (past_futures[s] || past_futures[tags[s]]) { return true; }
if (osmLifecyclePrefixes[s] || osmLifecyclePrefixes[tags[s]]) return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense that intermittent:* would be filtered out by the past/future filter? (Also not:*, discussed above.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not sure what the right answer is for intermittent:* is, but bear in mind that intermittent:* is only used once in the world (cf. other prefixes like disused:* are used >200,000 times). It seems like intermittent=yes is the more common tag.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like the intermittent entry originated from 494e247. It was probably intended to support intermittent=yes, not intermittent:*=*.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for finding that. I guess it would be logical for the past/future filter to match all the lifecycle prefixes except intermittent

modules/osm/tags.js Show resolved Hide resolved
@tyrasd tyrasd added this to the 2.21.0 milestone Jan 28, 2022
@tyrasd tyrasd added the enhancement An enhancement to make an existing feature even better label Jan 28, 2022
@tyrasd tyrasd modified the milestones: 2.21.0, 2.22.0 Jun 2, 2022
@tyrasd tyrasd merged commit 724462e into openstreetmap:develop Jun 6, 2022
tyrasd added a commit that referenced this pull request Jun 6, 2022
@tyrasd tyrasd added the map-renderer An issue with how things are rendered in the map label Jun 6, 2022
@k-yle k-yle deleted the lifecycle-area branch June 7, 2022 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to make an existing feature even better map-renderer An issue with how things are rendered in the map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants