Skip to content

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
cleder committed Oct 29, 2023
1 parent 12bbd0d commit 77305cd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ html/
venv/
__pycache__/
*.stderr*
docs/_*
57 changes: 33 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ Introduction

.. inclusion-marker-do-not-remove
PyGeoIf provides a `GeoJSON-like protocol <https://gist.github.com/2217756>`_ for geo-spatial (GIS) vector data.
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 already
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
Expand Down Expand Up @@ -72,6 +76,14 @@ It was written to provide clean and python only geometries for fastkml_
:target: https://pypi.python.org/pypi/pygeoif/
:alt: Supported Python implementations

Installation
------------

You can install PyGeoIf from pypi using pip::

pip install pygeoif


Example
========

Expand Down Expand Up @@ -321,9 +333,8 @@ Create a geometry from its WKT representation
signed_area
------------

Return the signed area enclosed by a ring using the linear time
algorithm at http://www.cgafaq.info/wiki/Polygon_Area. A value >= 0
indicates a counter-clockwise oriented ring.
Return the signed area enclosed by a ring.
A value >= 0 indicates a counter-clockwise oriented ring.


orient
Expand All @@ -349,28 +360,13 @@ Return the ``__geo_interface__`` dictionary.
Development
===========

Installation
------------

You can install PyGeoIf from pypi using pip::

pip install pygeoif

Testing
-------

Install the requirements with ``pip install -r test-requirements.txt``
and run the unit and static tests with::
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``.

pytest pygeoif
pytest --doctest-glob="README.rst"
yesqa pygeoif/*.py
black pygeoif
flake8 pygeoif
mypy pygeoif
Then install the requirements with ``pip install -e ".[dev]"``.

pre-commit
~~~~~~~~~~~
----------

Install the ``pre-commit`` hook with::

Expand All @@ -381,6 +377,19 @@ 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
================
Expand Down

0 comments on commit 77305cd

Please sign in to comment.