Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: Hiking Trails ab Zoom-Level 12? #33582

    sadburai
    Participant

    Ich habe eine andere Lösung gefunden und benutze Cartograph Pro mit Bildschirmskalierungsfaktor 0.5 und einem angepasstem Elevate Theme. Damit habe ich jetzt genügend Übersicht. Nicht 100%ig optimal, aber es funktioniert.

    • This reply was modified 2 months, 1 week ago by  sadburai.
    1 user thanked author for this post.
    in reply to: Hiking Trails ab Zoom-Level 12? #33485

    sadburai
    Participant

    Ich habe nochmal in die tagmapping-urban.xml reingeschaut, und jetzt auch gesehen, wieso die allermeisten Pfade/Wege erst ab ZL13 dargestellt werden können:

    <osm-tag key=”highway” value=”footway” zoom-appear=”13″/>
    <osm-tag key=”highway” value=”path” zoom-appear=”13″/>

    Es gibt aber auch Pfade/Wege mit SAC-Skala, die sich schon früher darstellen lassen. Ich nehme an, dass dies daran liegt, dass diese mit den Wanderrouten (also hknetwork iwn/nwn/rwn/lwn) verknüpft/vererbt sind, welche bereits ab ZL7-12 erscheinen. Erklärung dafür: siehe Zitat unten.

    <osm-tag key=“hknetwork“ value=“iwn“ zoom-appear=“7″/>
    <osm-tag key=“hknetwork“ value=“nwn“ zoom-appear=“8″/>
    <osm-tag key=“hknetwork“ value=“rwn“ zoom-appear=“12″/>
    <osm-tag key=“hknetwork“ value=“lwn“ zoom-appear=“12″/>
    <osm-tag key=“hknetwork“ value=“uwn“ zoom-appear=“12″/>

    The Tag-Mapping defines which tags are included in the maps and at which zoom-level they should appear on the map.
    Well, easy enough BUT:
    If you have an Objekt that includes tags appearing at different zoom-levels ALL tags within this objekt (way/node) appear at the zoom-level of the tag set to the lowest zoom-appear.
    EG: You have an area tagged as „industrial“ (zoom-appear 10) with an additional tag „caravan_site“ (zoom-appear 12) the caravan_site will appear at zoom level 10 if its bound to the object (a poly/closed way in this case).
    If the caravan_site is tagged as an extra node it will appear as set in the tag-mapping.

    ———————————–

    Leider gar nicht da Mapsforge die Auflösung der Routen-Relationen nicht beherrscht.
    Die Vererbung der Routen-Eigenschaften auf die Wege muss zu Fuss mit einem selbst erstellten Script erledigt werden das nicht frei verfügbar ist.

    LG, Christian

    Ich bin mir nicht sicher, ob ich das richtig verstehe. Mir würde es ausreichen, wenn ich eine .map Karte erstellen kann, welche nur die Wanderwege ab ZL11/12 enthält. Also nur die Wege (highway->path) mit der SAC-Skala darstellt, die mit Elevate in Blau/Rot/Schwarz und gestrichelt je nach Track-Visibility dargestellt werden.
    Das soll dann so aussehen wie in der linken Karte, natürlich ohne Höhenlinien und die braunen Tracks:
    Auf die internationalen/regionalen/lokalen Wanderrouten (also hknetwork) kann ich verzichten (siehe rechte Karte).
    trails

    Und um so eine Karte zu erstellen, reicht Tag-Mapping und Tag-Transform also nicht aus? Sondern ich muss mit eigenen Skripten herumbasteln? Oder brauche ich eigene Skripte nur, wenn ich auch die Wanderrouten einbauen möchte? Blicke da noch nicht ganz durch.

    • This reply was modified 2 months, 2 weeks ago by  sadburai.
    • This reply was modified 2 months, 2 weeks ago by  sadburai.
    Attachments:
    in reply to: POI: Nutzbarkeit der Dateien mit Locus #33447

    sadburai
    Participant

    Hi Bob,
    hmm I think I didn’t have this error and I don’t know what’s missing. I can only tell you which files I downloaded from my browser history.

    In this order:
    http://www.gaia-gis.it/gaia-sins/libspatialite-4.3.0a.zip
    https://www.sqlite.org/2019/sqlite-dll-win64-x64-3300100.zip
    http://www.gaia-gis.it/gaia-sins/windows-bin-NEXTGEN-amd64/mod_spatialite-NG-win-amd64.7z
    https://sourceforge.net/projects/cyqlite/files/latest/download => fossil-w64-2.4.zip

    I am not sure anymore exactly how I installed the files, but my guess is:
    – I actually didn’t use the libspatialite-4.3.0a files because afterwards I learned how to use pip to install packages
    – copied all the dll and exe files of mod_spatialite-NG-win-amd64.7z into system32
    – copied the sqlite.dll and fossil.exe files into system32
    – I deleted the sqlite3.dll in C:\Users\*username\AppData\Local\Programs\Python\Python37\DLLs\ [make a backup]

    You can try it on your own risk – again, I am a beginner as well without a clear understanding of the topic ;).
    So, I would maybe install these files in the same steps and after each step I would run the script again, to see if it solved the problem or whether new errors occur. Also it’s always a good idea to restart the computer from time to time.
    Good luck!

    in reply to: Hiking Trails ab Zoom-Level 12? #33422

    sadburai
    Participant

    Zur Zeit sind die meisten Wanderwege und Hütten erst ab Zoom-Level 13 sichtbar, dann wäre ja zumindest noch Luft nach oben bis ZL12 ;)
    Ansonsten schaue ich mal, ob es möglich wäre, einfach nur eine mapsforge Karte zu erstellen, welche ausschließlich Hiking-Trails und Hütten bei niedrigeren ZL enthält und diese dann als Overlay zu verwenden. Leider kann ich nicht abschätzen wie viel Arbeit das wäre. Wie könnte man das am Einfachsten machen?
    – mit Osmosis und Mapsforge map writer? Gibt es dafür irgendwo Tutorials?

    EDIT: wieso werden die Wanderwege eigentlich nicht ab ZL12 dargestellt?
    tagmapping-urban.xlm: (Zoom-Appear 12)
    <!– hiking_relations –>
    <osm-tag key=”hknetwork” value=”iwn” zoom-appear=”7″/>
    <osm-tag key=”hknetwork” value=”nwn” zoom-appear=”8″/>
    <osm-tag key=”hknetwork” value=”rwn” zoom-appear=”12″/>
    <osm-tag key=”hknetwork” value=”lwn” zoom-appear=”12″/>
    <osm-tag key=”hknetwork” value=”uwn” zoom-appear=”12″/>

    In meinem modifizierten Theme file steht: (Zoom min 10)
    <!– paths hiking –>
    <rule cat=”hike” e=”any” k=”*” v=”*” zoom-min=”10″>
    <rule e=”way” k=”trail_visibility” v=”excellent|good|~”>

    Trotzdem sehe ich nur die regionalen Wanderwege bei ZL12, welche zusätzlich als farbige Routen markiert sind. Die restlichen Wanderwege sind erst ab ZL13 sichtbar.

    • This reply was modified 2 months, 2 weeks ago by  sadburai.
    in reply to: POI: Nutzbarkeit der Dateien mit Locus #33416

    sadburai
    Participant

    Hi again: I think the problem might be that you need to install the required packages in the pipenv shell (virtual environment). If pipenv run pip freeze does not show the installed packages osmium, spatialite and tqdm you might want to try this:

    My folder poi_converter is in C:\users\*username\poi_converter
    1.) run cmd
    2.) cd poi_converter [It might be optional to change the directoryl]
    3.) pipenv shell
    4.) Install the following packages if they do not shows up when using pip freeze
    pip3 install spatialite
    pip3 install osmium
    pip3 install tqdm

    5.) Try to run the script, eg.:
    python poiconverter.py -h
    python poiconverter.py -if poi -om create bayern.poi bayernloc.db

    If any other problem shows up, there might be problems with your DLL files, etc.

    • This reply was modified 2 months, 2 weeks ago by  sadburai.
    • This reply was modified 2 months, 2 weeks ago by  sadburai.
    in reply to: POI: Nutzbarkeit der Dateien mit Locus #33414

    sadburai
    Participant

    Hi again: I checked again if my script works and it does, but only if I use the pipenv shell: The commands I use in CMD:

    pipenv shell
    python poiconverter.py -if poi -om create bayern.poi bayernloc.db

    If you still get errors check out if you have the packages installed: These commands are useful (see my results below):
    pip freeze
    pip list
    pipenv run pip freeze
    Other Useful commands:
    pipenv –help
    pip -help

    pip freeze
    My console shows:
    certifi==…
    pipenv==…
    virtualenv==…
    virtualenv-clone==…

    pip list
    My console shows:
    certifi
    pip
    pipenv
    setuptools
    virtualenv
    virtualenv-clone

    pipenv run pip freeze
    My consoloe shows:
    osmium==2.15.3
    spatialite==0.0.3
    tqdm==4.36.1

    The ‘command pipenv run pip freeze’ does the same as those commands following each other:
    pipenv shell
    pip freeze

    => (does your command path change when you use ‘pipenv shell’? e.g. mine changes from C:\users\… to (“*username-….”) C:\users\….

    So make sure that the packages osmium and spatialite are installed in your pipenv shell and run the python script from the pipenv shell console not from cmd console!

    in reply to: POI: Nutzbarkeit der Dateien mit Locus #33405

    sadburai
    Participant

    Hi, I also had a lot of trouble to get the script to work on Windows 10 yesterday, but it finally worked. However, I am not sure anymore in which steps I did it. I am also a noob with Python, so probably there is an easier way. It might be helpful if you tell us the exact error message.
    I had these errors:
    1. I couldn’t use ‘python’ or ‘pip’ commands with windows cmd
    2. missing module spatialite
    3. missing module osmium
    4. sqlite module rtree missing

    My workarounds:
    1. => make sure that you check the option to ‘set the directory/path` during insallation (not sure how it was called excatly). I couldn’t get the script to work with Python 3.8 but I am not sure if this is because I made mistakes during the installation, or if it only works with 3.7.
    2. => I downloaded the spatialite file and copied it to system 32. I also used ‘pip install spatialite’ ‘pipenv install spatialite’ and ‘pipenv shell’, then ‘pipenv install spatialite’ Not sure anymore what did the trick, but finally the error message that the module spatialite was missing disappeared
    3.=> Missing module osmium: I tried to use the commands ‘pip install osmium’ and ‘pipenv install osmium’ (<- also after using pipenv shell), but I think that I had error messages during the installation
    Probably I solved this by fixing a problem with the directory of my poi_converter files. I used the cmd commands like that::
    e.g. C:\user\*username\ pip install osmium
    But my poi_converter folder was in C:\user\*usernamel\poi_converter
    After I simply copied all the files from this folder directly into C:\user\Till\ it solved some of my problems and I think that was when installing osmium by using pip or pipenv finally worked.

    4.=> After some googling I found an sqlite3.dll that should have Rtree embedded. So I downloaded this and put it into the system32 folder. However it still said that the Sqlite module Rtree was missing. After I deleted the sqlite3.dll in
    C:\Users\*username\AppData\Local\Programs\Python\Python37\DLLs\ it FINALLY worked.

    To execute the script I used these commands:
    pipenv shell
    python poiconverter.py -if poi -om create bayern.poi bayernloc.db

    Probably there is a much more elegant way to solve these problems, but I am a total beginner as well. I found these workarounds after a lot of googling and Trial&Error and maybe they can help you as well, However it may be better to wait for advice by someone who actually knows what he is doing :P

    • This reply was modified 2 months, 2 weeks ago by  sadburai.
Viewing 7 posts - 1 through 7 (of 7 total)