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

Add Circe codecs for GeoTiffInfo and related classes #3128

Merged
merged 5 commits into from
Oct 17, 2019

Conversation

echeipesh
Copy link
Contributor

@echeipesh echeipesh commented Oct 16, 2019

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:

  • breaks out GeoTiffInfo out of GeoTiffReader to minimize weirdness in the codebase
  • Merges TiffTagsReader class into TiffTags.read method

Checklist

  • docs/CHANGELOG.rst updated, if necessary

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.
@echeipesh echeipesh requested a review from pomadchin October 16, 2019 19:01
@pomadchin pomadchin changed the title Add Cerci codecs for GeoTiffInfo and related classes Add Circe codecs for GeoTiffInfo and related classes Oct 16, 2019
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.
@echeipesh echeipesh force-pushed the feature/geotiffinfo-codecs branch from 5218e78 to 52b683e Compare October 16, 2019 22:13
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
@echeipesh echeipesh force-pushed the feature/geotiffinfo-codecs branch from 52b683e to a059d11 Compare October 17, 2019 01:28
Copy link
Member

@pomadchin pomadchin left a 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?

@pomadchin pomadchin force-pushed the feature/geotiffinfo-codecs branch 2 times, most recently from eea171b to 2fa0407 Compare October 17, 2019 20:27
Copy link
Member

@pomadchin pomadchin left a 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.

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