Open dabreegster opened 1 year ago
@Robinlovelace, I was trying to write a test for this case, and I actually don't understand what the problem is in practice. Different OSM way IDs shouldn't be grouped, right? But two different roads in OSM never have overlapping geometry anyway; that's an accidental mapping error when it happens
Good question. Yes, I think a commonly useful use case would be to split on OSM ID. I guess an argument like --split_by osm_id
could be used for this.
I'm saying that if two line-strings have a different OSM ID, then they already don't overlap and wouldn't be grouped. So the use case for this can't be splitting on OSM ID. Does this option exist in the R version, or where is it needed? Do you have a motivating example?
Not sure I fully understand sorry. In the current implementation linestrings with different OSM IDs get merged if the sum of the values (or whatever aggregating function is used) is the same. That is more of a bug than a feature currently. There are few options in the R version. In fact a motivation for starting afresh, beyond performance and features, is this: https://github.com/ropensci/stplanr/issues/513
In the current implementation linestrings with different OSM IDs get merged if the sum of the values (or whatever aggregating function is used) is the same
If we have two adjacent line-strings in the input like:
<--------------------<--------------
You're saying that if the property being summed/aggregated winds up the same, the current implementation would glue these two together as one resulting linestring? I see. The current implementation does not do that, and I've started also thinking about how to retain / plumb along any feature IDs (outside of properties
). Maybe something like the keep_any
aggregation.
You're saying that if the property being summed/aggregated winds up the same, the current implementation would glue these two together as one resulting linestring?
Yep. I can imagine use cases where it's useful to glue them, e.g. when you want to reduce the file size of the route networks. That is a lot less applicable now than it was when we first developed it.
OK so I'll rephrase and deprioritize this issue. Thanks for clarifying!
Use case: don't combine two OSM ways together