Closed mmd-osm closed 2 years ago
// does not work (no result)
make node ::geom = pt(49,7);
node(around:100);
out geom;
// works ok
//node(around:100,49,7);
//out geom;
make node ::geom = lstr(pt(49.30562251217971,6.947393417358398), pt(49.279312566741346,6.907224655151367));
node(around:100);
out geom;
--> unfortunately this is not supported, would be a good fit for #418
Added a prototype here: http://overpass-turbo.eu/s/xjy // https://github.com/mmd-osm/Overpass-API/commit/dd9d866c39fe5d79d9cc8b165db6d227add396d6
(
make demo key = "abcdef";
make demo key = "blubb";
make demo key = "hello";
);
out geom;
derived._[key="abcdef"];
out geom;
derived._[key~"de"];
out geom;
-> ok
if( ...)
https://lists.openstreetmap.org/pipermail/talk-de/2018-April/114786.html
Highway and landuse ways share at least 2 common nodes.
[bbox:{{bbox}}];
way[highway];
node(w) -> .highway_nodes;
way(bn.highway_nodes)[landuse];
foreach -> .luway {
node.highway_nodes(w.luway)->.lunodes;
way(bn.lunodes)[highway];
foreach -> .highway{
node.lunodes(w.highway);
if(count(nodes) >= 2) {
way.highway(bn)[highway];
out geom;
}
}
}
Overpass turbo link: http://overpass-turbo.eu/s/xHp
ad retro: This is fallout from #463. In particular, a request for the date in question would return way version 2 as well. This is damaged data in the database, they underlying code has been fixed.
ad for: I do understand that the name can be confusing. Yet I do not know any better, and I am not convinced that group_by or split_by give the right mindset. It really is a loop, and an unconditional one. It could agree on something like "forgroup", "gfor", "forexp" or so on, maybe "groupwise". "foreach" comes to mind but is already in use. Please tell me if you have further ideas.
ad nwr: This has been a user/uid specific bug and has been fixed in ec732ced276c955bc7f621c8294f8ca3d325335b
ad Global admin boundary relation check for duplicate members: In the meanwhile, this find more relations. All of them do have duplicate members, hence works as expected. Thank you for the query and the example.
ad Named street intersections: This is a really cool query. In the test area, it works as expected.
ad compare:
[diff:"2018-01-01T00:00:00Z"];
way(30292271);
out meta;
compare(delta: 0)
{
out meta;
make bla x = count(ways);
out meta ;
}
would have precisely the same effect, without any relation to user "FahrRadler". The expression delta is expected to depend on an object. Thus, its value is undefined for a non-existing object. For the moment, I deemed that the empty string as result for the entire expression would be the best fit, working well for tag comparison (the expected most frequent case).
The difference is visible if one uses the empty string as delta expression:
[diff:"2018-01-01T00:00:00Z"];
way(30292271);
out meta;
compare(delta: "")
{
out meta;
make bla x = count(ways);
out meta ;
}
ad local: I will not guarantee this feature as stable, thus it is deferred after release. For the uniqueness: almost all vertices are on unique coordinates. If there are indeed two vertices on the same cooridate then they are flagged with a special local id to distinguish them.
ad "Verklebte Landuses": this is also a very cool idea. Longterm there should be a dedicated operator, probably along with a tool to get the first/last/whatever specific node of a way.
ad geometry & around: This would be definitely a useful feature. But I see this now as a thing that should be added in addition to #418: While this is dynamic, #418 is static, hence it can be more rigid optimized beforehand than a dynamic structure.
ad nwr: This has been a user/uid specific bug and has been fixed in ec732ce
I'm seeing some issues with this change for the following query:
node(user:chris66);
out count;
This used to run in <20s (with #435 in place), and now takes around 42s (User_Statement::execute is no longer called). As it tries to read all nodes into memory the memory footprint also increased to 2,7 GB.
I think it would be better to have a similar logic in User_Statement::execute(Resource_Manager& rman)
like in query.cc with bit pattern matching on the type: if (type & QUERY_WAY)
in addition to the current string result_type
. Or even simpler:
Replace:
if ((result_type == "") || (result_type == "node"))
by
if ((result_type == "") || (result_type == "node") || (result_type == "nwr"))
and similar for ways and relations.
Once that's in place, we can switch back to standalone mode for user and uid.
Currently, result_type contains nwr
for the query example above, i.e. all of the node / way / relation processing simply gets bypassed in User_Statement::execute. That's the reason why this query doesn't return any result.
Stricter syntax checks for union/difference has caused some issues. In all cases missing semicolons were the culprit. It was correctly documented on the Overpass QL page, but hasn't really been enforced in the past.
Also t[name]
is no longer accepted and needs to be written as t["name"]
.
The addition of nwr
is very beneficial. Thanks for adding it.
Will it be implemented as an option for Statistical Counts instead of:
total = count(nodes) + count(ways) + count(relations),
or is there a conciser way that I'm unaware of?
showstopper
Area creation still has really serious performance issues due to eval_set
This is a must fix before releasing 0.7.55 as area creation is pretty much unusable right now.
https://github.com/drolbr/Overpass-API/issues/414
retro
Invisible versions are returned in result
see https://github.com/drolbr/Overpass-API/issues/282#issuecomment-366381776
for
Term "for" is a bit difficult to understand, is something like a "group by" or "split by" based on an evaluator expression.
Steps:
val
(see Set Key-Value Evaluator)Test example: count number and total length of all highways in bbox per surface
List of unique street names in an area, with total count of ways and length:
Stats per user in bbox (last editor)
Further examples as per https://forum.openstreetmap.org/viewtopic.php?pid=692686#p692686
Recent change:
out
has to be inside for{ }
!nwr
User id filter is ignored
-> nwr(uid:212553) has currently no effect
Test with around
Looks good.
Element dependent evaluators
Global admin boundary relation check for duplicate members
One example result out of 6 results: https://www.openstreetmap.org/relation/6259670
Meta data evaluators
version
type
Calculate new object id based on original object type
Mixed cases
nwr, center, geom, string concatenation, ternary if
Named street intersections
Determines street intersections and creates dummy nodes with _names tag, containing all distinct street names at a given intersection.
User rank in area sorted by number of last changed nodes
lrs
Min / Max value
Example
Multiple values containing specific value
compare
Find out if a user was / is currently involved in mapping highway ways
Result is not clear: Object was deleted in the meantime, however user uid 344561 ("FahRadler") was never involved in this object. Why does it show up in "show_initial"?
local
connections between links for ways not clear
Result:
Issue: although link id 1 & 2 belong to the same way, it's not obvious from the data, that there's a connection. Sharing the same lat & lon value is not sufficient in this case.
This is much clearer for relations: