Verschlagwortet: ,

Betrachte 15 Beiträge - 61 bis 75 (von insgesamt 262)
  • Autor
  • #31706


    @juergenl: it seems that the source for this special-link is the ’node_id‘ in your program.
    For input-files directly coming from OSM (.pbf) this matches the OSM-Node-id (not sure about the actual term),
    for input-files from OpenAndroMaps this looks like a running number.

    PS: I saw you updated the program – Great!


    Bob gray

    Can you tell me how to setup environment for executing on windows?

    Install required packages: python3.7 git libsqlite3-mod-spatialite
    Install pipenv pip3 install pipenv
    clone this git repository git clone
    run pipenv update to download and install the necessary dependencies (pyosmium, pyspatialite and tdqm)
    run pipenv shell to activate the virtual environment

    Are these work on windows?
    I found sqlite spatiallite module for windows.

    but other work, I have no idea. I am very newbie about this
    Your advice would be very helpful.



    am using this program under Windows 10 and it’s working great!
    As you wrote you start it by:“run pipenv update“ and „run pipenv shell“ followed by „python …“ with the options shown here


    Bob gray

    Hi, mictie.

    I am working under windows 10 64bit and python 3.7.
    I downloaded mod-spatialite.dll file and copy it into system32 folder.
    and pip install spatialite. But when I command python, It comes error message.
    and It said osmium is required, but It couldn’t be installed on windows10.
    and pipenv not working.

    Can you tell me the detailed procedure you did?
    Thank you



    Hi Bob gray, to be honest I don’t remember the details how I installed spatialite.

    But I found a note, that I used the answer found here . („“)

    Hopefully it helps ….

    • Diese Antwort wurde vor vor 8 Monaten, 1 Woche von  mictie bearbeitet.
    • Diese Antwort wurde vor vor 8 Monaten, 1 Woche von  mictie bearbeitet.
    • Diese Antwort wurde vor vor 8 Monaten, 1 Woche von  mictie bearbeitet.


    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 -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

    • Diese Antwort wurde vor vor 8 Monaten, 1 Woche von  sadburai bearbeitet.

    Bob gray

    Thank you for kind and detail answer, sadburai.

    As your advice,
    1. I installed python 3.7
    2. pip install spatiallite, pipenv install spatialite —> success
    3. pip install osmium, pipenv install osmium —-> failed
    I run that commands at the path of poiconverter, but I met very much lines of error.
    e.g. C:\poiconverter\pip install osmium

    I’v been stuck in step3.



    If you start with the options necessary ( [-h] [-version] -if {pbf,poi} -om create,append} input_file output_file ) what error messages do you get?
    Please provide details (with line numbers)…
    I cannot find any reference to osmium in the code, so I wonder where this reference is coming from.
    I also don’t remember installing osmium, or seeing osmium related errors



    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 -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:

    pip list
    My console shows:

    pipenv run pip freeze
    My consoloe shows:

    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!



    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 -h
    python -if poi -om create bayern.poi bayernloc.db

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

    • Diese Antwort wurde vor vor 8 Monaten, 1 Woche von  sadburai bearbeitet.
    • Diese Antwort wurde vor vor 8 Monaten, 1 Woche von  sadburai bearbeitet.

    Bob gray

    Thank you again, sadburai,

    I barely setup 3 modules (osmium, spatialite, tqdm) with another computer.(windows7-64bit, python 3.7)
    and command under pipenv shell, I met error sadly.

    I heard that sqlite3.dll in python3 can’t manage spatialite, so I exchanged that with another dll from
    official site (
    and downloaded spatialite module DLL’s from and copy files to
    windows system32 folder.
    But error message was the same.
    (poiconverter-wS71GxY9) c:\poiconverter>pip freeze

    (poiconverter-wS71GxY9) c:\poiconverter>python -if poi -om creat
    e bayern.poi bayern.db
    Traceback (most recent call last):
    File „“, line 14, in <module>
    from poiconverter.fileimporter import FileImporter
    File „c:\poiconverter\poiconverter\“, line 1, in <module>
    import osmium
    File „C:\Users\okok\.virtualenvs\poiconverter-wS71GxY9\lib\site-packages\osmiu
    m\“, line 1, in <module>
    from osmium._osmium import *
    ImportError: DLL load failed:

    (poiconverter-wS71GxY9) c:\poiconverter>

    Can you tell me where to get sqlite3.dll compatible with ?

    Thank you very much for all help.



    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: =>

    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!


    Bob gray

    Hello, sadburai.
    It worked finally! I tried on windows10(x64) this time with your explanation and DLLs.
    (Maybe some of my windows7 environmet was wrong)
    The whole process went smoothly. It’s all thanks to you.
    But there is a strange thing
    I used bayern.poi file from github site, the number of added POIs was smaller than the number of entries.
    I think some POI’s format of original POI file is different from the others.
    I need study further.
    Thank you again. Have a good day.

    1 Teilnehmer(n) gefällt dieser Beitrag

    To all of you:

    Please try this poi file – its made with the POI-Writer V2:
    I have to switch to this writer cause the V1 poi_file specification is likely to be dropped in future

    The old V1 one is included in the zip-file of the map

    Please take a look at these threads too:

    Best regards



    Hallo ChristianK,
    hab das Poi-File convertiert und sehe keine Probleme.

    importer: <class ‚poiconverter.poiimporter.PoiImporter‘> Spain_Portugal.poi
    1240489 entries [09:15, 2234.87 entries/s]
    677135 POIs added to database in 558.92 sec!

Betrachte 15 Beiträge - 61 bis 75 (von insgesamt 262)

Sie müssen angemeldet sein, um zu diesem Thema eine Antwort verfassen zu können.