Class CoverageValueProviderHelper
java.lang.Object
nz.org.riskscape.engine.data.coverage.CoverageValueProviderHelper
Provides utility functions useful to TypedCoverage implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassException to throw if the helper is given an empty geometry. -
Constructor Summary
ConstructorsConstructorDescriptionCoverageValueProviderHelper(org.geotools.geometry.jts.ReferencedEnvelope envelope, nz.org.riskscape.engine.SRIDSet sridSet) Get a helper for a coverage that covers the envelope. -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(org.geotools.api.geometry.Position position) org.geotools.geometry.jts.ReferencedEnvelopeorg.geotools.api.geometry.PositionpointToDirectPosition(org.locationtech.jts.geom.Point point) org.locationtech.jts.geom.GeometryreprojectIfNecessary(org.locationtech.jts.geom.Geometry geom) Will reproject geom into theCoordinateReferenceSystemof the coverage if necessary.
-
Constructor Details
-
CoverageValueProviderHelper
public CoverageValueProviderHelper(org.geotools.geometry.jts.ReferencedEnvelope envelope, nz.org.riskscape.engine.SRIDSet sridSet) Get a helper for a coverage that covers the envelope.
- Parameters:
envelope- containing the coveragesridSet-
-
-
Method Details
-
reprojectIfNecessary
public org.locationtech.jts.geom.Geometry reprojectIfNecessary(org.locationtech.jts.geom.Geometry geom) throws CoverageValueProviderHelper.EmptyGeometryException Will reproject geom into the
CoordinateReferenceSystemof the coverage if necessary.- Parameters:
geom-- Returns:
- geom, or reproject geom if necessary
- Throws:
CoverageValueProviderHelper.EmptyGeometryException- if geom is empty
-
contains
public boolean contains(org.geotools.api.geometry.Position position) - Parameters:
position-- Returns:
- true if position is within the envelope
-
pointToDirectPosition
public org.geotools.api.geometry.Position pointToDirectPosition(org.locationtech.jts.geom.Point point) -
getEnvelope
public org.geotools.geometry.jts.ReferencedEnvelope getEnvelope()
-