This is a replacement for #2373 which provides just the glue-core pieces of that PR and some additional improvements. As a standalone piece it doesn't do very much, but it provides the underlying architecture so that Viewers can be extended to deal with regions-as-data.
The pieces here are:
An ExtendedComponent(Component) which takes a list of Shapely geometries and a list of ComponentIDs describing the center of these geometries.
A RegionData(Data) object which has one (and only one) ExtendedComponent and is the general class to use for any regions-as-data.
Some additions over #2373 are that this no longer requires us to allow_pickle in np.load and it properly round-trips through session files, albeit with a bit of a hack to get the ComponentIDs to be all correct.
Add RegionData and ExtendedComponent Types
Description
This is a replacement for #2373 which provides just the glue-core pieces of that PR and some additional improvements. As a standalone piece it doesn't do very much, but it provides the underlying architecture so that Viewers can be extended to deal with regions-as-data.
The pieces here are:
ExtendedComponent(Component)
which takes a list of Shapely geometries and a list of ComponentIDs describing the center of these geometries.RegionData(Data)
object which has one (and only one)ExtendedComponent
and is the general class to use for any regions-as-data.Some additions over #2373 are that this no longer requires us to
allow_pickle
innp.load
and it properly round-trips through session files, albeit with a bit of a hack to get the ComponentIDs to be all correct.Closes #2351 , #2086 , #1686