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

CoordinateFilter: Support multiple CoordinateSequence dimensions #799

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

dbaston
Copy link
Member

@dbaston dbaston commented Jan 14, 2023

The interface of CoordinateFilter is changed so that a filter should support operations on CoordinateXY* rather than Coordinate*. By default, higher-dimension coordinates will default to base-class implementations (e.g., a CoordinateXYZM will be processed as a CoordinateXY if no implementation is available for Coordiante or CoordinateXYZM.)

To avoid the case where the filter implementation does not need to consider Z or M but must preserve them (e.g., repeated point removal), the CoordinateInspector and CoordinateMutator base classes are provided. These allow a filter class to inherit from the base using CRTP and provide a template for the filter method rather than an implementation for each coordinate type.

The interface of CoordinateFilter is changed so that a filter should
support operations on CoordinateXY* rather than Coordinate*. By default,
higher-dimension coordinates will default to base-class implementations
(e.g., a CoordinateXYZM will be processed as a CoordinateXY if no
implementation is available for Coordiante or CoordinateXYZM.)

To avoid the case where the filter implementation does not need to
consider Z or M but must preserve them (e.g., repeated point removal),
the CoordinateInspector and CoordinateMutator base classes are provided.
These allow a filter class to inherit from the base using CRTP and
provide a template for the filter method rather than an implementation
for each coordinate type.
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.

1 participant