Giter Site home page Giter Site logo

concave-hull's People

Contributors

chrislcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

concave-hull's Issues

How to ensure edges do not intersect each other?

Hi there,

I'm using the library to find the boundaries for thousands of geo-clusters, each contains hundreds to thousands of coordinates. The problem is that the concave hull computed by the library will often contain edges intersecting each other, hence results in failure of creating shapefiles.

Is there a way to ensure edges do not intersect each other?

Thanks,
Foxan

Example fails: module 'concave_hull' has no attribute 'compute'

I tried to run the example, but it fails with an error that "compute" is not available.
Has the interface changed?

I can run concave_hull.concave_hull as a function, but it does not accept additional arguments.

(concavehull) c:\data\python\concavehull\test>python
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr  4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import concave_hull
>>> import numpy as np
>>> points = np.random.rand(20, 2)
>>> hull = concave_hull.compute(points, 3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'concave_hull' has no attribute 'compute'
>>> concave_hull
<module 'concave_hull' from 'c:\\python\\venvs\\concavehull\\Lib\\site-packages\\concave_hull\\__init__.py'>
>>> concave_hull.concave_hull
<function concave_hull at 0x0000020C806D4360>
>>> concave_hull.concave_hull(points)
array([[0.98553075, 0.1147427 ],
       [0.99851081, 0.30195032],
       [0.80894875, 0.65811672],
       [0.59799064, 0.99056575],
       [0.53566517, 0.99839296],
       [0.4559874 , 0.78033423],
       [0.00371112, 0.92268067],
       [0.45221557, 0.44759797],
       [0.23714478, 0.35211084],
       [0.15148603, 0.28948153],
       [0.12326807, 0.18024674],
       [0.4700003 , 0.07954127],
       [0.77819351, 0.12720469],
       [0.8988808 , 0.04160422],
       [0.9343545 , 0.0241974 ]])
>>> concave_hull.concave_hull(points, 4)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: concave_hull() takes 1 positional argument but 2 were given
>>> concave_hull.concave_hull(points)

About performance

Hi, this is a very useful tool. I'd like to know if this python wrapper represents an advantage in front of use the command line implementation. I mean, the command line requires store the points in files and with this tool I can pass points just with python arrays. I couldn't find how this connection is made in the source code. Can you explain a bit more of it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.