centerline

Calculate the polygon's centerline

https://github.com/fitodic/centerline

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
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary

Keywords

border centerline cli gis linear-structures polygon python screenshot shapefile spatial-data voronoi
Last synced: 4 months ago · JSON representation ·

Repository

Calculate the polygon's centerline

Basic Info
Statistics
  • Stars: 286
  • Watchers: 9
  • Forks: 56
  • Open Issues: 3
  • Releases: 6
Topics
border centerline cli gis linear-structures polygon python screenshot shapefile spatial-data voronoi
Created about 11 years ago · Last pushed 7 months 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

  • Name: Filip Todic
  • Login: fitodic
  • Kind: user
  • Location: Zagreb, Croatia
  • Company: @TeleClinic

I love watching machines do the work for me.

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
  • Watch event: 21
  • Push event: 8
  • Pull request event: 5
  • Fork event: 1
  • Create event: 2
Last Year
  • Watch event: 21
  • Push event: 8
  • Pull request event: 5
  • Fork event: 1
  • Create event: 2

Committers

Last synced: almost 2 years ago

All Time
  • Total Commits: 283
  • Total Committers: 6
  • Avg Commits per committer: 47.167
  • Development Distribution Score (DDS): 0.364
Past Year
  • Commits: 16
  • Committers: 2
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.438
Top Committers
Name Email Commits
fitodic t****p@g****m 180
Filip Todic f****c@s****r 84
Filip Todic f****c 8
Murat Khairulin m****t@k****m 7
Mario Miler t****r@g****m 3
theroggy p****s@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 24
  • Total pull requests: 28
  • Average time to close issues: 3 months
  • Average time to close pull requests: 27 days
  • Total issue authors: 23
  • Total pull request authors: 8
  • Average comments per issue: 2.83
  • Average comments per pull request: 2.18
  • Merged pull requests: 26
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 1
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 hours
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • phamkhactu (2)
  • gladcolor (1)
  • mperlet (1)
  • vufalo1995 (1)
  • feihugis (1)
  • raybellwaves (1)
  • 3vivekb (1)
  • sonygod (1)
  • cesar3158 (1)
  • theroggy (1)
  • Turtle6665 (1)
  • aruscha-k (1)
  • luqinghui (1)
  • mxwell (1)
  • ogourgue (1)
Pull Request Authors
  • fitodic (21)
  • kaushik12 (2)
  • mmiler (2)
  • dependabot[bot] (2)
  • Lash-L (2)
  • theroggy (1)
  • mxwell (1)
  • jreniel (1)
Top Labels
Issue Labels
help wanted (3) question (3)
Pull Request Labels
enhancement (2) dependencies (2)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 18,162 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 4
    (may contain duplicates)
  • Total versions: 18
  • Total maintainers: 1
pypi.org: centerline

Calculate the centerline of a polygon

  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 4
  • Downloads: 18,162 Last month
Rankings
Downloads: 3.4%
Stargazers count: 4.7%
Forks count: 6.0%
Average: 6.3%
Dependent repos count: 7.5%
Dependent packages count: 10.1%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: centerline
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 25.6%
Stargazers count: 27.1%
Dependent repos count: 34.0%
Average: 34.5%
Dependent packages count: 51.2%
Last synced: 4 months ago

Dependencies

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