Skip to content

Commit

Permalink
Merge pull request #305 from stac-utils/issue304
Browse files Browse the repository at this point in the history
trasformations -> transformations
  • Loading branch information
lossyrob authored Apr 14, 2021
2 parents a24705e + 4d6064b commit a8f50cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorials/adding-new-and-custom-extensions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
"source": [
"### Defining properties\n",
"\n",
"An extension object works by modifying the Item (or whichever STAC object is being extended) directly through Python [property getters and setters](https://docs.python.org/3/library/functions.html#property). The getter should read directly from the `properties` or `extra_fields` in the item and perform any trasformations needed to convert to the relevant Python objects (e.g. transform a string into a `datetime` object). Likewise, the setter should take in Python objects and transform them to their serialized string, and set them in the appropriate place in item. This way the extension modifies the Item directly, and will not require any specialized serialization or deserialization logic. This also allows multiple extensions to be used to access and set information on the STAC object - a distinct advantage to the inheritance-based extension implementation that PySTAC used before 0.4.0.\n",
"An extension object works by modifying the Item (or whichever STAC object is being extended) directly through Python [property getters and setters](https://docs.python.org/3/library/functions.html#property). The getter should read directly from the `properties` or `extra_fields` in the item and perform any transformations needed to convert to the relevant Python objects (e.g. transform a string into a `datetime` object). Likewise, the setter should take in Python objects and transform them to their serialized string, and set them in the appropriate place in item. This way the extension modifies the Item directly, and will not require any specialized serialization or deserialization logic. This also allows multiple extensions to be used to access and set information on the STAC object - a distinct advantage to the inheritance-based extension implementation that PySTAC used before 0.4.0.\n",
"\n",
"For the `sat` extension we have two properties to implement, both of which are straightforward and do not need any transformation in the getters and setters:"
]
Expand Down

0 comments on commit a8f50cb

Please sign in to comment.