Package |
Description |
|---|---|
Access NWIS, HCDN 2009, NLCD, and SSEBop databases |
|
Query data from any ArcGIS RESTful-, WMS-, and WFS-based services |
|
Convert responses from PyGeoOGC’s supported web services to datasets |
|
Access NLDI and WaterData web services for navigating the NHDPlus database |
|
Access topographic data through the 3D Elevation Program (3DEP) web service |
|
Access the Daymet database for daily climate data |
PyGeoUtils: Manipulate (Geo)JSON and (Geo)TIFF data
🚨 This package is under heavy development and breaking changes are likely to happen. 🚨
Features
PyGeoUtils is a part of Hydrodata software stack and provides utilities for manipulating (Geo)JSON and (Geo)TIFF data. These utilities are:
json2geodf: For converting (Geo)JSON objects to GroPandas dataframe.
arcgis2geojson: For converting ESRIGeoJSON objects to standard GeoJSON format.
gtiff2xarray: For converting (Geo)TIFF objects to xarray datasets.
xarray_geomask: For masking a xarray.Dataset or xarray.DataArray using a polygon.
All these function handle all necessary CRS transformations. Moreover, requests for additional functionalities can be submitted via issue tracker.
Installation
You can install PyGeoUtils using pip after installing libgdal on your system (for example, in Ubuntu run sudo apt install libgdal-dev):
$ pip install pygeoutils
Alternatively, PyGeoUtils can be installed from the conda-forge repository using Conda:
$ conda install -c conda-forge pygeoutils
Quick start
To demonstrate capabilities of PyGeoUtils lets use PyGeoOGC to access National Wetlands Inventory from WMS, and FEMA National Flood Hazard via WFS, then convert the output to GeoDataFrame and xarray.Dataset using PyGeoUtils.
import pygeoutils as geoutils
from pygeoogc import WFS, WMS
from shapely.geometry import Polygon
geometry = Polygon(
[
[-118.72, 34.118],
[-118.31, 34.118],
[-118.31, 34.518],
[-118.72, 34.518],
[-118.72, 34.118],
]
)
url_wms = "https://www.fws.gov/wetlands/arcgis/services/Wetlands_Raster/ImageServer/WMSServer"
wms = WMS(
url_wms,
layers="0",
outformat="image/tiff",
crs="epsg:3857",
)
r_dict = wms.getmap_bybox(
geometry.bounds,
1e3,
box_crs="epsg:4326",
)
wetlands = geoutils.gtiff2xarray(r_dict, geometry, "epsg:4326")
url_wfs = "https://hazards.fema.gov/gis/nfhl/services/public/NFHL/MapServer/WFSServer"
wfs = WFS(
url_wfs,
layer="public_NFHL:Base_Flood_Elevations",
outformat="esrigeojson",
crs="epsg:4269",
)
r = wfs.getfeature_bybox(geometry.bounds, box_crs="epsg:4326")
flood = geoutils.json2geodf(r.json(), "epsg:4269", "epsg:4326")
Contributing
Contributions are very welcomed. Please read CONTRIBUTING.rst file for instructions.
Metadata
Release files for pygeoutils 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pygeoutils-0.1.10.tar.gz | 23.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygeoutils-0.1.10-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 35.4 kB
Release files / pygeoutils-0.1.10.tar.gz
| Download URL | pygeoutils-0.1.10.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2447e531e5cd416824894c78f2becd3ed0a85fcef1231813de4f34ce596e1f68
|
|
BLAKE2b-256 checksum How to use checksums |
7c7aeca1cdc879127ab6511996955d222aca0b2cace5fb640b3adf93229eaee2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Release files / pygeoutils-0.1.10-py2.py3-none-any.whl
| Download URL | pygeoutils-0.1.10-py2.py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
439eeba5e1e9b9ce869e47fde71add878a433abb6f38c10b6208737d029931f8
|
|
BLAKE2b-256 checksum How to use checksums |
f351bcdbf70ea5cd2b6fad370d5a4127716cfd56cdc281ec8fa59db71e47d098
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
|
Security for pygeoutils 0.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.