/*$************************************************************************************************
**
** $Id: CoordinateOperationFactory.java 831 2006-05-01 00:27:23Z Desruisseaux $
**
** $URL: http://svn.code.sf.net/p/geoapi/code/branches/2.0.x/geoapi/src/main/java/org/opengis/referencing/operation/CoordinateOperationFactory.java $
**
** Copyright (C) 2003-2005 Open GIS Consortium, Inc.
** All Rights Reserved. http://www.opengis.org/legal/
**
*************************************************************************************************/
package org.opengis.referencing.operation;
// J2SE dependencies
import java.util.Map;
// OpenGIS dependencies
import org.opengis.referencing.ObjectFactory;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
// Annotations
import org.opengis.annotation.UML;
import org.opengis.annotation.Extension;
import static org.opengis.annotation.Obligation.*;
import static org.opengis.annotation.Specification.*;
/**
* Creates {@linkplain CoordinateOperation coordinate operations}.
* This factory is capable to find coordinate {@linkplain Transformation transformations}
* or {@linkplain Conversion conversions} between two
* {@linkplain CoordinateReferenceSystem coordinate reference systems}.
*
* @version Implementation specification 1.0
* @author Open Geospatial Consortium
* @author Martin Desruisseaux (IRD)
* @since GeoAPI 1.0
*/
@UML(identifier="CT_CoordinateTransformationFactory", specification=OGC_01009)
public interface CoordinateOperationFactory extends ObjectFactory {
/**
* Returns an operation for conversion or transformation between two coordinate reference systems.
* If an operation exists, it is returned. If more than one operation exists, the default is returned.
* If no operation exists, then the exception is thrown.
*
* @param sourceCRS Input coordinate reference system.
* @param targetCRS Output coordinate reference system.
* @return A coordinate operation from {@code sourceCRS} to {@code targetCRS}.
* @throws OperationNotFoundException if no operation path was found from {@code sourceCRS}
* to {@code targetCRS}.
* @throws FactoryException if the operation creation failed for some other reason.
*/
@UML(identifier="createFromCoordinateSystems", specification=OGC_01009)
CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS)
throws OperationNotFoundException, FactoryException;
/**
* Returns an operation using a particular method for conversion or transformation
* between two coordinate reference systems.
* If the operation exists on the implementation, then it is returned.
* If the operation does not exist on the implementation, then the implementation has the option
* of inferring the operation from the argument objects.
* If for whatever reason the specified operation will not be returned, then the exception is thrown.
*
* @param sourceCRS Input coordinate reference system.
* @param targetCRS Output coordinate reference system.
* @param method the algorithmic method for conversion or transformation
* @return A coordinate operation from {@code sourceCRS} to {@code targetCRS}.
* @throws OperationNotFoundException if no operation path was found from {@code sourceCRS}
* to {@code targetCRS}.
* @throws FactoryException if the operation creation failed for some other reason.
*
* @todo More than one operation step may be involved in the path from {@code sourceCRS}
* to {@code targetCRS}, but this method has only one {@code method} argument.
* The user could have more fine grain control with {@link MathTransformFactory} (ported
* from OGC 2001-09).
*/
@Extension
CoordinateOperation createOperation(CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem targetCRS,
OperationMethod method)
throws OperationNotFoundException, FactoryException;
/**
* Creates a concatenated operation from a sequence of operations.
*
* @param properties Name and other properties to give to the new object.
* Available properties are {@linkplain ObjectFactory listed there}.
* @param operations The sequence of operations.
* @return The concatenated operation.
* @throws FactoryException if the object creation failed.
*/
@Extension
CoordinateOperation createConcatenatedOperation(Map properties,
CoordinateOperation[] operations)
throws FactoryException;
}
Ads help maintain this website.