Data Library GIS datasets
Project description
DLGIS -- Data Library GIS dataset support
Installation
-
Install conda with python 3.8.2 and gdal 3.0.x
-
Install Postgres with postgis
-
Install this package: pip install git+ssh://git@bitbucket.org/iridl/dlgis.git@master
Importing GIS datasets to Data Library
$ ./dlgis_import --help
Usage: dlgis_import [OPTIONS] SHAPE
Reads SHAPE files and produces SHAPE.sql, SHAPE.tex and SHAPE.log.
SHAPE.sql contains sql commands to create or re-create (if `--overwrite`
is on) the table specified with `--table`. If `--table` is not specified,
the table name is assumed to be the same as the shape name. The table
contains artificial primary key `gid`, SHAPE attributes, original shape
geometry `the_geom`, simplified (using tolerance factor `--tolerance`)
shape geometry `coarse_geom`, and `label` columns. SHAPE.tex contains
Ingrid code for corresponding Data Catalog Entry. If `--dbname` is
provided, SHAPE.sql will be applied to the database. Currently only ESRI
SHP format is supported (see `--format`). The SHAPE projection and
character encoding are determined automatically. If the program fails to
determine these parameters correctly, they can be overriden by `--srid`
and `--encoding`.
SHAPE - Path to input shape file
Example: dlgis_import -d iridb -w -D "Zambia Admin Level 2 (humdata.org)"
-l "adm0_en||'/'||adm1_en||'/'||adm2_en" shapes/zmb_admbnda_adm2_2020
Options:
-n, --table TEXT Table name [default: SHAPE's name]
-G, --grid_column TEXT Grid column [default: gid]
-l, --label TEXT Label expression [default: --grid_column]
-D, --descr TEXT Dataset description
-s, --srid TEXT Input projection [default: shape's projection]
-e, --encoding TEXT Input encoding [default: shape's encoding]
-O, --overwrite Overwrite table and/or output files if exist --
DANGER!!!
-t, --tolerance FLOAT Degree of shape simplification, e.g. 0.001, 0.01,...
-o, --output_dir PATH Output directory [default: SHAPE's directory]
-d, --dbname TEXT Database name (if specified, attempts to apply SQL)
-h, --host TEXT Database host [default: localhost]
-p, --port TEXT Database host [default: 5432]
-U, --username TEXT Database user [default: postgres]
-W, --password Prompt for database password
-w, --no-password Do not prompt for database password
-v, --verbose Verbose output
--version Show the version and exit.
--help Show this message and exit.
Exporting GIS datasets from Data Library
$ ./dlgis_export --help
Usage: dlgis_export [OPTIONS] SHAPE
Exports a set of shapes from a Postgres table in Data Library format into
SHAPE files.
SHAPE - Path to output shape files
Example: dlgis_export -d iridb -w shapes/zmb_admbnda_adm2_2020
Options:
-q, --query TEXT Table name or query or DL url [default: SHAPE's
name]
-O, --overwrite Overwrite output files if exist -- DANGER!!!
-c, --coarse Export coarse (simplified) version of the shape
-g, --geom_column TEXT Geometry column (overrides --coarse)
-Z, --dont-zip Do not zip shape files
-o, --output_dir PATH Output directory [default: SHAPE's directory]
-d, --dbname TEXT Database name [default: iridb]
-h, --host TEXT Database host [default: localhost]
-p, --port TEXT Database host [default: 5432]
-U, --username TEXT Database user [default: ingrid]
-W, --password Prompt for database password
-w, --no-password Do not prompt for database password
-v, --verbose Verbose output
--version Show the version and exit.
--help Show this message and exit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dlgis-0.1.0.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dlgis-0.1.0-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file dlgis-0.1.0.tar.gz.
File metadata
- Download URL: dlgis-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6aba5077cf7a3d47b0e4b159dbcd3af310f4dd4998c00779d5a32f27bb15b18
|
|
| MD5 |
8ec9c3286a417f090b9eec835605297e
|
|
| BLAKE2b-256 |
17a545f92bef0e2e6736970553f4794817e3cb5fb0f04389a0a66ab97ad79418
|
File details
Details for the file dlgis-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dlgis-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30dcf11f8293015a4f9051d3a0ac621945efdccd6573f9f90e0da4414eea2be1
|
|
| MD5 |
8cc67d2143206603f4d266c8002d3950
|
|
| BLAKE2b-256 |
9eb951eb5b72dea7e9e5a3e9ae7eb78311f7068eacc3c48192613cb58bf9ed17
|