org.opengis.referencing.operation.CoordinateOperationAuthorityFactory 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.
/*
* GeoTools - The Open Source Java GIS Toolkit
* http://geotools.org
*
* (C) 2011, Open Source Geospatial Foundation (OSGeo)
* (C) 2003-2005, Open Geospatial Consortium Inc.
*
* All Rights Reserved. http://www.opengis.org/legal/
*/
package org.opengis.referencing.operation;
import static org.opengis.annotation.Specification.*;
import java.util.Set;
import org.opengis.annotation.UML;
import org.opengis.metadata.Identifier;
import org.opengis.referencing.AuthorityFactory;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
/**
* Creates coordinate transformation objects from codes. The codes are maintained by an external
* authority. A commonly used authority is EPSG, which is also
* used in the GeoTIFF standard.
*
* @version Implementation specification 1.0
* @author Martin Desruisseaux (IRD)
* @since GeoAPI 1.0
*/
@UML(identifier = "CT_CoordinateTransformationAuthorityFactory", specification = OGC_01009)
public interface CoordinateOperationAuthorityFactory extends AuthorityFactory {
/**
* Creates an operation from a single operation code. The "{@linkplain Identifier#getAuthority
* authority}" and "{@linkplain Identifier#getCode code}" values of the created object will be
* set to the authority of this object, and the code specified by the client, respectively. The
* other metadata values may or may not be set.
*
* @param code Coded value for transformation.
* @return The operation for the given code.
* @throws NoSuchAuthorityCodeException if the specified {@code code} was not found.
* @throws FactoryException if the object creation failed for some other reason.
*/
@UML(identifier = "createFromTransformationCode", specification = OGC_01009)
CoordinateOperation createCoordinateOperation(String code)
throws NoSuchAuthorityCodeException, FactoryException;
/**
* Creates operations from {@linkplain CoordinateReferenceSystem coordinate reference system}
* codes. This method returns only the operations declared by the authority, with preferred
* operations first. This method doesn't need to compute operations from {@code source} to
* {@code target} CRS if no such operations were explicitly defined in the authority database.
* Computation of arbitrary operations can be performed by
* {@linkplain CoordinateOperationFactory#createOperation(CoordinateReferenceSystem,
* CoordinateReferenceSystem) CoordinateOperationFactory.createOperation}(sourceCRS, targetCRS)
*
instead.
*
* @param sourceCRS Coded value of source coordinate reference system.
* @param targetCRS Coded value of target coordinate reference system.
* @return The operations from {@code sourceCRS} to {@code targetCRS}.
* @throws NoSuchAuthorityCodeException if a specified code was not found.
* @throws FactoryException if the object creation failed for some other reason.
*/
@UML(identifier = "createFromCoordinateSystemCodes", specification = OGC_01009)
Set createFromCoordinateReferenceSystemCodes(
String sourceCRS, String targetCRS)
throws NoSuchAuthorityCodeException, FactoryException;
}