pysal / pointpats

Planar Point Pattern Analysis in PySAL
https://pysal.org/pointpats/
BSD 3-Clause "New" or "Revised" License
80 stars 26 forks source link

REF: reimplement mrr on top of shapely #133

Closed martinfleis closed 4 months ago

martinfleis commented 5 months ago

Resolves the issue seen in https://github.com/pysal/libpysal/issues/681 where opencv causes installation headache. Since we already depend on shapely, there's no need to depend on OpenCV, so using shapely's minimum_rotated_rectangle, computing the angle manually and coercing the resulting array into the opencv-like order (which is the opposite compared to shapely).

codecov[bot] commented 5 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (2c0e0b2) 69.4% compared to head (339435e) 69.4%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pysal/pointpats/pull/133/graphs/tree.svg?width=650&height=150&src=pr&token=0S5nzc1oBN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)](https://app.codecov.io/gh/pysal/pointpats/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) ```diff @@ Coverage Diff @@ ## main #133 +/- ## ===================================== Coverage 69.4% 69.4% ===================================== Files 12 12 Lines 1769 1767 -2 ===================================== - Hits 1228 1227 -1 + Misses 541 540 -1 ``` | [Files](https://app.codecov.io/gh/pysal/pointpats/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | Coverage Δ | | |---|---|---| | [pointpats/centrography.py](https://app.codecov.io/gh/pysal/pointpats/pull/133?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-cG9pbnRwYXRzL2NlbnRyb2dyYXBoeS5weQ==) | `46.2% <50.0%> (-<0.1%)` | :arrow_down: |
jGaboardi commented 5 months ago

@martinfleis Is this ready for review?

martinfleis commented 5 months ago

@jGaboardi yup! Wasn't sure who's responsible here :).

jGaboardi commented 5 months ago

Seems like you, @knaaptime, and @sjsrey have made the most recent commits. I'll add them for review as well.