We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug I'm unable to use '${ feature.point_along_line(0) != feature.point_along_line(1) }' in an include_when expression.
'${ feature.point_along_line(0) != feature.point_along_line(1) }'
include_when
Following this Slack discussion and PR #1163
To Reproduce
The YAML schema below defines 3 layers:
pier_not_closed
pier_closed
pier_all
pier.yaml
schema_name: pier schema_description: Example of "is_closed"-like expressions in `include_when` attribution: <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a> args: area: description: Geofabrik area to download default: monaco osm_url: description: OSM URL to download default: '${ args.area == "planet" ? "aws:latest" : ("geofabrik:" + args.area) }' sources: osm: type: osm url: '${ args.osm_url }' layers: - id: pier_not_closed features: - source: osm geometry: line include_when: - __all___: - man_made: pier - '${ feature.point_along_line(0) != feature.point_along_line(1) }' - id: pier_closed features: - source: osm geometry: line include_when: - __all___: - man_made: pier - '${ feature.point_along_line(0) == feature.point_along_line(1) }' - id: pier_all features: - source: osm geometry: line include_when: - man_made: pier
docker run --rm -v "$(pwd):/w" -w /w ghcr.io/onthegomap/planetiler@sha256:2d3a4bd0b8ba16250d21b127d2e03b96f2517a9a3f99769b40ce27df760ad14e pier.yaml --output pier.pmtiles --download
0:00:04 DEB [archive] - Max tile sizes z11 z12 z13 z14 all pier_all 41 41 41 41 41 full tile 41 41 41 41 41 gzipped 63 63 63 63 63
0:00:04 DEB [archive] - # tiles: 4 0:00:04 DEB [archive] - # features: 4
Most likely, the feature is way 879006855 - a closed way that does not have an area=yes attribute
area=yes
Expected behavior
Environment:
The text was updated successfully, but these errors were encountered:
It looks like you have an extra underscore at the end of __all___ - what happens if you remove that?
__all___
Sorry, something went wrong.
You're absolutely right! I wish that there was a syntax error of some sort on such a typing error.
When using __all__, the output is as expected:
__all__
z11 z12 z13 z14 all pier_all 41 41 41 41 41 pier_closed 44 44 44 44 44 full tile 85 85 85 85 85 gzipped 78 78 78 78 78
and
0:00:04 DEB [archive] - # tiles: 4 0:00:04 DEB [archive] - # features: 8
No branches or pull requests
Describe the bug
I'm unable to use
'${ feature.point_along_line(0) != feature.point_along_line(1) }'
in aninclude_when
expression.Following this Slack discussion and PR #1163
To Reproduce
The YAML schema below defines 3 layers:
pier_not_closed
is expected to capture all piers that are not a closed linepier_closed
is expected to capture all piers that are a closed linepier_all
is expected to capture all piers regardless of their closenesspier.yaml
pier_not_closed
andpier_closed
layers are empty:pier_all
layer has 1 feature in each of the 4 tiles producedMost likely, the feature is way 879006855 - a closed way that does not have an
area=yes
attributeExpected behavior
pier_closed
to have the same contents aspier_all
.pier_all
to appear in eitherpier_not_closed
orpier_closed
.Environment:
The text was updated successfully, but these errors were encountered: