treee111 / wahooMapsCreator

Create maps for Wahoo device based on latest OSM maps
247 stars 25 forks source link

Error creating Netherlands maps #214

Closed HJKLMN closed 9 months ago

HJKLMN commented 1 year ago

Expected Behavior

Create maps

Current Behavior

Get an error

Steps to Reproduce the Issue

  1. conda activate gdal-user
  2. python -m wahoomc cli -co -v netherlands

Context

Log Output / Stack Trace

INFO:+ (tile 5 of 14) Coordinates: 131,83 DEBUG:subprocess debug output: Add nodes: 1,000,000 Add nodes: 2,000,000 Add ways: 50,000 Add ways: 100,000 Add ways: 150,000 Add ways: 200,000 Add ways: 250,000 Progress: Relations 100 / 1,778 Progress: Relations 200 / 1,778 Progress: Relations 300 / 1,778 Progress: Relations 400 / 1,778 Progress: Relations 500 / 1,778 Progress: Relations 600 / 1,778 Progress: Relations 700 / 1,778 Progress: Relations 800 / 1,778 Progress: Relations 900 / 1,778 Progress: Relations 1,000 / 1,778 Progress: Relations 1,100 / 1,778 Progress: Relations 1,200 / 1,778 Progress: Relations 1,300 / 1,778 Progress: Relations 1,400 / 1,778 Progress: Relations 1,500 / 1,778 Progress: Relations 1,600 / 1,778 Progress: Relations 1,700 / 1,778 Progress: Ways 10,000 / 265,251 Progress: Ways 20,000 / 265,251 Progress: Ways 30,000 / 265,251 Progress: Ways 40,000 / 265,251 Progress: Ways 50,000 / 265,251 Progress: Ways 60,000 / 265,251 Progress: Ways 70,000 / 265,251 Progress: Ways 80,000 / 265,251 Progress: Ways 90,000 / 265,251 Progress: Ways 100,000 / 265,251 Progress: Ways 110,000 / 265,251 Progress: Ways 120,000 / 265,251 Progress: Ways 130,000 / 265,251 Progress: Ways 140,000 / 265,251 Progress: Ways 150,000 / 265,251 Progress: Ways 160,000 / 265,251 Progress: Ways 170,000 / 265,251 Progress: Ways 180,000 / 265,251 Progress: Ways 190,000 / 265,251 Progress: Ways 200,000 / 265,251 Progress: Ways 210,000 / 265,251 Progress: Ways 220,000 / 265,251 Progress: Ways 230,000 / 265,251 Progress: Ways 240,000 / 265,251 Progress: Ways 250,000 / 265,251 Progress: Ways 260,000 / 265,251

