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

Closes #204 and adds POIs for landuse=village_green, laduse=allotment… #212

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

lenalebt
Copy link
Contributor

…s, leisure=playground

@Test
void playground() {
assertFeatures(15,
List.of(Map.of("pmap:kind", "playground"), Map.of("pmap:kind", "playground", "pmap:min_zoom", 13, "name", "Spielwiese")),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am a bit unsure about why I see two elements here - maybe just have a closer look whetehr the tests are what you would expect :-)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bdon can you comment on this question about test construction, please?

Copy link
Member

Choose a reason for hiding this comment

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

The tests run against the entire Profile, not just a single layer class, so you're also getting the landuse element in the result set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, understood, but that means I'm basically not unit-testing the part I'm interested in. I don't necessarily want to refactor it so it is independent - I think it's rather up to you how you want this part to evolve in the future. I'll add a comment about what is happening.

@lenalebt
Copy link
Contributor Author

Will fix the issues monday or tuesday, won't find time beforehand

@@ -355,7 +356,9 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
}
}
} else if (kind.equals("cemetery") ||
kind.equals("school")) {
kind.equals("school") ||
kind.equals("allotments") ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

Allotment POIs should appear later than schools, more like zoom 15 or 16

(see also how Tilezen sets the value: https://github.com/tilezen/vector-datasource/blob/master/yaml/pois.yaml#L1258-L1266)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then I'll add it such that allotments larger than 250m² get shown from zoom level 15, and smaller ones from 16 (basically last part of this branch).

kind.equals("school")) {
kind.equals("school") ||
kind.equals("allotments") ||
kind.equals("playground")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Playground POIs should only appear at later zooms, like zoom 16.

(see also how Tilezen sets the value: https://github.com/tilezen/vector-datasource/blob/master/yaml/pois.yaml#L1315-L1324)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll add a separate branch showing them from zoom level 16 onwards.

@@ -323,7 +323,8 @@ public void processFeature(SourceFeature sf, FeatureCollector features) {
} else if (kind.equals("forest") ||
kind.equals("park") ||
kind.equals("protected_area") ||
kind.equals("nature_reserve")) {
kind.equals("nature_reserve") ||
kind.equals("village_green")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could work out... but might need some adjustments. Generally village greens are pretty small, and the other features in this grouping can get much larger.

Most similar Tilezen section is here https://github.com/tilezen/vector-datasource/blob/master/yaml/pois.yaml#L143-L152, but there's some related clamping for commons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What adjustments are you thinking about?

Copy link

sonarqubecloud bot commented Feb 2, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
81.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@bdon
Copy link
Member

bdon commented Feb 2, 2024

@lenalebt thanks for adding these - can you suggest a representative area of the world so I can try out the PR on it?

The nature of tileset changes is that they will affect the visual output. One of the things I'm working on is a test suite that lets us regression compare visually any two states in the past. Example of a test for bridges: https://maps.protomaps.com/visualtests/?tag=bridge

Ideally a visual test example for this would have one or more playgrounds and village greens / allotments

@bdon
Copy link
Member

bdon commented Feb 2, 2024

(Nevermind, I see your link for https://www.openstreetmap.org/#map=18/51.50497/7.31888 , perfect example!)

@bdon bdon merged commit af7c9e9 into protomaps:main Feb 2, 2024
4 checks passed
@bdon
Copy link
Member

bdon commented Feb 2, 2024

Merging for now, will follow up with style changes later, thanks!

@bdon
Copy link
Member

bdon commented Feb 2, 2024

(visual diff) Screenshot 2024-02-03 at 00 50 07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants