{ "info": { "author": "Simon Norris", "author_email": "snorris@hillcrestgeo.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# fwakit\n\nPython/PostgreSQL tools for working with British Columbia's [Freshwater Atlas](https://www2.gov.bc.ca/gov/content/data/geographic-data-services/topographic-data/freshwater)\n\n## Requirements\n- Python 2.7+ (tested with 2.7.14, 3.6.4)\n- PostgreSQL/PostGIS (tested with 10.2/2.4.2)\n- GDAL (for loading data to PostgreSQL, tested with 2.2.3)\n\n## Installation\n\n`$ pip install fwakit`\n\n## Configuration\nCreate an environment variable `FWA_DB` and set it to the SQLAlchemy db url for your database. For example:\n\nMacOS/Linux etc:\n`export FWA_DB=postgresql://postgres:postgres@localhost:5432/fwadb`\n\nWindows:\n`SET FWA_DB=\"postgresql://postgres:postgres@localhost:5432/fwadb\"`\n\nFor more configuration, see `settings.py`.\n\n## Setup\n\nGet FWA data from GeoBC:\n\n`$ fwakit download`\n\nNote that the download may not work if you are behind a network proxy. If it fails, manually download and unzip the files of interest from [DataBC's ftp server](ftp://ftp.geobc.gov.bc.ca/sections/outgoing/bmgs/FWA_Public).\n\nCreate db, load FWA data, repair, index, and optimize:\n\n```\n$ fwakit create_db\n$ fwakit load\n$ fwakit clean\n```\n\nNote that because the tool downloads the entire set of FWA files to disk and then duplicates the data in postgres, ~20G or so of free disk space is required. If this is not available, run the load tool layer by layer or perhaps load the data directly from the ftp site using ogr2ogr and [GDAL VFS /vsicurl and /vsizip](http://www.gdal.org/gdal_virtual_file_systems.html)\n\n## Usage\n\n#### Use the Python module:\n\n```\nimport fwakit as fwa\n\nwsg = fwa.list_groups()\n\nfwa.reference_points('point_table', 'point_id', 'event_table', 10)\n\n```\n\n#### Use installed `fwa` prefixed functions directly in postgresql:\n\n```\nfwakit_test=# SELECT fwa_upstreamlength(354136754, 1200) / 1000 as downstream_km, fwa_downstreamlength(354136754, 1200) / 1000 as upstream_km;\n downstream_km | upstream_km\n-----------------+------------------\n 5.1829073255008 | 9.48098793830257\n(1 row)\n```\n\n#### Use `fwakit` command line interface for common tasks:\n\n```\n$ fwakit --help\nUsage: fwakit [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n clean Clean and index the data after load\n create_db Create a fresh database/schema\n download Download FWA gdb archives from GeoBC ftp\n dump Dump sample data to file\n load Load FWA data to PostgreSQL\n```\n\n#### Use data (created on load) for mapping and analysis, such as:\n\n- `whse_basemapping.fwa_named_streams` - named streams, simplified and merged\n- `whse_basemapping.fwa_watershed_groups_subdivided` - subdivided watershed groups, for much faster point in polygon queries\n\n\n## Credits\n- inspiration and code taken from [fiona](https://github.com/Toblerity/Fiona) and [osmnx](https://github.com/gboeing/osmnx)\n- many thanks to GeoBC and the Ministry of Environment for building, maintaining, and publishing the [Freshwater Atlas](https://www2.gov.bc.ca/gov/content/data/geographic-data-services/topographic-data/freshwater)\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/smnorris/fwakit", "keywords": "gis FWA \"Freshwater Atlas\" BC \"British Columbia\" streams watersheds", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fwakit", "package_url": "https://pypi.org/project/fwakit/", "platform": "", "project_url": "https://pypi.org/project/fwakit/", "project_urls": { "Homepage": "https://github.com/smnorris/fwakit" }, "release_url": "https://pypi.org/project/fwakit/0.0.2/", "requires_dist": [ "bcdata", "click", "geojson", "pgdata", "requests", "shapely", "sqlalchemy", "pytest ; extra == 'test'", "coverage ; extra == 'test'" ], "requires_python": "", "summary": "Python / PostgreSQL tools for working with BC Freshwater Atlas", "version": "0.0.2" }, "last_serial": 4696328, "releases": { "0.0.1a0": [ { "comment_text": "", "digests": { "md5": "eb7e6474534f656b85c8c9fdc51ba668", "sha256": "0eaff5212b36121a48f1f06d5c079795a3ba3a3abd725b604bf2c5fb81e66220" }, "downloads": -1, "filename": "fwakit-0.0.1a0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb7e6474534f656b85c8c9fdc51ba668", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25461, "upload_time": "2018-01-19T21:34:31", "url": "https://files.pythonhosted.org/packages/6c/81/bb9c5e674223254a01dd0f09fd76d16ec70b5dccbe6c2ca402672ee85789/fwakit-0.0.1a0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5596b37bbdbbb20885e4b3bbed0fe8b0", "sha256": "7917495fe4bc380a1f0c6a5b12cf638bc1ad447eb34670a7c27c1b38e85797b0" }, "downloads": -1, "filename": "fwakit-0.0.1a0.tar.gz", "has_sig": false, "md5_digest": "5596b37bbdbbb20885e4b3bbed0fe8b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18477, "upload_time": "2018-01-19T21:34:32", "url": "https://files.pythonhosted.org/packages/91/bb/497d2639d589c54570ea0ef09e198b76e33b155ece9b47a89b94aba8bc85/fwakit-0.0.1a0.tar.gz" } ], "0.0.1b0": [ { "comment_text": "", "digests": { "md5": "544e7ca33e7a398b40bc33362fd4a5fa", "sha256": "57671fb29b682d569b6e6a1e2b396e520ec744d4f873efae46aeba33aa3514d5" }, "downloads": -1, "filename": "fwakit-0.0.1b0-py3-none-any.whl", "has_sig": false, "md5_digest": "544e7ca33e7a398b40bc33362fd4a5fa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 65446, "upload_time": "2018-09-05T22:36:41", "url": "https://files.pythonhosted.org/packages/ba/67/6662fc0dd90a169d2043adc971fe1ae61381c7667b21fc5b6d8ce7aea2d2/fwakit-0.0.1b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b6168f2d32fec41014053e2bb93af356", "sha256": "ff1095dc68a6e6b76f4dc90676bf1c4f5520f8b5fd298bbb2db66e8547fb932f" }, "downloads": -1, "filename": "fwakit-0.0.1b0.tar.gz", "has_sig": false, "md5_digest": "b6168f2d32fec41014053e2bb93af356", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44286, "upload_time": "2018-09-05T22:36:43", "url": "https://files.pythonhosted.org/packages/5e/e5/00d89725e27521856c18ef8ceafe52dd5e6645fba79a52895a2be7f664ff/fwakit-0.0.1b0.tar.gz" } ], "0.0.1rc0": [ { "comment_text": "", "digests": { "md5": "4ecead702815e5ad42bb633c78c99198", "sha256": "978dda6e2243e0d6e9e4b6628f78b3621ef80b9e6bee063f1fc6bae46e7c84fd" }, "downloads": -1, "filename": "fwakit-0.0.1rc0-py3-none-any.whl", "has_sig": false, "md5_digest": "4ecead702815e5ad42bb633c78c99198", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 65443, "upload_time": "2018-09-10T04:44:27", "url": "https://files.pythonhosted.org/packages/a7/00/6f458ea823b17dd44718fa1064603401be7acad378d96797ea0d99871e58/fwakit-0.0.1rc0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "02434c57337d5211f7a8306e1fa2fc6b", "sha256": "da09985304a2e64c12a88fa6ae0688ee6283f3092a720485cc24a0807feab7b0" }, "downloads": -1, "filename": "fwakit-0.0.1rc0.tar.gz", "has_sig": false, "md5_digest": "02434c57337d5211f7a8306e1fa2fc6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44307, "upload_time": "2018-09-10T04:44:40", "url": "https://files.pythonhosted.org/packages/ef/b2/1791e12d12b8e97fe53d44511fecf64ac5ceacda77c911d05b0853fb87df/fwakit-0.0.1rc0.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0fb366c98166d8ccf3d3f30a05eae421", "sha256": "4d2e28ae91e0c7d1818fd7db9fe3eafdbb1ae4efef9af5cc9e0c43881d455b75" }, "downloads": -1, "filename": "fwakit-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0fb366c98166d8ccf3d3f30a05eae421", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 66841, "upload_time": "2019-01-14T22:21:41", "url": "https://files.pythonhosted.org/packages/a7/02/5610b99406e412f63a3b8ae3418ca850f0bdf4f51b6c8a35d34d62059539/fwakit-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "795e27169120d59e0ab5ce35d5489bc3", "sha256": "3c690e99def94e70a70b1a2a85e74f24ceb207f9a9ccc495e258787eda6688e3" }, "downloads": -1, "filename": "fwakit-0.0.2.tar.gz", "has_sig": false, "md5_digest": "795e27169120d59e0ab5ce35d5489bc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44818, "upload_time": "2019-01-14T22:21:45", "url": "https://files.pythonhosted.org/packages/fa/1c/aa5832c0687803a8bc29ed59db6950b38cfadbcd8820d4c1939acb5bcc84/fwakit-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0fb366c98166d8ccf3d3f30a05eae421", "sha256": "4d2e28ae91e0c7d1818fd7db9fe3eafdbb1ae4efef9af5cc9e0c43881d455b75" }, "downloads": -1, "filename": "fwakit-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0fb366c98166d8ccf3d3f30a05eae421", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 66841, "upload_time": "2019-01-14T22:21:41", "url": "https://files.pythonhosted.org/packages/a7/02/5610b99406e412f63a3b8ae3418ca850f0bdf4f51b6c8a35d34d62059539/fwakit-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "795e27169120d59e0ab5ce35d5489bc3", "sha256": "3c690e99def94e70a70b1a2a85e74f24ceb207f9a9ccc495e258787eda6688e3" }, "downloads": -1, "filename": "fwakit-0.0.2.tar.gz", "has_sig": false, "md5_digest": "795e27169120d59e0ab5ce35d5489bc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44818, "upload_time": "2019-01-14T22:21:45", "url": "https://files.pythonhosted.org/packages/fa/1c/aa5832c0687803a8bc29ed59db6950b38cfadbcd8820d4c1939acb5bcc84/fwakit-0.0.2.tar.gz" } ] }