001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2004, Institut de Recherche pour le Développement
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * This package contains documentation from OpenGIS specifications.
018: * OpenGIS consortium's work is fully acknowledged here.
019: */
020: package org.geotools.referencing.cs;
021:
022: // J2SE dependencies
023: import java.util.Map;
024:
025: // OpenGIS dependencies
026: import org.opengis.referencing.cs.UserDefinedCS;
027: import org.opengis.referencing.cs.CoordinateSystemAxis;
028:
029: /**
030: * A two- or three-dimensional coordinate system that consists of any combination of coordinate
031: * axes not covered by any other Coordinate System type. An example is a multilinear coordinate
032: * system which contains one coordinate axis that may have any 1-D shape which has no intersections
033: * with itself. This non-straight axis is supplemented by one or two straight axes to complete a 2
034: * or 3 dimensional coordinate system. The non-straight axis is typically incrementally straight or
035: * curved. A {@code UserDefinedCS} shall have two or three
036: * {@linkplain #getAxis axis}.
037: *
038: * @since 2.1
039: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/cs/DefaultUserDefinedCS.java $
040: * @version $Id: DefaultUserDefinedCS.java 20874 2006-08-07 10:00:01Z jgarnett $
041: * @author Martin Desruisseaux
042: */
043: public class DefaultUserDefinedCS extends AbstractCS implements
044: UserDefinedCS {
045: /**
046: * Serial number for interoperability with different versions.
047: */
048: private static final long serialVersionUID = -4904091898305706316L;
049:
050: /**
051: * Constructs a new coordinate system with the same values than the specified one.
052: * This copy constructor provides a way to wrap an arbitrary implementation into a
053: * Geotools one or a user-defined one (as a subclass), usually in order to leverage
054: * some implementation-specific API. This constructor performs a shallow copy,
055: * i.e. the properties are not cloned.
056: *
057: * @since 2.2
058: */
059: public DefaultUserDefinedCS(final UserDefinedCS cs) {
060: super (cs);
061: }
062:
063: /**
064: * Constructs a two-dimensional coordinate system from a name.
065: *
066: * @param name The coordinate system name.
067: * @param axis0 The first axis.
068: * @param axis1 The second axis.
069: */
070: public DefaultUserDefinedCS(final String name,
071: final CoordinateSystemAxis axis0,
072: final CoordinateSystemAxis axis1) {
073: super (name, new CoordinateSystemAxis[] { axis0, axis1 });
074: }
075:
076: /**
077: * Constructs a three-dimensional coordinate system from a name.
078: *
079: * @param name The coordinate system name.
080: * @param axis0 The first axis.
081: * @param axis1 The second axis.
082: * @param axis2 The third axis.
083: */
084: public DefaultUserDefinedCS(final String name,
085: final CoordinateSystemAxis axis0,
086: final CoordinateSystemAxis axis1,
087: final CoordinateSystemAxis axis2) {
088: super (name, new CoordinateSystemAxis[] { axis0, axis1, axis2 });
089: }
090:
091: /**
092: * Constructs a two-dimensional coordinate system from a set of properties.
093: * The properties map is given unchanged to the
094: * {@linkplain AbstractCS#AbstractCS(Map,CoordinateSystemAxis[]) super-class constructor}.
095: *
096: * @param properties Set of properties. Should contains at least <code>"name"</code>.
097: * @param axis0 The first axis.
098: * @param axis1 The second axis.
099: */
100: public DefaultUserDefinedCS(final Map properties,
101: final CoordinateSystemAxis axis0,
102: final CoordinateSystemAxis axis1) {
103: super (properties, new CoordinateSystemAxis[] { axis0, axis1 });
104: }
105:
106: /**
107: * Constructs a three-dimensional coordinate system from a set of properties.
108: * The properties map is given unchanged to the
109: * {@linkplain AbstractCS#AbstractCS(Map,CoordinateSystemAxis[]) super-class constructor}.
110: *
111: * @param properties Set of properties. Should contains at least <code>"name"</code>.
112: * @param axis0 The first axis.
113: * @param axis1 The second axis.
114: * @param axis2 The third axis.
115: */
116: public DefaultUserDefinedCS(final Map properties,
117: final CoordinateSystemAxis axis0,
118: final CoordinateSystemAxis axis1,
119: final CoordinateSystemAxis axis2) {
120: super (properties, new CoordinateSystemAxis[] { axis0, axis1,
121: axis2 });
122: }
123: }
|