Science Score: 44.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
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: Sgohil590
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 392 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Citation

README.rst

Centerline
==========

.. image:: https://github.com/fitodic/centerline/actions/workflows/ci.yml/badge.svg?event=push
    :target: https://github.com/fitodic/centerline/actions
    :alt: Build status

.. image:: https://codecov.io/gh/fitodic/centerline/branch/master/graph/badge.svg?token=S2WQ9OTR9O
    :target: https://codecov.io/gh/fitodic/centerline
    :alt: Test coverage status

.. image:: https://readthedocs.org/projects/centerline/badge/?version=latest
    :target: http://centerline.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/centerline.svg
    :target: https://pypi.python.org/pypi/centerline
    :alt: Version

.. image:: https://pepy.tech/badge/centerline
    :target: https://pepy.tech/project/centerline
    :alt: Downloads

.. figure::  docs/images/example.png
   :align:   center

Roads, rivers and similar linear structures are often represented by
long and complex polygons. Since one of the most important attributes of
a linear structure is its length, extracting that attribute from a
polygon can prove to be more or less difficult.

This library tries to solve this problem by creating the the polygon's
centerline using the `Voronoi diagram
`_. For more info on how
to use this package, see the
`official documentation `_.


Features
^^^^^^^^

* A command-line script for creating centerlines from a vector source file and saving them into a destination vector file: ``create_centerlines``

.. code:: bash

    $ create_centerlines input.shp output.geojson


* The ``Centerline`` class that allows integration into your own workflow.


.. code:: python

    >>> from shapely.geometry import Polygon
    >>> from centerline.geometry import Centerline

    >>> polygon = Polygon([[0, 0], [0, 4], [4, 4], [4, 0]])
    >>> attributes = {"id": 1, "name": "polygon", "valid": True}

    >>> centerline = Centerline(polygon, **attributes)
    >>> centerline.id == 1
    True
    >>> centerline.name
    'polygon'
    >>> centerline.geometry.geoms
    

Owner

  • Login: Sgohil590
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Todić"
  given-names: "Filip"
title: "centerline"
version: 1.0.1
doi: 10.5281/zenodo.10456482
date-released: 2023-01-23
url: "https://github.com/fitodic/centerline"

GitHub Events

Total
  • Create event: 2
Last Year
  • Create event: 2

Dependencies

.github/workflows/ci.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/checkout master composite
  • actions/download-artifact v4 composite
  • actions/setup-python v2 composite
  • actions/setup-python v3 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v3 composite
  • pypa/gh-action-pypi-publish master composite
pyproject.toml pypi
setup.py pypi