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

API idempotence #214

Open
moradology opened this issue Jul 16, 2019 · 0 comments
Open

API idempotence #214

moradology opened this issue Jul 16, 2019 · 0 comments

Comments

@moradology
Copy link
Contributor

Much of the API is consciously idempotent (e.g. reproject called on a 4326 RasterSource with the target projection 4326 will short circuit and not do any work). The naming conventions we've landed on don't really highlight this or disambiguate the non-idempotent (in the case of reproject, required by implementation) portions of the API and those methods which can be relied as idempotent (in the case of reproject, provided by the library).

Instead of this, we should consider an API that looks like this:

val rs: RasterSource = ???
rs.projected(4326, ...)

projected asks if an RS is already projected appropriately; if so, we're done; if not, call reproject (which in this case users will be expected to implement)

connects #209

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

No branches or pull requests

1 participant