Skip to main content

🐰 批量导入 geojson shpfile 到 postgresql

Project description

💿 批量导入 geojson (shpfile todo) 到 postgresql

Params:

  • db_config: { "DB_USER": "" "DB_PASSWORD": "" "DB_HOST": "" "DB_PORT": "" "DB_NAME": "" }

  • static_path: 相对路径

  • if_exists: 'fail' | 'replace' | 'append', geopandas 中的参数

:rocket: 简单 Demo

from geodata2pg import main

if __name__ == '__main__':
    db_config = {
        "DB_USER": "postgres",
        "DB_PASSWORD": "1973",
        "DB_HOST": "localhost",
        "DB_PORT": "5433",
        "DB_NAME": "mapbox-api"
    }

    path = './static'

    main(db_config, path, 'replace')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geodata2pg-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geodata2pg-0.1.0-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file geodata2pg-0.1.0.tar.gz.

File metadata

  • Download URL: geodata2pg-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for geodata2pg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b8ba8fcc5dc89f45cc045726cde61329ab55324648107f63661fc746180dfa0
MD5 fd107008ec45964f8e23acbcf635006f
BLAKE2b-256 f55226642bbd94bbbe6a1105db971f1c0a48422a3c203627611c656bcc7e61d0

See more details on using hashes here.

File details

Details for the file geodata2pg-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: geodata2pg-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for geodata2pg-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cd61b46e2e54a41175255d3f6be7d9006c25de3873441bf639f9d6fa027fabad
MD5 74687765da02b74ae0d1f0144e602c60
BLAKE2b-256 41c37b457a3d9e2c5d8cb7055e56d955aa94f28c49c770d7a4c4dfd67d5956f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page