Skip to content

Commit

Permalink
v0.2 Export all tables from 3DNL database
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsdukai committed Jan 10, 2020
1 parent 66aee5f commit ad6ac8d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 21 deletions.
28 changes: 15 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ python:
cache:
- pip
- directories:
- $HOME/.pyenv
- "$HOME/.pyenv"
# Would be great to cache Postgres here but dir names with spaces are split into two and escaping doesn't work
# - "/c/Program\ Files/PostgreSQL"

Expand Down Expand Up @@ -58,7 +58,6 @@ jobs:

install:
- pip install -U tox-travis

script:
- tox

Expand All @@ -77,22 +76,25 @@ before_deploy:
rm $DISTPATH/$EXE_NAME.exe
;;
linux)
zip -r $EXE_PKG.zip $DISTPATH/$EXE_NAME
zip -rj $EXE_PKG.zip $DISTPATH/$EXE_NAME
rm $DISTPATH/$EXE_NAME
;;
esac
deploy:
- provider: releases
cleanup: false
token:
secure: nt4IH6uOIpATCz8BK15FCLMAXswJnnfJmRb6umP8NSB3J4zCIZPZ0p5k8jj9zXlcMCBpTDEONIhoN72DhRUXZ4jGruNfFAu+nHAsezKEjhm8i0lpqMkHrNjYmaTn5Wk+uXXKe5D1Dw9WwBgKvjkY/ADtS53fTusCS6LnmPLUkjPIKIJbRhVyShGexmc4V9J96atn93aETX2C+oShMxDnMHLABRrXaOuxJmXyjSfl3U9L+uf6mRCTUN9f0LS3XTUIgbDWTVa3nItFg+fQ1GYgNTFbCi7GhqKLEqm1VZ9ZgFv+yMFExWaDxtYXqPIr5AwwNl8PHQc+FmsZu0nzaYvmiZTddBqYivMu47wURGV07sY/jXcyi2hf9zswWxWS3oZmDYXK5h385V0v+0ZKVYj2Ux8w9s8XBQqE7nMbpFu/9PtVcm5A9vPw61ceuzTk9WMs7E91QUvvPujXg2Vl7FuvCoMtZlxODAgXiQ+Vr37TYVfxxOrXadzLRFNvkFVjHHr/uog8yiGszEZXi6mJER5cJpOyVqqaOm4r9LKSH556YpUckoqeODD2DjVAspBAzsklJWCHQAG758H+DnYaYLDzCKLFoCahY67m/e1VIGFhxdI1W3s7dMCrJDjID2H5MgqlArshyvXp50bKnDyKuU0FQ6A9nO3RFVi5xGAJBN8l5Ro=
file_glob: true
file: cjdb_*.zip
on:
repo: balazsdukai/cjio_dbexport
tags: true
edge: true
provider: releases
cleanup: false
token:
secure: opgpAT2e9UvvFc629R5kdZZEeateOc0NaZgg/bcanVeYOAxxL1jUpkl6izFCUrweA4a/Ot+b1LaBchrQ5vW7DdhzSV/lGqEhPbrWLaJxgpoD23+MwIrT90eLSimz1xcyGe+5f6xXfJqE4vMIYRjQFJMM77R1ACPfX4RBwGJzdUdKz1ZKZ5g/HPJd6bPYIrbczbE4VKGw9i2k2hG3SWrjzs/88llUYM9hgNVloZreyFM1xS3k/A6OettPFmzpYm6ziFAm+v7ua7BfDj9X5pZSXmnGbFPMwW9eFBAENADg4GMZVkdqK2152Z6/+zlTWGwlhauzD/SsTBq/504vh1fsbKeb2fendabYEbXE8UQjywwg1q7rje5YK0RiBgKJ2Mpt0JKsk1zpJ5O4ajsgO2YdVnRhEb0Zu8An5pKvuvJrHX4vtf15jWCWRHy9uZaUx+C819KqXj8sd08jkNdAUtcw1eMTfldVeyiFbAx/I03SK8LQ9PUbvc2vlO/st8m0Qq81vg3Hgl8uGp7BUfWGUUXt1VSNC8ieijnBX60BC4nGtRZ+lCjazPjIuDv3mfRjG5g+wWwPdCznV3QPaiG17y/yJNdYbEVNd3SjkRWQipGgXsplF7UHBrRJLLR0JA/qWxayNpdTbINcTl/SeypqdEXylYNDsvy8Qts3k5vIUuSMBIg=
file_glob: true
# Travis cannot expand paths from env. variables under Windows here
# (linux yes). So eg. $TRAVIS_BUILD_DIR/cjdb_*.zip leads to 'file not
# found' on Windows
file: cjdb_*.zip
on:
repo: cityjson/cjio_dbexport
tags: true
edge: true

notifications:
email: false
25 changes: 18 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,35 @@ MIT license
Install
-------

Requires Python 3.5+
The software does not have an installer but only an executable which you can
run directly in the command line. Head over to the `latest release
</~https://github.com/cityjson/cjio_dbexport/releases/latest>`_ and download
the executable for your platform.

Extract the archive (in Windows you'll need 7zip) and run the executable from
the command line.

Install for development
-----------------------

Requires Python 3.6+

The project is pre-alpha, please install directly from GitHub with pip:

.. code-block::
$ pip install -U --force-reinstall git+/~https://github.com/balazsdukai/cjio_dbexport@master
$ pip install -U --force-reinstall git+/~https://github.com/cityjson/cjio_dbexport@master
Usage
-----

Call the *cjio_dbexport* tool from the command line and pass it the configuration file.
Call the *cjdb* tool from the command line and pass it the configuration file.

.. code-block::
$ cjio_dbexport tests/data/test_config.yml --help
$ cjdb tests/data/test_config.yml --help
Usage: cjio_dbexport [OPTIONS] CONFIGURATION COMMAND [ARGS]...
Usage: cjdb [OPTIONS] CONFIGURATION COMMAND [ARGS]...
Export tool from PostGIS to CityJSON.
Expand Down Expand Up @@ -115,7 +126,7 @@ You can provide a bounding box (minx miny maxx maxy) to limit the extent of the

.. code-block::
$ cjio_dbexport tests/data/test_config.yml export --bbox 123.4 545.5 678.8 987.8 path/to/some/file.json
$ cjdb tests/data/test_config.yml export --bbox 123.4 545.5 678.8 987.8 path/to/some/file.json
Limitations
Expand All @@ -127,7 +138,7 @@ Limitations

+ Either export the whole database table, or subset with a bounding box

+ Only tested with Python 3.6, PostgresSQL 11, PostGIS 2.5
+ Only tested with PostgresSQL 11, PostGIS 2.5

+ CRS is hardcoded to 7415

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
description="Export tool from PostGIS to CityJSON",
entry_points={
'console_scripts': [
'cjio_dbexport=cjio_dbexport.cli:main',
'cjdb=cjio_dbexport.cli:main',
],
},
install_requires=requirements,
Expand Down

0 comments on commit ad6ac8d

Please sign in to comment.