generated from cubao/pybind11-rdp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add stubs * lint * fix * fix * update * fix --------- Co-authored-by: tang zhixiong <[email protected]>
- Loading branch information
1 parent
bdca55e
commit 078c7da
Showing
9 changed files
with
82 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ _generate/ | |
wheelhouse | ||
!test.py | ||
site | ||
stubs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule headers
updated
11 files
+1 −1 | .github/workflows/wheels.yml | |
+3 −0 | .gitignore | |
+9 −100 | Makefile | |
+58 −0 | build.py | |
+42 −0 | include/cubao/polyline_ruler.hpp | |
+72 −36 | include/cubao/pybind11_cheap_ruler.hpp | |
+40 −20 | include/cubao/pybind11_crs_transform.hpp | |
+390 −0 | include/cubao/pybind11_naive_svg.hpp | |
+131 −63 | include/cubao/pybind11_polyline_ruler.hpp | |
+0 −3 | pyproject.toml | |
+0 −34 | setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
""" | ||
A very fast 2D concave hull algorithm | ||
------------------------------------- | ||
credits: | ||
- https://github.com/mapbox/concaveman | ||
- https://github.com/sadaszewski/concaveman-cpp | ||
- https://cp-algorithms.com/geometry/convex-hull.html#implementation | ||
""" | ||
from __future__ import annotations | ||
|
||
import numpy | ||
|
||
__all__ = [ | ||
"clockwise", | ||
"colinear", | ||
"concave_hull_indexes", | ||
"convex_hull_indexes", | ||
"orientation", | ||
"wgs84_to_east_north", | ||
] | ||
|
||
def clockwise( | ||
prev: numpy.ndarray[numpy.float64[2, 1]], | ||
curr: numpy.ndarray[numpy.float64[2, 1]], | ||
next: numpy.ndarray[numpy.float64[2, 1]], | ||
*, | ||
include_colinear: bool = False, | ||
) -> bool: ... | ||
def colinear( | ||
prev: numpy.ndarray[numpy.float64[2, 1]], | ||
curr: numpy.ndarray[numpy.float64[2, 1]], | ||
next: numpy.ndarray[numpy.float64[2, 1]], | ||
) -> bool: ... | ||
def concave_hull_indexes( | ||
points: numpy.ndarray[numpy.float64[m, 2]], | ||
*, | ||
convex_hull_indexes: numpy.ndarray[numpy.int32[m, 1]], | ||
concavity: float = 2.0, | ||
length_threshold: float = 0.0, | ||
) -> numpy.ndarray[numpy.int32[m, 1]]: | ||
""" | ||
documents here: https://github.com/mapbox/concaveman | ||
""" | ||
|
||
def convex_hull_indexes( | ||
points: numpy.ndarray[numpy.float64[m, 2], numpy.ndarray.flags.c_contiguous], | ||
*, | ||
include_colinear: bool = False, | ||
order_only: bool = False, | ||
) -> numpy.ndarray[numpy.int32[m, 1]]: ... | ||
def orientation( | ||
prev: numpy.ndarray[numpy.float64[2, 1]], | ||
curr: numpy.ndarray[numpy.float64[2, 1]], | ||
next: numpy.ndarray[numpy.float64[2, 1]], | ||
) -> int: ... | ||
def wgs84_to_east_north( | ||
wgs84: numpy.ndarray[numpy.float64[m, 2], numpy.ndarray.flags.c_contiguous] | ||
) -> numpy.ndarray[numpy.float64[m, 2]]: | ||
""" | ||
documents here: https://github.com/mapbox/cheap-ruler | ||
""" | ||
|
||
__version__: str = "0.0.8" |