Skip to content

API idempotence #214

Description

@moradology

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions