Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: deepin-community
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Size: 749 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Code of conduct Citation

README.rst

=======
Shapely
=======

.. Documentation at RTD — https://readthedocs.org

.. image:: https://readthedocs.org/projects/shapely/badge/?version=stable
   :alt: Documentation Status
   :target: https://shapely.readthedocs.io/en/stable/

.. Github Actions status — https://github.com/shapely/shapely/actions

.. |github-actions| image:: https://github.com/shapely/shapely/workflows/Tests/badge.svg?branch=main
   :alt: Github Actions status
   :target: https://github.com/shapely/shapely/actions?query=branch%3Amain

.. PyPI

.. image:: https://img.shields.io/pypi/v/shapely.svg
   :alt: PyPI
   :target: https://pypi.org/project/shapely/

.. Anaconda

.. image:: https://img.shields.io/conda/vn/conda-forge/shapely
   :alt: Anaconda
   :target: https://anaconda.org/conda-forge/shapely

.. Coverage

.. |coveralls| image:: https://coveralls.io/repos/github/shapely/shapely/badge.svg?branch=main
   :target: https://coveralls.io/github/shapely/shapely?branch=main

.. Zenodo

.. .. image:: https://zenodo.org/badge/191151963.svg
..   :alt: Zenodo
..   :target: https://zenodo.org/badge/latestdoi/191151963

Manipulation and analysis of geometric objects in the Cartesian plane.

.. image:: https://c2.staticflickr.com/6/5560/31301790086_b3472ea4e9_c.jpg
   :width: 800
   :height: 378

Shapely is a BSD-licensed Python package for manipulation and analysis of
planar geometric objects. It is using the widely deployed open-source
geometry library `GEOS `__ (the engine of `PostGIS
`__, and a port of `JTS `__).
Shapely wraps GEOS geometries and operations to provide both a feature rich
`Geometry` interface for singular (scalar) geometries and higher-performance
NumPy ufuncs for operations using arrays of geometries.
Shapely is not primarily focused on data serialization formats or coordinate
systems, but can be readily integrated with packages that are.

What is a ufunc?
----------------

A universal function (or ufunc for short) is a function that operates on
*n*-dimensional arrays on an element-by-element fashion and supports array
broadcasting. The underlying ``for`` loops are implemented in C to reduce the
overhead of the Python interpreter.

Multithreading
--------------

Shapely functions generally support multithreading by releasing the Global
Interpreter Lock (GIL) during execution. Normally in Python, the GIL prevents
multiple threads from computing at the same time. Shapely functions
internally release this constraint so that the heavy lifting done by GEOS can
be done in parallel, from a single Python process.

Usage
=====

Here is the canonical example of building an approximately circular patch by
buffering a point, using the scalar Geometry interface:

.. code-block:: pycon

    >>> from shapely import Point
    >>> patch = Point(0.0, 0.0).buffer(10.0)
    >>> patch
    
    >>> patch.area
    313.6548490545941

Using the vectorized ufunc interface (instead of using a manual for loop),
compare an array of points with a polygon:

.. code:: python

    >>> import shapely
    >>> import numpy as np
    >>> geoms = np.array([Point(0, 0), Point(1, 1), Point(2, 2)])
    >>> polygon = shapely.box(0, 0, 2, 2)

    >>> shapely.contains(polygon, geoms)
    array([False,  True, False])

See the documentation for more examples and guidance: https://shapely.readthedocs.io

Requirements
============

Shapely 2.0 requires

* Python >=3.7
* GEOS >=3.5
* NumPy >=1.14

Installing Shapely
==================

We recommend installing Shapely using one of the available built
distributions, for example using ``pip`` or ``conda``:

.. code-block:: console

    $ pip install shapely
    # or using conda
    $ conda install shapely --channel conda-forge

See the `installation documentation `__
for more details and advanced installation instructions.

Integration
===========

Shapely does not read or write data files, but it can serialize and deserialize
using several well known formats and protocols. The shapely.wkb and shapely.wkt
modules provide dumpers and loaders inspired by Python's pickle module.

.. code-block:: pycon

    >>> from shapely.wkt import dumps, loads
    >>> dumps(loads('POINT (0 0)'))
    'POINT (0.0000000000000000 0.0000000000000000)'

Shapely can also integrate with other Python GIS packages using GeoJSON-like
dicts.

.. code-block:: pycon

    >>> import json
    >>> from shapely.geometry import mapping, shape
    >>> s = shape(json.loads('{"type": "Point", "coordinates": [0.0, 0.0]}'))
    >>> s
    
    >>> print(json.dumps(mapping(s)))
    {"type": "Point", "coordinates": [0.0, 0.0]}

Support
=======

Questions about using Shapely may be asked on the `GIS StackExchange
`__ using the "shapely"
tag.

Bugs may be reported at https://github.com/shapely/shapely/issues.

Copyright & License
===================

Shapely is licensed under BSD 3-Clause license.
GEOS is available under the terms of GNU Lesser General Public License (LGPL) 2.1 at https://libgeos.org.

Owner

  • Name: deepin Community
  • Login: deepin-community
  • Kind: organization
  • Email: support@deepin.org
  • Location: China

Welcome to the deepin community.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite this software using these metadata."
type: software
title: Shapely
version: "2.0.7"
date-released: "2025-01-30"
doi: 10.5281/zenodo.5597138
abstract: "Manipulation and analysis of geometric objects in the Cartesian plane."
repository-artifact: https://pypi.org/project/Shapely
repository-code: https://github.com/shapely/shapely
license: "BSD-3-Clause"
authors:
  - given-names: Sean
    family-names: Gillies
    orcid: https://orcid.org/0000-0002-8401-9184
  - given-names: Casper
    family-names: "van der Wel"
    orcid: https://orcid.org/0000-0002-0488-2237
  - given-names: Joris
    family-names: "Van den Bossche"
    orcid: https://orcid.org/0000-0003-3284-2977
  - given-names: "Mike W."
    family-names: Taves
    orcid: https://orcid.org/0000-0003-3657-7963
  - given-names: Joshua
    family-names: Arnott
  - given-names: "Brendan C."
    family-names: Ward
    orcid: https://orcid.org/0000-0002-0813-9774
  - name: others
keywords:
  - cartography
  - geometry
  - GEOS
  - GIS
  - topology

GitHub Events

Total
  • Issue comment event: 3
  • Pull request event: 2
  • Create event: 1
Last Year
  • Issue comment event: 3
  • Pull request event: 2
  • Create event: 1

Dependencies

.github/workflows/backup-to-gitlab.yml actions
.github/workflows/call-auto-tag.yml actions
.github/workflows/call-build-deb.yml actions
.github/workflows/call-build-tag.yml actions
.github/workflows/call-chatOps.yml actions
docs/environment.yml pypi
pyproject.toml pypi
  • numpy >=1.14
setup.py pypi