INFO:+ (tile 6 of 14) Coordinates: 131,84 Traceback (most recent call last): File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/main.py", line 7, in main.run("run") File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/main.py", line 96, in run o_osm_maps.create_map_files(o_input_data.save_cruiser, File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/osm_maps_functions.py", line 789, in create_map_files run_subprocess_and_log_output( File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/osm_maps_functions.py", line 43, in run_subprocess_and_log_output process = subprocess.run( File "/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['osmosis', '--rb', '/home/henk-jan/wahooMapsCreatorData/_tiles/131/84/merged.osm.pbf', '--mw', 'file=/home/henk-jan/wahooMapsCreatorData/_tiles/131/84.map', 'bbox=51.618017,4.218750,52.482780,5.625000', 'zoom-interval-conf=10,0,17', 'threads=3', 'tag-conf-file=/home/henk-jan/anaconda3/envs/gdal-user/lib/python3.10/site-packages/wahoomc/resources/tag_wahoo_adjusted/tag-wahoo-poi.xml']' returned non-zero exit status 1. (gdal-user) henk-jan@henkjan-Lenovo-YOGA-510-14ISK:~$

HJKLMN commented 1 year ago

Oh, creating a map for Malta works

And:

conda list (gdal-user) henk-jan@henkjan-Lenovo-YOGA-510-14ISK:~$ conda list # packages in environment at /home/henk-jan/anaconda3/envs/gdal-user: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge alsa-lib 1.2.8 h166bdaf_0 conda-forge attr 2.5.1 h166bdaf_1 conda-forge beautifulsoup4 4.11.2 pyha770c72_0 conda-forge blosc 1.21.4 h0f2a231_0 conda-forge boost-cpp 1.78.0 h5adbc97_2 conda-forge brotlipy 0.7.0 py310h5764c6d_1005 conda-forge bs4 4.11.2 hd8ed1ab_0 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.19.1 hd590300_0 conda-forge ca-certificates 2023.5.7 hbcca054_0 conda-forge cairo 1.16.0 ha61ee94_1014 conda-forge certifi 2023.5.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py310h255011f_3 conda-forge cfitsio 4.2.0 hd9d235c_0 conda-forge charset-normalizer 3.1.0 pyhd8ed1ab_0 conda-forge cryptography 41.0.1 py310h75e40e8_0 conda-forge curl 8.1.2 h409715c_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge dbus 1.13.6 h5008d03_3 conda-forge expat 2.5.0 hcb278e6_1 conda-forge fftw 3.3.10 nompi_hc118613_107 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.2 h14ed4e7_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.12.1 hca18f0e_1 conda-forge freexl 1.0.6 h166bdaf_1 conda-forge gdal 3.6.3 py310hc1b7723_0 conda-forge geojson 2.5.0 py_0 conda-forge geos 3.11.1 h27087fc_0 conda-forge geotiff 1.7.1 hb963b44_7 conda-forge gettext 0.21.1 h27087fc_0 conda-forge giflib 5.2.1 h0b41bf4_3 conda-forge glib 2.76.3 hfc55251_0 conda-forge glib-tools 2.76.3 hfc55251_0 conda-forge graphite2 1.3.13 h58526e2_1001 conda-forge gst-plugins-base 1.22.0 h4243ec0_2 conda-forge gstreamer 1.22.0 h25f0c4b_2 conda-forge gstreamer-orc 0.4.34 hd590300_0 conda-forge harfbuzz 6.0.0 h8e241bc_0 conda-forge hdf4 4.2.15 h501b40f_6 conda-forge hdf5 1.12.2 nompi_h4df4325_101 conda-forge icu 70.1 h27087fc_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge jack 1.9.22 h11f4161_0 conda-forge json-c 0.16 hc379101_0 conda-forge kealib 1.5.0 ha7026e8_0 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge kiwisolver 1.4.4 py310hbf28c38_1 conda-forge krb5 1.20.1 h81ceb04_0 conda-forge lame 3.100 h166bdaf_1003 conda-forge lcms2 2.15 haa2dc70_1 conda-forge ld_impl_linux-64 2.40 h41732ed_0 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libaec 1.0.6 hcb278e6_1 conda-forge libblas 3.9.0 16_linux64_openblas conda-forge libcap 2.67 he9d0100_0 conda-forge libcblas 3.9.0 16_linux64_openblas conda-forge libclang 15.0.7 default_h7634d5b_2 conda-forge libclang13 15.0.7 default_h9986a30_2 conda-forge libcups 2.3.3 h36d4200_3 conda-forge libcurl 8.1.2 h409715c_0 conda-forge libdb 6.2.32 h9c3ff4c_0 conda-forge libdeflate 1.17 h0b41bf4_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libevent 2.1.10 h28343ad_4 conda-forge libexpat 2.5.0 hcb278e6_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libflac 1.4.2 h27087fc_0 conda-forge libgcc-ng 12.2.0 h65d4601_19 conda-forge libgcrypt 1.10.1 h166bdaf_0 conda-forge libgdal 3.6.3 hb7af45b_0 conda-forge libgfortran-ng 12.2.0 h69a702a_19 conda-forge libgfortran5 12.2.0 h337968e_19 conda-forge libglib 2.76.3 hebfc3b9_0 conda-forge libgomp 12.2.0 h65d4601_19 conda-forge libgpg-error 1.46 h620e276_0 conda-forge libiconv 1.17 h166bdaf_0 conda-forge libjpeg-turbo 2.1.5.1 h0b41bf4_0 conda-forge libkml 1.3.0 h37653c0_1015 conda-forge liblapack 3.9.0 16_linux64_openblas conda-forge libllvm15 15.0.7 hadd5161_1 conda-forge libnetcdf 4.9.1 nompi_hd2e9713_102 conda-forge libnghttp2 1.52.0 h61bc06f_0 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libogg 1.3.4 h7f98852_1 conda-forge libopenblas 0.3.21 pthreads_h78a6416_3 conda-forge libopus 1.3.1 h7f98852_1 conda-forge libpng 1.6.39 h753d276_0 conda-forge libpq 15.2 hb675445_0 conda-forge librttopo 1.1.0 ha49c73b_12 conda-forge libsndfile 1.2.0 hb75c966_0 conda-forge libspatialite 5.0.1 h221c8f1_23 conda-forge libsqlite 3.42.0 h2797004_0 conda-forge libssh2 1.10.0 hf14f497_3 conda-forge libstdcxx-ng 12.2.0 h46fd767_19 conda-forge libsystemd0 253 h8c4010b_1 conda-forge libtiff 4.5.0 hddfeb54_5 conda-forge libtool 2.4.7 h27087fc_0 conda-forge libudev1 253 h0b41bf4_1 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libvorbis 1.3.7 h9c3ff4c_0 conda-forge libwebp-base 1.3.0 h0b41bf4_0 conda-forge libxcb 1.13 h7f98852_1004 conda-forge libxkbcommon 1.5.0 h79f4944_1 conda-forge libxml2 2.10.3 hca2bb57_4 conda-forge libxslt 1.1.37 h873f0b0_0 conda-forge libzip 1.9.2 hc929e4a_1 conda-forge libzlib 1.2.13 h166bdaf_4 conda-forge lxml 4.9.2 py310hbdc0903_0 conda-forge lz4-c 1.9.4 hcb278e6_0 conda-forge matplotlib 3.4.3 py310hff52083_2 conda-forge matplotlib-base 3.4.3 py310h23f4a51_2 conda-forge mpg123 1.31.3 hcb278e6_0 conda-forge mysql-common 8.0.32 hf1915f5_2 conda-forge mysql-libs 8.0.32 hca2cd23_2 conda-forge ncurses 6.3 h27087fc_1 conda-forge nspr 4.35 h27087fc_0 conda-forge nss 3.89 he45b914_0 conda-forge numpy 1.24.3 py310ha4c1d20_0 conda-forge openjpeg 2.5.0 hfec8fc6_2 conda-forge openssl 3.1.1 hd590300_1 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge pcre2 10.40 hc3806b6_0 conda-forge pillow 9.5.0 py310h065c6d2_0 conda-forge pip 23.1.2 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h36c2ea0_0 conda-forge ply 3.11 py_1 conda-forge poppler 23.03.0 hf052cbe_1 conda-forge poppler-data 0.4.12 hd8ed1ab_0 conda-forge postgresql 15.2 h3248436_0 conda-forge proj 9.1.1 h8ffa02c_2 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pulseaudio 16.1 hcb278e6_3 conda-forge pulseaudio-client 16.1 h5195f5e_3 conda-forge pulseaudio-daemon 16.1 ha8d29e2_3 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyqt 5.15.7 py310hab646b1_3 conda-forge pyqt5-sip 12.11.0 py310heca2aa9_3 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.11 he550d4f_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python_abi 3.10 3_cp310 conda-forge qt-main 5.15.8 h67dfc38_7 conda-forge readline 8.2 h8228510_1 conda-forge requests 2.28.2 pyhd8ed1ab_1 conda-forge setuptools 67.7.2 pyhd8ed1ab_0 conda-forge shapely 1.8.5 py310h5b266fc_2 conda-forge sip 6.7.9 py310hc6cd4ac_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h9fff704_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sqlite 3.42.0 h2c6b66d_0 conda-forge tiledb 2.13.2 hd532e3d_0 conda-forge tk 8.6.12 h27826a3_0 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.3.2 py310h2372a71_0 conda-forge tzcode 2023c h0b41bf4_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge urllib3 1.26.15 pyhd8ed1ab_0 conda-forge wahoomc 4.0.3a0 pypi_0 pypi wheel 0.40.0 pyhd8ed1ab_0 conda-forge xcb-util 0.4.0 h166bdaf_0 conda-forge xcb-util-image 0.4.0 h166bdaf_0 conda-forge xcb-util-keysyms 0.4.0 h166bdaf_0 conda-forge xcb-util-renderutil 0.3.9 h166bdaf_0 conda-forge xcb-util-wm 0.4.1 h166bdaf_0 conda-forge xerces-c 3.2.4 h55805fa_1 conda-forge xkeyboard-config 2.38 h0b41bf4_0 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.1.1 hd590300_0 conda-forge xorg-libsm 1.2.4 h7391055_0 conda-forge xorg-libx11 1.8.4 h0b41bf4_0 conda-forge xorg-libxau 1.0.11 hd590300_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h0b41bf4_2 conda-forge xorg-libxrender 0.9.10 h7f98852_1003 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge xorg-xf86vidmodeproto 2.3.1 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.6 h166bdaf_0 conda-forge zlib 1.2.13 h166bdaf_4 conda-forge zstd 1.5.2 h3eb15da_6 conda-forge
treee111 commented 1 year ago

HI @HJKLMN, thanks for opening the issue - looks a little like #205. Nice that you are using the alpha0 version! Have you used this also to generate netherlands? That would be my first advice to try that out because alpha0 containes the changes from #208.

treee111 commented 1 year ago

well, I seam to be hanging on the creating .map files for tiles as well on Windows for a tile of mine interest. Will look into this but I am away for some days so it might take a while.

HJKLMN commented 1 year ago

Yes, I used this to generate Netherlands, and I agree looks like #205 (non beta version also gave me an error)

Specifically: python -m wahoomc cli -nbc -xy 131/84

treee111 commented 10 months ago

Hi @HJKLMN do you still have this problem? I got a new Windows notebook in the meantime where I don't have the setup actually. Would have to set it up to further tackle on this...

HJKLMN commented 10 months ago

treee

Waiting a repsonse I have nbot done any testing, neither did an update. So, sorry, I do not know

treee111 commented 10 months ago

treee

Waiting a repsonse I have nbot done any testing, neither did an update. So, sorry, I do not know

thanks for the reply. So I gonna setup wahooMapsCreator on my Windows machine and tryout for netherlands

HJKLMN commented 10 months ago

O, I did it with a linux system, if I remember correctly

alfh commented 10 months ago

@treee111 I am tempted to write a unit test for this tile generation, and the tile in Norway where I observed similar issues, and then run the test with the old version of the code, using the incorrect way of spawning command, and the updated code, which should not have any isses.

What do you think ?

I guess the main issue is that it would require the Netherlands and Norway osm files to be part of the unit test resources, at least if the test should be "enabled". It couild also be disabled, and only something a developer would enable if he has a local version of the two country OSM files.

There are also other unit testcases I consider writing, where it would be useful to have a larger country OSM file, like Norway. Any thoughts ?

alfh commented 10 months ago

The simplest manual test of just reverting the fix for #208 , and then trying to generate 131/84, did not make me reproduce that tile generation hanging, I tested on Linux. But I still think it was the same issue as in #208 .

treee111 commented 10 months ago

O, I did it with a linux system, if I remember correctly

ok, no worries. I run 131/84 on latest version on macOS. So please also tryout if the latest version does work for you. Installable via:

pip install wahoomc --upgrade

if it does not work, please call in verbose mode and post the log - thanks!

treee111 commented 10 months ago

@treee111 I am tempted to write a unit test for this tile generation, and the tile in Norway where I observed similar issues, and then run the test with the old version of the code, using the incorrect way of spawning command, and the updated code, which should not have any isses.

What do you think ?

unittests are always good. The more, the better.

For checking this particular issue I think running it manually should do the trick. One could run via the repo and checkout different tags or commits or via pypi installation older versions could also be installed.

I guess the main issue is that it would require the Netherlands and Norway osm files to be part of the unit test resources, at least if the test should be "enabled". It couild also be disabled, and only something a developer would enable if he has a local version of the two country OSM files.

There are also other unit testcases I consider writing, where it would be useful to have a larger country OSM file, like Norway. Any thoughts ?

To have a small repo for fast response and cloning I decided to use small countries having the .osm files in the repo and only land-poligons outside of the repo (this particular version is also backuped etc.). Using norway and/or netherlands both having 1,25GB would not suit into this anymore.

A compromise could be that we have two ways of accessing .osm files:

  1. the one implemented now where the .osm file is in the repo
  2. another way where we access the .osm file from the ~/wahooMapsCreatorData/_unittest similar to land-poligons.

Norway and netherlands would suit into 2. then. What do you think? Should I implement the casing/infrastructure for 2. and you can take on the unittest coding?

alfh commented 10 months ago

Your option 2 sounds like a good idea. Maybe tests using such files could then be tagged or disabled by default, do that one has to invoke these tests with an option, when one has these goods locally present?

I have also been wondering if you should make a subset of the land polygon shapefile, just covering enough of Europe for the tests, so that it could be checked in with a small file size ?

And then add some test with your option 2 with the complete land polygon file.

I also consider to add tests for Faroe Islands, as a country with coastline, and a small country with at least a handful of tiles, but with osm file at 50 MB, so it could be checked in.

Regards Alf

  1. nov. 2023, 23:01 kl. 23:01 skrev "Benjamin K." @.***>:

    @treee111 I am tempted to write a unit test for this tile generation, and the tile in Norway where I observed similar issues, and then run the test with the old version of the code, using the incorrect way of spawning command, and the updated code, which should not have any isses.

    What do you think ?

    unittests are always good. The more, the better.

    For checking this particular issue I think running it manually should do the trick. One could run via the repo and checkout different tags or commits or via pypi installation older versions could also be installed.

    I guess the main issue is that it would require the Netherlands and Norway osm files to be part of the unit test resources, at least if the test should be "enabled". It couild also be disabled, and only something a developer would enable if he has a local version of the two country OSM files.

    There are also other unit testcases I consider writing, where it would be useful to have a larger country OSM file, like Norway. Any thoughts ?

    To have a small repo for fast response and cloning I decided to use small countries having the .osm files in the repo and only land-poligons outside of the repo (this particular version is also backuped etc.). Using norway and/or netherlands both having 1,25GB would not suit into this anymore.

    A compromise could be that we have two ways of accessing .osm files:

    1. the one implemented now where the .osm file is in the repo
    2. another way where we access the .osm file from the ~/wahooMapsCreatorData/_unittest similar to land-poligons.

    Norway and netherlands would suit into 2. then. What do you think? Should I implement the casing/infrastructure for 2. and you can take on the unittest coding?

    -- Reply to this email directly or view it on GitHub: https://github.com/treee111/wahooMapsCreator/issues/214#issuecomment-1793565119 You are receiving this because you commented.

    Message ID: @.***>

treee111 commented 10 months ago

Thanks for the reply, I will have a look how this could be done with .osm files outside of the repo. I would leave land-poligons as-is, it is not worth the work for having a subset to be checked in (for only two people using unittests ;-)).

.osm file with 50MB sounds acceptable 👍 feel free to add the unittests & generated files, I will check against them on my Mac and create the Windows files. As for the relevant files, you can stick to the ones I have for malta etc.

treee111 commented 9 months ago

closing due to inactivity, please open a new issue if it still persists.