Opened 5 years ago
Last modified 5 years ago
#18309 new enhancement
mapcss find one or more nodes next to current one
Reported by: | francians | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | mapcss validator | Cc: |
Description
Hello,
I'd like to use mapcss to find all the nodes next to current one...
Example: if there is a natural=tree and I want to search for another one in 20 mt or so.
Is there something like this?
I also think to use this to search for a platform for each stop position with the same name.
What do you think?
Francesco
Attachments (0)
Change History (7)
comment:1 by , 5 years ago
follow-up: 3 comment:2 by , 5 years ago
Ok. Thanks for replying...
I could work on this if there is any kind of interest and if you could give some help.
comment:3 by , 5 years ago
comment:4 by , 5 years ago
I am a Java developer.. but I don't have much experience in JOSM project (just few patches still unrewevied) and so I may need some hint
follow-up: 7 comment:5 by , 5 years ago
You may start looking at methods NavigatableComponent.getNearestNodes()
and DataSet.searchNode()
comment:7 by , 5 years ago
Replying to GerdP:
You may start looking at methods
NavigatableComponent.getNearestNodes()
andDataSet.searchNode()
I started thinking to the new syntax and I come with:
closest(expr, distance): returns a list of matching nodes
please find some example:
*[public_transport=platform][!contains(key("name"), closest( "*[public_transport=stop_position][name]", 20))] *[natural=tree][count(closest("*[natural=tree]", 10))>1]
searchNodes() could be fine, do I also need a Finder to evaluate my expression?
Should I cut the BBox for the distance?
Replying to francians:
No, nothing like this so far.