/**************************************************************************************************
**
** $Id: PathType.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/go/spatial/PathType.java $
**
** Copyright (C) 2003-2005 Open GIS Consortium, Inc.
** All Rights Reserved. http://www.opengis.org/legal/
**
*************************************************************************************************/
package org.opengis.go.spatial;
// J2SE direct dependencies
import java.util.ArrayList;
import java.util.List;
import org.opengis.util.CodeList;
import org.opengis.util.SimpleEnumerationType;
/**
* This class serves as the base class for objects that represent the
* various methods for computing a path between two locations.
* Singleton instances of PathType will exist to represent for example
* a path of constant bearing (rhumbline), or a great circle path.
*
* Path type is an algorithmic sequence of interpolation and projection.
*
* - For rhumbline, great circle, and vector, first
* interpolation is done on the verteces, which gives in-between points.
* These in-between points are then projected into the display space,
* which converts them to display points.
* - For pixel-straight and spline, the verteces are first projected
* into the display space as display points. These display points are interpolated,
* which generates in-between display points.
*
* For each path type, an implementations will iteratively apply the respective algorithms
* until the appropriate display resolution is reached.
*
*
*
* Path Type Interpolation Method
* rhumbline constant bearing
* great circle geodesic
* vector linear in worldspace (interpolation before projection)
* pixel-straight linear in display space (interpolation after projection)
* spline cubic in display space (interpolation after projection)
*
*
*
* @author Open GIS Consortium, Inc.
* @version $Revision: 658 $, $Date: 2006-02-23 12:09:34 +1100 (jeu., 23 févr. 2006) $
*/
public class PathType extends SimpleEnumerationType {
/**
* Serial number for compatibility with different versions.
*/
private static final long serialVersionUID = -5930548969548155096L;
/**
* The list of enumeration available in this virtual machine.
* Must be declared first!.
*
* @todo This field should be private.
*/
protected static final List VALUES = new ArrayList();
/**
* Creates a new PathType with the given value and name.
* @param name the short name for the enum.
* @param description the description for the enum.
*/
protected PathType(String name, String description) {
super(VALUES, name, description);
}
/**
* Returns the list of PathTypes.
*/
public static PathType[] values() {
synchronized (VALUES) {
return (PathType[]) VALUES.toArray(new PathType[VALUES.size()]);
}
}
/**
* Returns the list of enumerations of the same kind than this enum.
*/
public /*{PathType}*/ CodeList[] family() {
return values();
}
}
Ads help maintain this website.