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

Don't error when pointcloud statistics are missing #282

Merged
merged 2 commits into from
Mar 11, 2021
Merged

Don't error when pointcloud statistics are missing #282

merged 2 commits into from
Mar 11, 2021

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Mar 11, 2021

Related Issue(s):
stac-utils/stactools#44

Description:
The statistics attribute of the pointcloud extension is optional, but PointcloudItemExt.get_statistics was erroring if the pointcloud was missing stats. This fixes the issue to return None if there are no statistics defined.

PR Checklist:

  • Code is formatted (run scripts/format)
  • Tests pass (run scripts/test)
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

The `statistics` attribute of the pointcloud extension is optional,
but `PointcloudItemExt.get_statistics` was erroring if the pointcloud
was missing stats. This fixes the issue to return `None` if there are
no statistics defined.
@matthewhanson
Copy link
Member

+1 for including test for it!

@matthewhanson matthewhanson merged commit 5a492ca into stac-utils:develop Mar 11, 2021
@gadomski gadomski deleted the pointcloud-without-statistics branch March 11, 2021 21:37
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.

2 participants