Giter VIP home page Giter VIP logo

Comments (3)

morishima0524 avatar morishima0524 commented on June 1, 2024

I couldn’t find driving side option when execute conversion using OSM2World.

https://wiki.openstreetmap.org/wiki/OSM2World/Configuration_file

unfortunately, this requires changing the source code at the moment.
Specifically, this constant needs to be set to false instead of true:
https://github.com/tordanik/OSM2World/blob/master/src/main/java/org/osm2world/core/world/modules/RoadModule.java#L62

I had changed and execute conversion but couldn't get expected result.
I changed only true to false like below:
public static final boolean RIGHT_HAND_TRAFFIC_BY_DEFAULT = false;

Input osm (Abbreviate some elements.)

The road has 3 lanes and is left-hand traffic.

 <bounds minlat="35.5981328" minlon="139.6096246" maxlat="35.5991328" maxlon="139.6106246"/>
...
 <way id="885553305" visible="true" version="2" changeset="96203679" timestamp="2020-12-21T15:07:45Z" user="ffff23" uid="10888797">
  <tag k="highway" v="primary"/>
  <tag k="lanes" v="3"/>
  <tag k="lanes:backward" v="1"/>
  <tag k="lanes:forward" v="2"/>
  <tag k="name:en" v="Tsurumi Mizonokuchi Line"/>
  <tag k="name:ja" v="鶴見溝ノ口線"/>
  <tag k="oneway" v="no"/>
  <tag k="ref" v="14"/>
  <tag k="route" v="road"/>
  <tag k="turn:lanes:forward" v="left;through|right"/>
 </way>
...
</osm>

I expect:

  • Leftmost lane have left-turn and straight-through arrow.
  • Middle lane (right of forward lane) have righ-turn arrow.
  • Rightmost lane have no sign.

But I got:

  • Leftmost lane had right-turn arrow.
  • Middle lane (right of forward lane) had left-turn and straight-through arrow.
  • Rightmost lane had no sign. (It's expected)

By the way, convert with right-hand traffic is true:

  • Leftmost lane had no sign.
  • Middle lane had left-turn and straight-through arrow.
  • Rightmost lane had right-turn arrow.

Please use this as a reference.

from osm2world.

tordanik avatar tordanik commented on June 1, 2024

Thank you for looking into this more closely, this is a very useful report. With your example, I was able to easily reproduce the issue. It appears that the logic for parsing keys with a :lane suffix does not correctly take driving directions into account. (I believe the result of getPerLaneTags needs to be reversed for left-hand traffic.) I'll make sure to fix this soon.

from osm2world.

tordanik avatar tordanik commented on June 1, 2024

c2faa23 fixes incorrect lane arrangement for left-hand traffic.
34a2337 additionally offers a config option drivingSide=left that changes the default so that changes to the code itself should no longer be necessary.

I hope these commits resolve the issue, please let me know if there are still problems!

from osm2world.

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.