Skip to content

CodeforSusono/web_gpx2geojson

Repository files navigation

web_gpx2geojson

web version of gpx2geojson (https://github.com/CodeforSusono/umap_geojson.git)

web site image

site_image

how to use

  1. Prepare python virtual environment
    $ python -V
    PYthon 3.10.5
    $ python -m venv venv3105
    $ source venv3105/bin/activate
    (venv3105) $ pip list
    Package    Version
    ---------- -------
    pip        22.0.4
    setuptools 58.1.0
    WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    (venv3105) $ python -m pip install --upgrade pip
    Requirement already satisfied: pip in ./venv3105/lib/python3.10/site-packages (22.0.4)
    Collecting pip
      Downloading pip-23.0.1-py3-none-any.whl (2.1 MB)
        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 8.4 MB/s eta 0:00:00
    Installing collected packages: pip
      Attempting uninstall: pip
        Found existing installation: pip 22.0.4
        Uninstalling pip-22.0.4:
          Successfully uninstalled pip-22.0.4
    Successfully installed pip-23.0.1
    (venv3105) $ pip install -r requirements.txt
     (省略)
    (venv3105) $
    
  2. Test view.py
    $ UPLOAD_DIR ./data python view.py
    * Serving Flask app 'view'
    * Debug mode: on
    WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    * Running on http://127.0.0.1:5000
    Press CTRL+C to quit
    * Restarting with stat
    * Debugger is active!
    * Debugger PIN: 755-989-183
    127.0.0.1 - - [05/Mar/2023 11:58:03] "GET / HTTP/1.1" 200 -
    127.0.0.1 - - [05/Mar/2023 11:58:03] "GET /static/style.css HTTP/1.1" 304 -
    127.0.0.1 - - [05/Mar/2023 11:58:03] "GET /static/map_pin.png HTTP/1.1" 304 -
    127.0.0.1 - - [05/Mar/2023 11:58:03] "GET /static/icon.png HTTP/1.1" 304 -
    
  3. Input gpx file アップロードするgpxファイルを指定
  4. Geojson file is downloaded 処理結果のgeojsonファイルがダウンロードされる
  5. Run gunicorn
    $ UPLOAD_DIR=./data gunicorn view:app
    [2023-03-05 13:11:49 +0900] [2541] [INFO] Starting gunicorn 20.1.0
    [2023-03-05 13:11:49 +0900] [2541] [INFO] Listening at: http://127.0.0.1:8000 (2541)
    [2023-03-05 13:11:49 +0900] [2541] [INFO] Using worker: sync
    [2023-03-05 13:11:49 +0900] [2542] [INFO] Booting worker with pid: 2542
    

About

web versin of gpx2geojson

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •