Skip to content

Commit

Permalink
Merge pull request #30 from niwa/6-publish-v1-on-pypi
Browse files Browse the repository at this point in the history
6 publish geoapis on pypi
  • Loading branch information
rosepearson authored Jun 20, 2022
2 parents 8a290b4 + 602ff21 commit 87a9f55
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 54 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# geoapis

## Build Status

![Linux](https://github.com/niwa/geoapis/actions/workflows/linux-test.yml/badge.svg)

## Introduction
**_geoapis_** is a Python package for simply downloading publicly available web-hosted geo-spatial data. It currently supports downloading LiDAR data from OpenTopography, and vector data from the LINZ Data Service.

**_geoapis_** is a Python package for simply downloading publicly available web-hosted geo-spatial data. It currently supports downloading LiDAR data from OpenTopography, and vector data from the LINZ Data Service.
## Installation
**_geoapis_** is avaliable on [conda-forge](https://anaconda.org/conda-forge/geoapis) and [PyPI](https://pypi.org/project/geoapis/). Conda is recommended due to difficulties installing geopandas (a dependency) with pip on Windows. See the [Wiki Install Instructions](https://github.com/niwa/geoapis/wiki/Package-Install-Instructions) for more information.

### Wiki
For detailed instructions on installation, usage, and testing please check out the repo [wiki](https://github.com/niwa/geoapis/wiki).
## Documentation
Package API documentation is hosted at https://rosepearson.github.io/GeoFabrics/. Usage, installation and testing documentation can be found at the [GitHub Wiki](https://github.com/niwa/geoapis/wiki).

### Development
Please see the [issues](https://github.com/niwa/geoapis/issues) for details on coming features and additions to the software. Please also submit any requests for new functionality here.

## Contributions
### Contributions
There is no current expectations of contributions to this project. We accept input in code reviews now. If you would like to be involved in the project, please contact the maintainer.

## Contacts
### Contacts
Maintainer: Rose Pearson @rosepearson rose.pearson@niwa.co.nz

## License
Expand Down
36 changes: 35 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=61.0.0",
"wheel"
]
build-backend = "setuptools.build_meta"

[project]
name = "geoapis"
version = "0.2.8"
description = "A package for downloading geospatial data from web APIs."
readme = "README.md"
authors = [{ name = "Rose pearson", email = "rose.pearson@niwa.co.nz" }]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: GIS",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
keywords = ["APIs", "LiDAR", "point clouds", "vector", "Geospatial data"]
dependencies = [
"geopandas>=0.10",
"requests",
"boto3",
'tomli; python_version < "3.11"',
]
requires-python = ">=3.9"

[tool.setuptools]
packages = ["geoapis"]

[project.optional-dependencies]
dev = ["black", "python-dotenv", "pip-tools", "pytest"]

[project.urls]
Homepage = "https://github.com/niwa/geoapis"
Documentation = "https://github.com/niwa/geoapis/wiki"
3 changes: 0 additions & 3 deletions setup.cfg

This file was deleted.

37 changes: 0 additions & 37 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,7 @@
"""
import setuptools

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setuptools.setup(
name="geoapis",
author="Rose pearson",
author_email="rose.pearson@niwa.co.nz",
description="A package for downloading geospatial data from web APIs",
keywords="APIs, LiDAR, vector, Geospatial data",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/niwa/geoapis",
project_urls={
"Documentation": "https://github.com/niwa/geoapis",
"Bug Reports": "https://github.com/niwa/geoapis/issues",
"Source Code": "https://github.com/niwa/geoapis",
# 'Funding': '',
# 'Say Thanks!': '',
},
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
classifiers=[
# see https://pypi.org/classifiers/
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: GIS",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
install_requires=[
"geopandas>=0.9",
"requests>=2.25",
"boto3>=1.17",
"python-dotenv>=0.19",
],
extras_require={
"dev": ["check-manifest"],
},
)
2 changes: 1 addition & 1 deletion src/geoapis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
@author: pearsonra
"""
__version__ = "0.2.4"
__version__ = "0.2.8"
8 changes: 4 additions & 4 deletions src/geoapis/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def get_features_inside_catchment(
# the geometries
if (
shapely_geometry.geometryType() == "MultiPolygon"
and len(shapely_geometry) == 1
and len(shapely_geometry.geoms) == 1
):
shapely_geometry = shapely_geometry[0]
shapely_geometry = shapely_geometry.geoms[0]
features["geometry"].append(shapely_geometry)

# Add the value of each property in turn
Expand Down Expand Up @@ -268,9 +268,9 @@ def get_features(self, layer: int) -> geopandas.GeoDataFrame:
# geometries
if (
shapely_geometry.geometryType() == "MultiPolygon"
and len(shapely_geometry) == 1
and len(shapely_geometry.geoms) == 1
):
shapely_geometry = shapely_geometry[0]
shapely_geometry = shapely_geometry.geoms[0]
features["geometry"].append(shapely_geometry)

# Add the value of each property in turn
Expand Down

0 comments on commit 87a9f55

Please sign in to comment.