Name | pygeoif JSON |
Version |
1.5.1
JSON |
| download |
home_page | None |
Summary | A basic implementation of the __geo_interface__ |
upload_time | 2024-12-05 20:47:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | LGPL |
keywords |
gis
hypothesis
spatial
wkt
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Introduction
============
.. inclusion-marker-do-not-remove
PyGeoIf provides a `GeoJSON-like protocol <https://gist.github.com/2217756>`_
for geo-spatial (GIS) vector data.
Other Python programs and packages that you may have heard of that
implement this protocol:
* `ArcPy <https://www.esri.com/about/newsroom/arcuser/geojson/>`_
* `descartes <https://docs.descarteslabs.com/>`_
* `PySAL <http://pysal.geodacenter.org/>`_
* `Shapely <https://github.com/Toblerity/Shapely>`_
* `pyshp <https://pypi.python.org/pypi/pyshp>`_
* `GeoPandas <https://geopandas.org/>`_
* `Karta <https://github.com/fortyninemaps/karta>`_
* `mapnik <https://github.com/mapnik/mapnik>`_
When you want to write your own geospatial library with support
for this protocol you may use pygeoif as a starting point and build
your functionality on top of it. It has no requirements outside the
Python standard library and is therefore easy to integrate into your
project. It is tested on `CPython <https://python.org>`_ and
`PyPy <https://www.pypy.org/>`_, but it should work on alternative
Python implementations (that implement the language specification *>=3.8*) as well.
You may think of pygeoif as a 'shapely ultralight' which lets you
construct geometries and perform **very** basic operations like
reading and writing geometries from/to WKT, constructing line strings
out of points, polygons from linear rings, multi polygons from
polygons, etc. It was inspired by shapely and implements the
geometries in a way that when you are familiar with pygeoif,
you will feel right at home with shapely or the other way round.
It provides Hypothesis strategies for all geometries for property based
testing with Hypothesis_.
It was written to provide clean and python only geometries for fastkml_
|doc| |test| |cov| |hypothesis| |black| |mypy| |openhub| |factor| |commit| |py| |implement| |latest| |conda| |license| |downloads|
.. |doc| image:: https://readthedocs.org/projects/pygeoif/badge/?version=latest
:target: https://pygeoif.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
.. |test| image:: https://github.com/cleder/pygeoif/actions/workflows/run-all-tests.yml/badge.svg?branch=main
:target: https://github.com/cleder/pygeoif/actions/workflows/run-all-tests.yml
:alt: GitHub Actions
.. |cov| image:: https://codecov.io/gh/cleder/pygeoif/branch/main/graph/badge.svg?token=2EfiwBXs9X
:target: https://codecov.io/gh/cleder/pygeoif
:alt: Codecov
.. |hypothesis| image:: https://img.shields.io/badge/hypothesis-tested-brightgreen.svg
:alt: Tested with Hypothesis
:target: https://hypothesis.readthedocs.io
.. |black| image:: https://img.shields.io/badge/code_style-black-000000.svg
:target: https://github.com/psf/
:alt: Black
.. |mypy| image:: https://img.shields.io/badge/type_checker-mypy-blue
:target: http://mypy-lang.org/
:alt: Mypy
.. |openhub| image:: https://www.openhub.net/p/pygeoif/widgets/project_thin_badge.gif
:target: https://www.openhub.net/p/pygeoif/
:alt: Openhub
.. |factor| image:: https://www.codefactor.io/repository/github/cleder/pygeoif/badge/main
:target: https://www.codefactor.io/repository/github/cleder/pygeoif/overview/main
:alt: CodeFactor
.. |commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit
.. |py| image:: https://img.shields.io/pypi/pyversions/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
:alt: Supported Python versions
.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/pygeoif.svg
:target: https://anaconda.org/conda-forge/pygeoif
:alt: Conda Version
.. |implement| image:: https://img.shields.io/pypi/implementation/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
:alt: Supported Python implementations
.. |latest| image:: https://img.shields.io/pypi/v/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
:alt: Latest Version
.. |license| image:: https://img.shields.io/pypi/l/pygeoif.svg
:target: https://pypi.python.org/pypi/pygeoif/
:alt: License
.. |downloads| image:: https://img.shields.io/pypi/dm/pygeoif.svg
:target: https://www.pepy.tech/projects/pygeoif
:alt: Downloads
Installation
------------
You can install PyGeoIf from pypi using pip::
pip install pygeoif
Example
========
.. code-block:: pycon
>>> from pygeoif import geometry
>>> p = geometry.Point(1,1)
>>> p.__geo_interface__
{'type': 'Point', 'bbox': (1, 1, 1, 1), 'coordinates': (1, 1)}
>>> print(p)
POINT (1 1)
>>> p
Point(1, 1)
>>> l = geometry.LineString([(0.0, 0.0), (1.0, 1.0)])
>>> l.bounds
(0.0, 0.0, 1.0, 1.0)
>>> print(l)
LINESTRING (0.0 0.0, 1.0 1.0)
You find more examples in the
`tests <https://github.com/cleder/pygeoif/tree/main/tests>`_
directory which cover every aspect of pygeoif or in fastkml_.
Classes
========
All classes implement the attribute:
* ``__geo_interface__``: as discussed above, an interface to GeoJSON_.
All geometry classes implement the attributes:
* ``geom_type``: Returns a string specifying the Geometry Type of the object
* ``bounds``: Returns a (minx, miny, maxx, maxy) tuple that bounds the object.
* ``wkt``: Returns the 'Well Known Text' representation of the object
For two-dimensional geometries the following methods are implemented:
* ``convex_hull``: Returns a representation of the smallest convex Polygon containing
all the points in the object unless the number of points in the object is less than three.
For two points, the convex hull collapses to a LineString; for 1, a Point.
For three dimensional objects only their projection in the xy plane is taken into consideration.
Empty objects without coordinates return ``None`` for the convex_hull.
Point
-----
A zero dimensional geometry
A point has zero length and zero area. A point cannot be empty.
Attributes
~~~~~~~~~~~
x, y, z : float
Coordinate values
Example
~~~~~~~~
.. code-block: pycon
>>> from pygeoif import Point
>>> p = Point(1.0, -1.0)
>>> print(p)
POINT (1.0 -1.0)
>>> p.y
-1.0
>>> p.x
1.0
LineString
-----------
A one-dimensional figure comprising one or more line segments
A LineString has non-zero length and zero area. It may approximate a curve
and need not be straight. Unlike a LinearRing, a LineString is not closed.
Attributes
~~~~~~~~~~~
geoms : sequence
A sequence of Points
LinearRing
-----------
A closed one-dimensional geometry comprising one or more line segments
A LinearRing that crosses itself or touches itself at a single point is
invalid and operations on it may fail.
A LinearRing is self closing.
Polygon
--------
A two-dimensional figure bounded by a linear ring
A polygon has a non-zero area. It may have one or more negative-space
"holes" which are also bounded by linear rings. If any rings cross each
other, the geometry is invalid and operations on it may fail.
Attributes
~~~~~~~~~~~
exterior : LinearRing
The ring which bounds the positive space of the polygon.
interiors : sequence
A sequence of rings which bound all existing holes.
MultiPoint
----------
A collection of one or more points.
Attributes
~~~~~~~~~~~
geoms : sequence
A sequence of Points.
MultiLineString
----------------
A collection of one or more line strings.
A MultiLineString has non-zero length and zero area.
Attributes
~~~~~~~~~~~
geoms : sequence
A sequence of LineStrings
MultiPolygon
-------------
A collection of one or more polygons.
Attributes
~~~~~~~~~~~~~
geoms : sequence
A sequence of `Polygon` instances
GeometryCollection
-------------------
A heterogenous collection of geometries (Points, LineStrings, LinearRings
and Polygons).
Attributes
~~~~~~~~~~~
geoms : sequence
A sequence of geometry instances
Please note:
``GEOMETRYCOLLECTION`` isn't supported by the Shapefile or GeoJSON_ format.
And this sub-class isn't generally supported by ordinary GIS sw (viewers and so on).
So it's very rarely used in the real GIS professional world.
Example
~~~~~~~~
.. code-block:: pycon
>>> from pygeoif import geometry
>>> p = geometry.Point(1.0, -1.0)
>>> p2 = geometry.Point(1.0, -1.0)
>>> geoms = [p, p2]
>>> c = geometry.GeometryCollection(geoms)
>>> [geom for geom in geoms]
[Point(1.0, -1.0), Point(1.0, -1.0)]
Feature
-------
Aggregates a geometry instance with associated user-defined properties.
Attributes
~~~~~~~~~~~
geometry : object
A geometry instance
properties : dict
A dictionary linking field keys with values associated with with geometry instance
Example
~~~~~~~~
.. code-block:: pycon
>>> from pygeoif import Point, Feature
>>> p = Point(1.0, -1.0)
>>> props = {'Name': 'Sample Point', 'Other': 'Other Data'}
>>> a = Feature(p, props)
>>> a.properties
{'Name': 'Sample Point', 'Other': 'Other Data'}
>>> a.properties['Name']
'Sample Point'
FeatureCollection
-----------------
A heterogenous collection of Features
Attributes
~~~~~~~~~~~
features: sequence
A sequence of feature instances
Example
~~~~~~~~
.. code-block:: pycon
>>> from pygeoif import Point, Feature, FeatureCollection
>>> p = Point(1.0, -1.0)
>>> props = {'Name': 'Sample Point', 'Other': 'Other Data'}
>>> a = Feature(p, props)
>>> p2 = Point(1.0, -1.0)
>>> props2 = {'Name': 'Sample Point2', 'Other': 'Other Data2'}
>>> b = Feature(p2, props2)
>>> features = [a, b]
>>> c = FeatureCollection(features)
>>> [feature for feature in c]
[Feature(Point(1.0, -1.0), {'Name': 'Sample Point', 'Other': 'Other Data'},...]
Functions
=========
shape
--------
Create a pygeoif feature from an object that provides the ``__geo_interface__``
or any GeoJSON_ compatible dictionary.
.. code-block:: pycon
>>> from shapely.geometry import Point
>>> from pygeoif import geometry, shape
>>> shape(Point(0,0))
Point(0.0, 0.0)
from_wkt
---------
Create a geometry from its WKT representation
.. code-block:: pycon
>>> from pygeoif import from_wkt
>>> p = from_wkt('POINT (0 1)')
>>> print(p)
POINT (0.0 1.0)
signed_area
------------
Return the signed area enclosed by a ring.
A value >= 0 indicates a counter-clockwise oriented ring.
orient
-------
Returns a copy of a polygon with exteriors and interiors in the right orientation.
if ccw is True than the exterior will be in counterclockwise orientation
and the interiors will be in clockwise orientation, or
the other way round when ccw is False.
box
---
Return a rectangular polygon with configurable normal vector.
mapping
-------
Return the ``__geo_interface__`` dictionary.
Development
===========
Clone this repository, create a virtualenv with Python 3.8 or later with
``python3 -m venv .venv`` and activate it with ``source .venv/bin/activate``.
Then install the requirements with ``pip install -e ".[dev]"``.
pre-commit
----------
Install the ``pre-commit`` hook with::
pip install pre-commit
pre-commit install
and check the code with::
pre-commit run --all-files
Testing
-------
Run the unit and static tests with::
pytest tests
pytest --doctest-glob="README.rst"
black pygeoif
ruff pygeoif
flake8 pygeoif
mypy pygeoif
Acknowledgments
================
The tests were improved with mutmut_ which discovered some nasty edge cases.
.. _mutmut: https://github.com/boxed/mutmut
.. _GeoJSON: https://geojson.org/
.. _fastkml: http://pypi.python.org/pypi/fastkml/
.. _Hypothesis: https://hypothesis.works
Raw data
{
"_id": null,
"home_page": null,
"name": "pygeoif",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "GIS, Hypothesis, Spatial, WKT",
"author": null,
"author_email": "Christian Ledermann <christian.ledermann@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/be/2e/9f2e369b293e84acabd34df5cc189ac519d7c1bebfd56f5b3ca5bfe1a57b/pygeoif-1.5.1.tar.gz",
"platform": null,
"description": "Introduction\n============\n\n.. inclusion-marker-do-not-remove\n\nPyGeoIf provides a `GeoJSON-like protocol <https://gist.github.com/2217756>`_\nfor geo-spatial (GIS) vector data.\n\nOther Python programs and packages that you may have heard of that\nimplement this protocol:\n\n* `ArcPy <https://www.esri.com/about/newsroom/arcuser/geojson/>`_\n* `descartes <https://docs.descarteslabs.com/>`_\n* `PySAL <http://pysal.geodacenter.org/>`_\n* `Shapely <https://github.com/Toblerity/Shapely>`_\n* `pyshp <https://pypi.python.org/pypi/pyshp>`_\n* `GeoPandas <https://geopandas.org/>`_\n* `Karta <https://github.com/fortyninemaps/karta>`_\n* `mapnik <https://github.com/mapnik/mapnik>`_\n\nWhen you want to write your own geospatial library with support\nfor this protocol you may use pygeoif as a starting point and build\nyour functionality on top of it. It has no requirements outside the\nPython standard library and is therefore easy to integrate into your\nproject. It is tested on `CPython <https://python.org>`_ and\n`PyPy <https://www.pypy.org/>`_, but it should work on alternative\nPython implementations (that implement the language specification *>=3.8*) as well.\n\nYou may think of pygeoif as a 'shapely ultralight' which lets you\nconstruct geometries and perform **very** basic operations like\nreading and writing geometries from/to WKT, constructing line strings\nout of points, polygons from linear rings, multi polygons from\npolygons, etc. It was inspired by shapely and implements the\ngeometries in a way that when you are familiar with pygeoif,\nyou will feel right at home with shapely or the other way round.\nIt provides Hypothesis strategies for all geometries for property based\ntesting with Hypothesis_.\n\nIt was written to provide clean and python only geometries for fastkml_\n\n|doc| |test| |cov| |hypothesis| |black| |mypy| |openhub| |factor| |commit| |py| |implement| |latest| |conda| |license| |downloads|\n\n.. |doc| image:: https://readthedocs.org/projects/pygeoif/badge/?version=latest\n :target: https://pygeoif.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation\n\n.. |test| image:: https://github.com/cleder/pygeoif/actions/workflows/run-all-tests.yml/badge.svg?branch=main\n :target: https://github.com/cleder/pygeoif/actions/workflows/run-all-tests.yml\n :alt: GitHub Actions\n\n.. |cov| image:: https://codecov.io/gh/cleder/pygeoif/branch/main/graph/badge.svg?token=2EfiwBXs9X\n :target: https://codecov.io/gh/cleder/pygeoif\n :alt: Codecov\n\n.. |hypothesis| image:: https://img.shields.io/badge/hypothesis-tested-brightgreen.svg\n :alt: Tested with Hypothesis\n :target: https://hypothesis.readthedocs.io\n\n.. |black| image:: https://img.shields.io/badge/code_style-black-000000.svg\n :target: https://github.com/psf/\n :alt: Black\n\n.. |mypy| image:: https://img.shields.io/badge/type_checker-mypy-blue\n :target: http://mypy-lang.org/\n :alt: Mypy\n\n.. |openhub| image:: https://www.openhub.net/p/pygeoif/widgets/project_thin_badge.gif\n :target: https://www.openhub.net/p/pygeoif/\n :alt: Openhub\n\n.. |factor| image:: https://www.codefactor.io/repository/github/cleder/pygeoif/badge/main\n :target: https://www.codefactor.io/repository/github/cleder/pygeoif/overview/main\n :alt: CodeFactor\n\n.. |commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\n :target: https://github.com/pre-commit/pre-commit\n :alt: pre-commit\n\n.. |py| image:: https://img.shields.io/pypi/pyversions/pygeoif.svg\n :target: https://pypi.python.org/pypi/pygeoif/\n :alt: Supported Python versions\n.. |conda| image:: https://img.shields.io/conda/vn/conda-forge/pygeoif.svg\n :target: https://anaconda.org/conda-forge/pygeoif\n :alt: Conda Version\n\n.. |implement| image:: https://img.shields.io/pypi/implementation/pygeoif.svg\n :target: https://pypi.python.org/pypi/pygeoif/\n :alt: Supported Python implementations\n\n.. |latest| image:: https://img.shields.io/pypi/v/pygeoif.svg\n :target: https://pypi.python.org/pypi/pygeoif/\n :alt: Latest Version\n\n.. |license| image:: https://img.shields.io/pypi/l/pygeoif.svg\n :target: https://pypi.python.org/pypi/pygeoif/\n :alt: License\n\n.. |downloads| image:: https://img.shields.io/pypi/dm/pygeoif.svg\n :target: https://www.pepy.tech/projects/pygeoif\n :alt: Downloads\n\nInstallation\n------------\n\nYou can install PyGeoIf from pypi using pip::\n\n pip install pygeoif\n\n\nExample\n========\n.. code-block:: pycon\n\n >>> from pygeoif import geometry\n >>> p = geometry.Point(1,1)\n >>> p.__geo_interface__\n {'type': 'Point', 'bbox': (1, 1, 1, 1), 'coordinates': (1, 1)}\n >>> print(p)\n POINT (1 1)\n >>> p\n Point(1, 1)\n >>> l = geometry.LineString([(0.0, 0.0), (1.0, 1.0)])\n >>> l.bounds\n (0.0, 0.0, 1.0, 1.0)\n >>> print(l)\n LINESTRING (0.0 0.0, 1.0 1.0)\n\n\nYou find more examples in the\n`tests <https://github.com/cleder/pygeoif/tree/main/tests>`_\ndirectory which cover every aspect of pygeoif or in fastkml_.\n\nClasses\n========\n\nAll classes implement the attribute:\n\n* ``__geo_interface__``: as discussed above, an interface to GeoJSON_.\n\nAll geometry classes implement the attributes:\n\n* ``geom_type``: Returns a string specifying the Geometry Type of the object\n* ``bounds``: Returns a (minx, miny, maxx, maxy) tuple that bounds the object.\n* ``wkt``: Returns the 'Well Known Text' representation of the object\n\nFor two-dimensional geometries the following methods are implemented:\n\n* ``convex_hull``: Returns a representation of the smallest convex Polygon containing\n all the points in the object unless the number of points in the object is less than three.\n For two points, the convex hull collapses to a LineString; for 1, a Point.\n For three dimensional objects only their projection in the xy plane is taken into consideration.\n Empty objects without coordinates return ``None`` for the convex_hull.\n\n\nPoint\n-----\nA zero dimensional geometry\n\nA point has zero length and zero area. A point cannot be empty.\n\nAttributes\n~~~~~~~~~~~\nx, y, z : float\n Coordinate values\n\nExample\n~~~~~~~~\n.. code-block: pycon\n\n >>> from pygeoif import Point\n >>> p = Point(1.0, -1.0)\n >>> print(p)\n POINT (1.0 -1.0)\n >>> p.y\n -1.0\n >>> p.x\n 1.0\n\n\n\nLineString\n-----------\n\nA one-dimensional figure comprising one or more line segments\n\nA LineString has non-zero length and zero area. It may approximate a curve\nand need not be straight. Unlike a LinearRing, a LineString is not closed.\n\nAttributes\n~~~~~~~~~~~\ngeoms : sequence\n A sequence of Points\n\nLinearRing\n-----------\n\nA closed one-dimensional geometry comprising one or more line segments\n\nA LinearRing that crosses itself or touches itself at a single point is\ninvalid and operations on it may fail.\n\nA LinearRing is self closing.\n\n\nPolygon\n--------\n\nA two-dimensional figure bounded by a linear ring\n\nA polygon has a non-zero area. It may have one or more negative-space\n\"holes\" which are also bounded by linear rings. If any rings cross each\nother, the geometry is invalid and operations on it may fail.\n\nAttributes\n~~~~~~~~~~~\n\nexterior : LinearRing\n The ring which bounds the positive space of the polygon.\ninteriors : sequence\n A sequence of rings which bound all existing holes.\n\nMultiPoint\n----------\nA collection of one or more points.\n\nAttributes\n~~~~~~~~~~~\n\ngeoms : sequence\n A sequence of Points.\n\nMultiLineString\n----------------\nA collection of one or more line strings.\n\nA MultiLineString has non-zero length and zero area.\n\nAttributes\n~~~~~~~~~~~\n\ngeoms : sequence\n A sequence of LineStrings\n\nMultiPolygon\n-------------\n\nA collection of one or more polygons.\n\nAttributes\n~~~~~~~~~~~~~\ngeoms : sequence\n A sequence of `Polygon` instances\n\n\nGeometryCollection\n-------------------\nA heterogenous collection of geometries (Points, LineStrings, LinearRings\nand Polygons).\n\nAttributes\n~~~~~~~~~~~\ngeoms : sequence\n A sequence of geometry instances\n\nPlease note:\n``GEOMETRYCOLLECTION`` isn't supported by the Shapefile or GeoJSON_ format.\nAnd this sub-class isn't generally supported by ordinary GIS sw (viewers and so on).\nSo it's very rarely used in the real GIS professional world.\n\nExample\n~~~~~~~~\n.. code-block:: pycon\n\n >>> from pygeoif import geometry\n >>> p = geometry.Point(1.0, -1.0)\n >>> p2 = geometry.Point(1.0, -1.0)\n >>> geoms = [p, p2]\n >>> c = geometry.GeometryCollection(geoms)\n >>> [geom for geom in geoms]\n [Point(1.0, -1.0), Point(1.0, -1.0)]\n\nFeature\n-------\nAggregates a geometry instance with associated user-defined properties.\n\nAttributes\n~~~~~~~~~~~\ngeometry : object\n A geometry instance\nproperties : dict\n A dictionary linking field keys with values associated with with geometry instance\n\nExample\n~~~~~~~~\n.. code-block:: pycon\n\n >>> from pygeoif import Point, Feature\n >>> p = Point(1.0, -1.0)\n >>> props = {'Name': 'Sample Point', 'Other': 'Other Data'}\n >>> a = Feature(p, props)\n >>> a.properties\n {'Name': 'Sample Point', 'Other': 'Other Data'}\n >>> a.properties['Name']\n 'Sample Point'\n\nFeatureCollection\n-----------------\nA heterogenous collection of Features\n\nAttributes\n~~~~~~~~~~~\nfeatures: sequence\n A sequence of feature instances\n\nExample\n~~~~~~~~\n.. code-block:: pycon\n\n >>> from pygeoif import Point, Feature, FeatureCollection\n >>> p = Point(1.0, -1.0)\n >>> props = {'Name': 'Sample Point', 'Other': 'Other Data'}\n >>> a = Feature(p, props)\n >>> p2 = Point(1.0, -1.0)\n >>> props2 = {'Name': 'Sample Point2', 'Other': 'Other Data2'}\n >>> b = Feature(p2, props2)\n >>> features = [a, b]\n >>> c = FeatureCollection(features)\n >>> [feature for feature in c]\n [Feature(Point(1.0, -1.0), {'Name': 'Sample Point', 'Other': 'Other Data'},...]\n\nFunctions\n=========\n\nshape\n--------\n\nCreate a pygeoif feature from an object that provides the ``__geo_interface__``\nor any GeoJSON_ compatible dictionary.\n\n.. code-block:: pycon\n\n >>> from shapely.geometry import Point\n >>> from pygeoif import geometry, shape\n >>> shape(Point(0,0))\n Point(0.0, 0.0)\n\n\nfrom_wkt\n---------\n\nCreate a geometry from its WKT representation\n\n.. code-block:: pycon\n\n >>> from pygeoif import from_wkt\n >>> p = from_wkt('POINT (0 1)')\n >>> print(p)\n POINT (0.0 1.0)\n\n\nsigned_area\n------------\n\nReturn the signed area enclosed by a ring.\nA value >= 0 indicates a counter-clockwise oriented ring.\n\n\norient\n-------\nReturns a copy of a polygon with exteriors and interiors in the right orientation.\n\nif ccw is True than the exterior will be in counterclockwise orientation\nand the interiors will be in clockwise orientation, or\nthe other way round when ccw is False.\n\n\nbox\n---\nReturn a rectangular polygon with configurable normal vector.\n\n\nmapping\n-------\n\nReturn the ``__geo_interface__`` dictionary.\n\n\nDevelopment\n===========\n\nClone this repository, create a virtualenv with Python 3.8 or later with\n``python3 -m venv .venv`` and activate it with ``source .venv/bin/activate``.\n\nThen install the requirements with ``pip install -e \".[dev]\"``.\n\npre-commit\n----------\n\nInstall the ``pre-commit`` hook with::\n\n pip install pre-commit\n pre-commit install\n\nand check the code with::\n\n pre-commit run --all-files\n\nTesting\n-------\n\nRun the unit and static tests with::\n\n pytest tests\n pytest --doctest-glob=\"README.rst\"\n black pygeoif\n ruff pygeoif\n flake8 pygeoif\n mypy pygeoif\n\n\n\nAcknowledgments\n================\n\nThe tests were improved with mutmut_ which discovered some nasty edge cases.\n\n.. _mutmut: https://github.com/boxed/mutmut\n.. _GeoJSON: https://geojson.org/\n.. _fastkml: http://pypi.python.org/pypi/fastkml/\n.. _Hypothesis: https://hypothesis.works\n",
"bugtrack_url": null,
"license": "LGPL",
"summary": "A basic implementation of the __geo_interface__",
"version": "1.5.1",
"project_urls": {
"Changelog": "https://github.com/cleder/pygeoif/blob/develop/docs/HISTORY.rst",
"Documentation": "https://pygeoif.readthedocs.io/",
"Homepage": "https://github.com/cleder/pygeoif/"
},
"split_keywords": [
"gis",
" hypothesis",
" spatial",
" wkt"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ea1658211b90cc314f7fa4f7d7124c770a6ca67ffd57e2b3937ed557f9ac9f57",
"md5": "0e8ec076eaec567c0e470bb4e74830e7",
"sha256": "2210cca8707c2858885525330db2164321218bb676fe0900123eed94624aab34"
},
"downloads": -1,
"filename": "pygeoif-1.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0e8ec076eaec567c0e470bb4e74830e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 28075,
"upload_time": "2024-12-05T20:47:05",
"upload_time_iso_8601": "2024-12-05T20:47:05.875531Z",
"url": "https://files.pythonhosted.org/packages/ea/16/58211b90cc314f7fa4f7d7124c770a6ca67ffd57e2b3937ed557f9ac9f57/pygeoif-1.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "be2e9f2e369b293e84acabd34df5cc189ac519d7c1bebfd56f5b3ca5bfe1a57b",
"md5": "077ac3f885e9de1bfd340c00a2a0f779",
"sha256": "f27a6b6a1ecb87aeacc2b51bcc59ca79be70ed12a0104de8601478b213dd5d81"
},
"downloads": -1,
"filename": "pygeoif-1.5.1.tar.gz",
"has_sig": false,
"md5_digest": "077ac3f885e9de1bfd340c00a2a0f779",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 41210,
"upload_time": "2024-12-05T20:47:08",
"upload_time_iso_8601": "2024-12-05T20:47:08.134183Z",
"url": "https://files.pythonhosted.org/packages/be/2e/9f2e369b293e84acabd34df5cc189ac519d7c1bebfd56f5b3ca5bfe1a57b/pygeoif-1.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-05 20:47:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cleder",
"github_project": "pygeoif",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pygeoif"
}