Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REC: point_nearest_distance metric now measures from centroid #1384

Merged
merged 5 commits into from
Aug 25, 2023

Conversation

davemfish
Copy link
Contributor

The User's Guide (i.e. model spec) suggested it was measuring from "center" of an AOI polygon to the predictor point, whereas it was actually measuring from the edge of the polygon. Now it measures from the centroid.

Fixes #1347

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
  • Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@@ -581,14 +581,14 @@ def test_all_metrics_local_server(self):
expected_grid_vector_path = os.path.join(
REGRESSION_DATA, 'predictor_data_all_metrics.shp')
utils._assert_vectors_equal(
out_grid_vector_path, expected_grid_vector_path, 1e-3)
expected_grid_vector_path, out_grid_vector_path, 1e-3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it fails, the message from this assertion function expects the first arg to be the "expected" value and second to be the "actual".

@davemfish davemfish requested a review from dcdenu4 August 25, 2023 18:42
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @davemfish!

@dcdenu4 dcdenu4 merged commit 468ce1f into natcap:main Aug 25, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REC: point_nearest_distance metric does not do what docs say
2 participants