Struct street_index::roads2csv::DeduplicatedRoads[][src]

pub struct DeduplicatedRoads {
    pub roads: BTreeMap<StreetName, BTreeSet<GridPosition>>,
}

Deduplicates road names, merging the roads by their name

Fields

Methods

impl DeduplicatedRoads
[src]

Deduplicates road names, i.e.:

Input:

This example is not tested
Mayer Street A4
Mayer Street A5
Mayer Street A6

Output:

This example is not tested
Mayer Street -> [A4, A5, A6]

The output road name positions are ordered.

Processes road names ([A1, A2] => A1-A2) if they span less than 2 grids.

Processing road names in a cartographic manner is tricky. For example, a street that appears in two locations on the map (such as a city having the same street name as a neighbouring city). Because of this, street name processing can't be fully automated, since there are always weird edge cases to worry about. However, 90% of roads aren't like that.

Because of this limitation process() gives you two types of roads back:

  • ProcessedRoadName is for roads that span only 1 or 2 grid cells (i.e. "Canterbury Road" => A9, "Canterbury Road" => A9-A10). In these cases (which cover 90% of street index names), the mapping is not ambigouus.

UnprocessedRoadName is for anything else (e.g. "Canterbury Road" => [A9, A10, E1, E2]. Usually these roads need to be manually reviewed - it could likely be that there are two roads "Canterbury Road" => A9-10;E1-E2, but it could also be that the road is just one road and part of it is just clipped off the map, in which case you'd write "Canterbury Road" => A9-E2.

Trait Implementations

impl Debug for DeduplicatedRoads
[src]

Formats the value using the given formatter. Read more

impl Clone for DeduplicatedRoads
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for DeduplicatedRoads
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for DeduplicatedRoads
[src]

impl PartialOrd for DeduplicatedRoads
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for DeduplicatedRoads
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for DeduplicatedRoads
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations