acteng / overline

Aggregation of overlapping lines and values to build route networks
4 stars 0 forks source link

Implement overline in Rust #3

Closed dabreegster closed 1 year ago

dabreegster commented 1 year ago

This has a long way to go, but initial results on a large input:

Reading and deserializing cycle_routes_london.geojson
... took 10.795275234s
Running overline on 125317 line-strings
... took 11.485326553s
Aggregating properties on 100230 grouped line-strings
... took 1.990547542s
Writing to output.geojson
... took 877.395391ms

Outstanding tasks:

Robinlovelace commented 1 year ago

:rocket:

dabreegster commented 1 year ago

What're the ways to aggregate/deal with properties? So far:

enum Aggregation {
    /// Copy the value of this property from any input feature containing it. If the property
    /// differs among the input, it's undefined which value will be used.
    KeepAny,
    /// Sum this property as a floating point.
    SumFloat,
}

Average/mean is also used, right? We could also have something to collect all unique values into an array, if that's ever used

Robinlovelace commented 1 year ago

Sum, mean, first, last. At some point "the value associated with the longest section of linestring that fed into the segment"

Robinlovelace commented 1 year ago

Max, min, and x percentile (e.g. 85% percentile speeds) could be useful one day.

dabreegster commented 1 year ago

What do first and last mean -- min and max of a numeric?

Robinlovelace commented 1 year ago

min and max of numeric, yes. first can just mean the first appearance in the order that the input is read-in so kind of random.

dabreegster commented 1 year ago

Open viewer.html from the latest commit in a browser, load an output geojson file (from the new or old overline implementation, doesn't matter). It uses line thickness to display numeric properties. Think this'll work for manually inspecting test output?

dabreegster commented 1 year ago

Merging now and adding an issue for all the half-done work mentioned earlier