org.opengis.coverage.PointOutsideCoverageException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gt-opengis Show documentation
Show all versions of gt-opengis Show documentation
Standard interfaces implemented throughout the library.
The newest version!
/*
* GeoTools - The Open Source Java GIS Toolkit
* http://geotools.org
*
* (C) 2011, Open Source Geospatial Foundation (OSGeo)
* (C) 2005 Open Geospatial Consortium Inc.
*
* All Rights Reserved. http://www.opengis.org/legal/
*/
package org.opengis.coverage;
import static org.opengis.annotation.Specification.*;
import org.opengis.annotation.Extension;
import org.opengis.annotation.UML;
import org.opengis.geometry.DirectPosition;
/**
* Thrown when a {@link Coverage#evaluate(DirectPosition, java.util.Set) evaluate} method is invoked
* for a location outside the domain of the coverage.
*
* @version Grid Coverage specification 1.0
* @author Martin Desruisseaux (IRD)
* @author Alexander Petkov
* @since GeoAPI 1.0
* @see Coverage#evaluate(DirectPosition, byte[])
* @see Coverage#evaluate(DirectPosition, double[])
*/
@UML(identifier = "CV_PointOutsideCoverage", specification = OGC_01004)
public class PointOutsideCoverageException extends CannotEvaluateException {
/** Serial number for interoperability with different versions. */
private static final long serialVersionUID = -8718412090539227101L;
/** Represents a direct position which is outside the domain of the coverage. */
private DirectPosition offendingLocation;
/** Creates an exception with no message. */
public PointOutsideCoverageException() {
super();
}
/**
* Creates an exception with the specified message.
*
* @param message The detail message. The detail message is saved for later retrieval by the
* {@link #getMessage()} method.
*/
public PointOutsideCoverageException(String message) {
super(message);
}
/**
* Returns the {@linkplain DirectPosition direct position} which is outside the domain of the
* {@linkplain #getCoverage coverage}.
*
* @return The position outside the coverage, or {@code null} if unknown.
* @since GeoAPI 2.2
*/
@Extension
public DirectPosition getOffendingLocation() {
return offendingLocation;
}
/**
* Sets the {@linkplain DirectPosition direct position} which is outside the domain of the
* {@linkplain #getCoverage coverage}.
*
* @param location The position outside the coverage, or {@code null} if unknown.
* @since GeoAPI 2.2
*/
@Extension
public void setOffendingLocation(final DirectPosition location) {
this.offendingLocation = location;
}
}