-
Notifications
You must be signed in to change notification settings - Fork 364
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
Add Circe codecs for GeoTiffInfo and related classes #3128
Add Circe codecs for GeoTiffInfo and related classes #3128
Conversation
Moving out of GeoTiffReader class. This is a often used class in client code and it makes little sense to tuck it away in a reader.
Encoding GeoTiffInfo can be useful for caching purposes. To minimize the implicit resolution time we're tucking away codecs into companion objects and making heavy use of macro encoder/decoder derivation where we can.
5218e78
to
52b683e
Compare
Move to minimze weirdness in code base. - we don't need another class to hold a function - make private methods private to minmize public API surface - unroll the super weird method extension for tag reading - apply methods should not do reading
52b683e
to
a059d11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, clean and sweet, though requires a couple of fixes.
Also, mb it makes sense to import codes from the extras packages to make them user configurable?
raster/src/main/scala/geotrellis/raster/io/geotiff/StorageMethod.scala
Outdated
Show resolved
Hide resolved
raster/src/main/scala/geotrellis/raster/io/geotiff/StorageMethod.scala
Outdated
Show resolved
Hide resolved
raster/src/main/scala/geotrellis/raster/io/geotiff/tags/BasicTags.scala
Outdated
Show resolved
Hide resolved
raster/src/main/scala/geotrellis/raster/io/geotiff/tags/CmykTags.scala
Outdated
Show resolved
Hide resolved
eea171b
to
2fa0407
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, the reason why codecs are not Configured
is because they all need even a default configuration passed everywhere ref. For now, to keep raster package simple, we can go with default codecs and they probably fit 90% of all cases and an implicit configuration will only introduce complexity.
2fa0407
to
178b866
Compare
Overview
Encoding GeoTiffInfo can be useful for caching purposes. To minimize the implicit resolution time we're tucking away codecs into companion objects and making heavy use of macro encoder/decoder derivation where we can. This is likely going to be needed again in client code and we can save people some pain by just doing it here.
Related: raster-foundry/raster-foundry@0fe73d7
This PR also:
GeoTiffInfo
out ofGeoTiffReader
to minimize weirdness in the codebaseTiffTagsReader
class intoTiffTags.read
methodChecklist
docs/CHANGELOG.rst
updated, if necessary