Code Monkey home page Code Monkey logo

Comments (3)

aoles avatar aoles commented on June 3, 2024

Thanks for filing the issue. The result from your first example is indeed unexpected and needs to be investigated further. For reference here's the direct link to the OSM way.

As for your other examples, it's actually not a 🐛 but a feature 😂 This is so because in the first case the way which is tagged as highway=service is categorized as WayType.STREET and as such receives the assumed surface type paved according to the logic in WaySurfaceTypeGraphStorageBuilder:

if (surfaceType == SurfaceType.UNKNOWN) {
if (wayType == WayType.ROAD || wayType == WayType.STATE_ROAD || wayType == WayType.STREET) {
surfaceType = SurfaceType.PAVED;
} else if (wayType == WayType.PATH) {
surfaceType = SurfaceType.UNPAVED;
}
}

In the case of the cycleway and footway the OSM tag highway=path translates to WayType.PATH which is assumed to be unpaved by the above logic. This happens because tags such as footway:surface or cycleway:surface are currently not being parsed, just the surface one.

from openrouteservice.

michalgwo avatar michalgwo commented on June 3, 2024

As for your other examples, it's actually not a 🐛 but a feature 😂 This is so because in the first case the way which is tagged as highway=service is categorized as WayType.STREET and as such receives the assumed surface type paved according to the logic in WaySurfaceTypeGraphStorageBuilder:

But this is wrong. Not every highway=service is paved. One example could be a driveway which is supposed to be tagged as highway=service + service=driveway, but in many cases is not paved, at least in Poland (wiki).

In the case of the cycleway and footway the OSM tag highway=path translates to WayType.PATH which is assumed to be unpaved by the above logic. This happens because tags such as footway:surface or cycleway:surface are currently not being parsed, just the surface one.

Same as above, highway=path doesn't mean the surface is unpaved. A good example is shared foot and bicycle paths, which are tagged highway=path + bicycle=designated + foot=designated and are often made of asphalt or paving stones (wiki).

Anyway, road classification doesn't imply surface in any case, so I think this feature should be disabled.

from openrouteservice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.