Description:
The coordinates in Item geometries and bboxes and Collection extent bboxes often contain excess precision, much greater than 7 or 8 decimal places (which is roughly centimeter to millimeter level). This PR provides a utility to round coordinates to a specified precision. This saves a small amount of space when storing STAC, provides more consistent and clean looking STAC, and removes implications of extreme location accuracy (e.g., 12 decimal places implies accuracy to sub-micrometer level).
PR checklist:
[x] Code is formatted (run scripts/format).
[x] Code lints properly (run scripts/lint).
[x] Tests pass (run scripts/test).
[ ] Documentation has been updated to reflect changes, if applicable.
Related Issue(s): None.
Description: The coordinates in Item geometries and bboxes and Collection extent bboxes often contain excess precision, much greater than 7 or 8 decimal places (which is roughly centimeter to millimeter level). This PR provides a utility to round coordinates to a specified precision. This saves a small amount of space when storing STAC, provides more consistent and clean looking STAC, and removes implications of extreme location accuracy (e.g., 12 decimal places implies accuracy to sub-micrometer level).
PR checklist:
scripts/format
).scripts/lint
).scripts/test
).