{ "info": { "author": "Benjamin Pillot", "author_email": "benjaminpillot@riseup.net", "bugtrack_url": null, "classifiers": [], "description": "# GisTools\nSome geographical tools for python developers\n\n## Introduction\nGisTools is a small Python library for performing geographical computations. Typically, it gathers different tools from well-known libraries such as gdal, rasterio, geopandas, fiona and shapely.\nIt allows easily mixing operations between vectors and raster maps (multi-band raster are not supported at the moment).\n\n## Basic operations\nGisTools allows some of the following operations:\n- [x] Fast polygon intersection and split\n- [x] Polygon partition based on graph theory (requires [METIS](http://glaros.dtc.umn.edu/gkhome/metis/metis/download) package)\n- [x] Basic networking (shortest path)\n- [x] Downloading DEM from online databases\n- [x] Extract raster statistics with respect to vector layers (polygon/line)\n- [x] Raster to/from polygons conversion \n- [x] Compute horizon obstruction from DEM\n\n\n## Requirements\nSee ``requirements.txt``.\n\n\n## Install\nPip installation should normally take care of everything for you.\n\n### Using PIP\n\nThe easiest way to install GisTools is using ``pip`` in a terminal\n```\n$ pip install gis-tools\n```\n\n\n## Examples\n\n### Example 1\n\nUse ``DigitalElevationModel``, ``PolygonLayer`` and ``ZonalStatistics`` classes to retrieve average slope within each polygon of a shapefile\n```\n>>> dem = gistools.raster.DigitalElevationModel(\"path/to/dem.tif\")\n>>> slope = dem.compute_slope()\n>>> layer = gistools.layer.PolygonLayer(\"path/to/layer.shp\")\n>>> zonal_stat = gistools.stats.ZonalStatistics(slope, layer, is_surface_weighted=False, all_touched=True)\n>>> average = zonal_stat.mean()\n```\n\n### Example 2\n\nExtract polygons from contour values in raster\n```\n>>> from gistools.raster import RasterMap\n>>> raster = RasterMap(\"path/to/raster.tif\", no_data_value=-9999)\n>>> layer = raster.contour(0.04, False).polygonize(\"attribute name\").to_crs(epsg=4326)\n```\n\n### Example 3\n\nBuild DEM tile by downloading from CGIAR website and save to file\n```\n>>> from gistools import DigitalElevationModel\n>>> dem = DigitalElevationModel.from_cgiar_online_database((8, 38, 14, 42))\n>>> dem.to_file(\"path/to/dem.tif\")\n```\n\n### Example 4\n\nSplit a polygon layer into sub-polygons of equal area with respect to \nhoneycomb mesh (requires [METIS](http://glaros.dtc.umn.edu/gkhome/metis/metis/download) package)\n```\n>>> polygon_layer = gistools.layer.PolygonLayer(\"path/to/layer.geojson\")\n>>> new_partitioned_layer = polygon_layer.partition(threshold=2000, disaggregation_factor=20, \n split_method=\"hexana\", contig=True)\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/benjaminpillot/gis-tools", "keywords": "", "license": "GNU GPL v3.0", "maintainer": "", "maintainer_email": "", "name": "gis-tools", "package_url": "https://pypi.org/project/gis-tools/", "platform": "", "project_url": "https://pypi.org/project/gis-tools/", "project_urls": { "Homepage": "http://github.com/benjaminpillot/gis-tools" }, "release_url": "https://pypi.org/project/gis-tools/0.15.91/", "requires_dist": null, "requires_python": ">=3", "summary": "Some geographical tools for Python developers", "version": "0.15.91" }, "last_serial": 5895932, "releases": { "0.15.91": [ { "comment_text": "", "digests": { "md5": "05bcc2bd2275249d3bb80120017ed028", "sha256": "886c9a754eff029c12d6011f430688595cc56548ad2ea0871192b99749fda35b" }, "downloads": -1, "filename": "gis_tools-0.15.91.tar.gz", "has_sig": false, "md5_digest": "05bcc2bd2275249d3bb80120017ed028", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 54225, "upload_time": "2019-09-27T12:49:24", "url": "https://files.pythonhosted.org/packages/70/66/4ff2592466346555da8fdd8afdd53a83ef2694af2d81d9e1d8b09966d5bf/gis_tools-0.15.91.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "05bcc2bd2275249d3bb80120017ed028", "sha256": "886c9a754eff029c12d6011f430688595cc56548ad2ea0871192b99749fda35b" }, "downloads": -1, "filename": "gis_tools-0.15.91.tar.gz", "has_sig": false, "md5_digest": "05bcc2bd2275249d3bb80120017ed028", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 54225, "upload_time": "2019-09-27T12:49:24", "url": "https://files.pythonhosted.org/packages/70/66/4ff2592466346555da8fdd8afdd53a83ef2694af2d81d9e1d8b09966d5bf/gis_tools-0.15.91.tar.gz" } ] }