Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: way surface type storage #1794

Merged
merged 15 commits into from
May 24, 2024
Merged

fix: way surface type storage #1794

merged 15 commits into from
May 24, 2024

Commits on May 21, 2024

  1. refactor: way surface types as enums

    Use enumerations instead of simple integer constants in order to be able to store the surface types internally under different IDs than the corresponding API values.
    aoles committed May 21, 2024
    Configuration menu
    Copy the full SHA
    2a85552 View commit details
    Browse the repository at this point in the history
  2. test: add unit test for way surface storage

    Check whether values corresponding to the surface types can be reliably written and retrieved from the storage. The test currently fails because the number of different surface types exceeds the available data type range of 4 bits.
    aoles committed May 21, 2024
    Configuration menu
    Copy the full SHA
    5fa4bc6 View commit details
    Browse the repository at this point in the history
  3. fix: reduce the number of way surface types

    Remove some less common and relevant surface types such as "woodchips", or ambiguous ones: "fine gravel" and "cobblestone" in order to be able to encode them as 4-bit values. Note that "woodchips" has never been functional because its original value of 16 exceeds the available data type range of 4 bits.
    aoles committed May 21, 2024
    Configuration menu
    Copy the full SHA
    366d795 View commit details
    Browse the repository at this point in the history
  4. refactor: replace chained if-then-else statements by a switch statement

    Improves code readability and potentially performance.
    aoles committed May 21, 2024
    Configuration menu
    Copy the full SHA
    d0ccc4a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6c4583a View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. chore: refrain from using deprecated method

    Address issue reported by sonarcloud by replacing calls to `com.graphhopper.storage.Directory#find(java.lang.String)` by `com.graphhopper.storage.Directory#create(java.lang.String)`
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    5ded0a3 View commit details
    Browse the repository at this point in the history
  2. fix: classify ways tagged with surface=earth as surface type "Dirt"

    According to OSM wiki `surface=earth` is a synonym of `surface=dirt` and is used for where surface is exposed earth/soil/dirt but it is not sand or gravel or rock.
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    958c9c6 View commit details
    Browse the repository at this point in the history
  3. feat: add surface tag values "unhewn_cobblestone", "bricks" and "brick"

    Ways labelled with OSM tag `surface` set to "unhewn_cobblestone", "bricks" or "brick" are classified as surface type "Paving Stones" rather than "Unknown".
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    38973b3 View commit details
    Browse the repository at this point in the history
  4. feat: add a few less common unpaved surface types

    Ways labelled with OSM tag `surface` set to "rock", "rocks", "stone", "shells" or "salt" are classified as surface type "Unpaved" rather than "Unknown".
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    0c33751 View commit details
    Browse the repository at this point in the history
  5. feat: add surface tag values "chipseal", "bitmac" and "tarmac"

    Ways labelled with OSM tag `surface` set to "chipseal", "bitmac" or "tarmac" are classified as surface type "Asphalt" rather than "Unknown". According to OSM wiki most of chipseal and bitmac surfaces are likely tagged as `surface=asphalt`, whereas `surface=tarmac` is often incorrectly used for asphalt/concrete surfaces as actual tarmacadam is very unusual.
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    5b1078e View commit details
    Browse the repository at this point in the history
  6. feat: add surface tag value "soil"

    Ways labelled with OSM tag `surface` set to "soil" are classified as surface type "Dirt" rather than "Unknown".
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    ee86cd3 View commit details
    Browse the repository at this point in the history
  7. feat: classify ways tagged with surface=cement as surface type "Con…

    …crete"
    
    According to OSM wiki `surface=cement` is often used, by mistake, instead of `surface=concrete`.
    aoles committed May 22, 2024
    Configuration menu
    Copy the full SHA
    db68a9c View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. Configuration menu
    Copy the full SHA
    46c19a5 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. fix: do not infer surface type from road type

    Road classification doesn't necessarily imply surface. For example, driveways which are supposed to be tagged as `highway=service` + `service=driveway` are in many cases not paved.
    aoles committed May 24, 2024
    Configuration menu
    Copy the full SHA
    6dc1ab5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c4ea21a View commit details
    Browse the repository at this point in the history