diff --git a/CHANGELOG.md b/CHANGELOG.md index 186d1ee2c..da664ddd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed - Fix handling of optional properties when using apply on view extension ([#259](https://github.com/stac-utils/pystac/pull/259)) +- Fixed issue with setting None into projection extension fields that are not required breaking validation ([#269](https://github.com/stac-utils/pystac/pull/269)) ### Changed diff --git a/tests/extensions/test_projection.py b/tests/extensions/test_projection.py index 9681299dd..7e420b3bb 100644 --- a/tests/extensions/test_projection.py +++ b/tests/extensions/test_projection.py @@ -97,6 +97,14 @@ def test_apply(self): shape=[100, 100], transform=[30.0, 0.0, 224985.0, 0.0, -30.0, 6790215.0, 0.0, 0.0, 1.0]) + def test_partial_apply(self): + proj_item = pystac.read_file(self.example_uri) + + proj_item.ext.projection.apply(epsg=1111) + + self.assertEqual(proj_item.ext.projection.epsg, 1111) + proj_item.validate() + def test_validate_proj(self): item = pystac.read_file(self.example_uri) item.validate()