Class StructGeometryRule

java.lang.Object
nz.org.riskscape.engine.types.eqrule.StructGeometryRule
All Implemented Interfaces:
Identified, EquivalenceRule

public class StructGeometryRule extends Object implements EquivalenceRule

EquivalenceRule that allows a Struct with a single Geom member to be coerced to a Geom. This allows expressions like intersects(asset, region) instead of intersects(asset.geom_member, region.geom). This is really helpful with feature type structs to allow geometry operations to be applied to them.

NB we might want this to apply more generally, e.g. any struct with a single member of type X can be coerced to X, or consider a special geometry wrapping type to signal that it's a special feature geometry attribute.