You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operations are a very powerful concept and we ship a variety of operations that are very useful in a lot of contexts. This is particularly true of the datashader operations but also of things like bivariate and contours operations which can be useful for geographic plotting. However to add support for geographic elements and coordinate systems to these operations they would have to be subclassed, which would require users to use the appropriate operation adding extra complexity. In order to extend these operations from external libraries like GeoViews I'd like to propose adding preprocess_hooks and postprocess_hooks class attributes to the Operation baseclass.
The implementation could look something like this:
Alternatively instead of having an _apply method that passes the outputs of the preprocessors to the postprocessors the crs could be stored in the form of some metadata on the operation instance.
My only comment is that I don't think users should be using such a mechanism and this should be for library authors extending holoviews (geoviews is a good example). You don't want to reason about what user added hooks may or may not have been added to understand what an operation is doing.
For this reason, I would make these class attributes into _preprocess_hooks and _postprocess_hooks so geoviews can use them and maybe advanced users who really know what they are doing, though really they should be warned off by the underscore.
Operations are a very powerful concept and we ship a variety of operations that are very useful in a lot of contexts. This is particularly true of the datashader operations but also of things like bivariate and contours operations which can be useful for geographic plotting. However to add support for geographic elements and coordinate systems to these operations they would have to be subclassed, which would require users to use the appropriate operation adding extra complexity. In order to extend these operations from external libraries like GeoViews I'd like to propose adding
preprocess_hooks
andpostprocess_hooks
class attributes to theOperation
baseclass.The implementation could look something like this:
GeoViews could then register hooks like this to grab the
crs
and make sure it is added to the returned element:Alternatively instead of having an
_apply
method that passes the outputs of the preprocessors to the postprocessors the crs could be stored in the form of some metadata on the operation instance.This proposal will address holoviz/geoviews#45.
The text was updated successfully, but these errors were encountered: