JHMeusener / osm2xodr

converter for OpenStreetMaps to OpenDrive roads - for use with Carla or other things
GNU General Public License v3.0
165 stars 51 forks source link

maxLon=0.0 when longitude is negative #5

Closed thillRobot closed 3 years ago

thillRobot commented 3 years ago

I am converting a .osm file from OpenStreetMap into a .xodr file. If I use a region with positive longitude such as Wuppertal (lon. apprx. 7) the tool seems to work fine, but when I use a region with negative longitude such as Cookeville (lon. apprx. -85) the tool does not act as expected. The maxLon is set to zero as shown in the terminal output. The scripts wuppertal.py and cookeville.py are copies of main.py with the paths adjusted accordingly.

$ python3 wuppertal.py
minlon = 7.1350238,minlat= 51.2429697,maxlon = 7.2217479,maxlat = 51.276214

$ python3 cookeville.py
minlon = -85.6914665,minlat= 36.104954,maxlon = 0.0,maxlat = 36.2087571

Is this is a known issue? Any help or information would be greatly appreciated.

thillRobot commented 3 years ago

I believe that the issue may be dependency related, or I have found a separate issue. When I run the script test.py I receive an error as shown below. This is possibly related to the fact that I am using Pillow and not PIL because I thought PIL was no longer maintained. Also, I have read that PIL and Pillow cannot be installed together in the same environment.

$ python3 test.py
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    from OSMParser.Parsing import rNode, _test_nodes, parseAll
  File "/home/researcher/carla_simulator/osm/osm2xodr/OSMParser/Parsing.py", line 9, in <module>
    from .utils import getCurves, convertLongitudeLatitude, giveHeading, convertTopoMap, giveHeight, setHeights
ImportError: cannot import name 'getCurves' from 'OSMParser.utils' (/home/researcher/carla_simulator/osm/osm2xodr/OSMParser/utils.py)

I will attempt to install PIL in a clean enviroment to see if this is related to my issue.

JHMeusener commented 3 years ago

Hi, yes, the problem should be fixed now (just pull the code again and try it). I just did not assume anything below 0 in my utility-functions to parse the maximal and minimal lon/lat coordinates - sorry :)

Am Mi., 20. Jan. 2021 um 16:35 Uhr schrieb thillRobot < notifications@github.com>:

Hello, I noticed you closed this. Do you have any suggestions for installing the dependencies? Do you think the maxlon=0 is related to the dependencies?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/JHMeusener/osm2xodr/issues/5#issuecomment-763714493, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWP4TIST2RDVFJ75HEDQDTS23Z33ANCNFSM4V6BPKXA .