org.geotoolkit.referencing.operation.provider.GeocentricTranslation Maven / Gradle / Ivy
/*
* Geotoolkit.org - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2005-2012, Open Source Geospatial Foundation (OSGeo)
* (C) 2009-2012, Geomatys
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.geotoolkit.referencing.operation.provider;
import net.jcip.annotations.Immutable;
import org.opengis.parameter.ParameterValueGroup;
import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterDescriptorGroup;
import org.opengis.referencing.ReferenceIdentifier;
import org.geotoolkit.parameter.Parameters;
import org.geotoolkit.referencing.datum.BursaWolfParameters;
import org.geotoolkit.referencing.NamedIdentifier;
import org.geotoolkit.metadata.iso.citation.Citations;
/**
* The provider for "Geocentric translation" (EPSG:9603). This is a special
* case of "{@linkplain PositionVector7Param Position Vector 7-param. transformation"}
* where only the translation terms can be set to a non-null value.
*
* In addition to the EPSG parameters, this provider defines some OGC/Geotk-specific parameters.
* Those parameters begin with the {@code "src_"} or {@code "tgt_"} prefix, and modify the math
* transform as below:
*
*
* - If a {@code "src_*"} parameter is present, then an {@link EllipsoidToGeocentric}
* transform will be concatenated before the geocentric translation.
* - If a {@code "tgt_*"} parameter is present, then an {@link GeocentricToEllipsoid}
* transform will be concatenated after the geocentric translation.
*
*
*
* The following table summarizes the parameters recognized by this provider.
* For a more detailed parameter list, see the {@link #PARAMETERS} constant.
* Operation name: {@code Geocentric translations (geog2D domain)}
*
* Parameter name Default value
* {@code dx} 0 metres
* {@code dy} 0 metres
* {@code dz} 0 metres
* {@code src_semi_major}
* {@code src_semi_minor}
* {@code tgt_semi_major}
* {@code tgt_semi_minor}
* {@code src_dim} 2
* {@code tgt_dim} 2
*
*
*
* @author Martin Desruisseaux (IRD, Geomatys)
* @version 3.20
*
* @see Geotk coordinate operations matrix
*
* @since 2.2
* @module
*/
@Immutable
public class GeocentricTranslation extends PositionVector7Param {
/**
* Serial number for inter-operability with different versions.
*/
private static final long serialVersionUID = -7160250630666911608L;
/**
* The group of all parameters expected by this coordinate operation.
* The following table lists the operation names and the parameters recognized by Geotk:
* This is the same group than {@link PositionVector7Param#PARAMETERS} minus the
* {@linkplain #EX ex}, {@linkplain #EY ey}, {@linkplain #EZ ez} and {@linkplain #PPM ppm} parameters.
*
*
*
*
*
* Name: EPSG
:Geocentric translations (geog2D domain)
* Alias: EPSG
:Geocentric Translations
* Identifier: EPSG
:9603
*
*
*
*
* Name: OGC
:dx
* Alias: EPSG
:X-axis translation
*
*
*
* Type: {@code Double}
* Obligation: mandatory
* Value range: (-∞ … ∞) metres
* Default value: 0 metres
*
*
*
*
* Name: OGC
:dy
* Alias: EPSG
:Y-axis translation
*
*
*
* Type: {@code Double}
* Obligation: mandatory
* Value range: (-∞ … ∞) metres
* Default value: 0 metres
*
*
*
*
* Name: OGC
:dz
* Alias: EPSG
:Z-axis translation
*
*
*
* Type: {@code Double}
* Obligation: mandatory
* Value range: (-∞ … ∞) metres
* Default value: 0 metres
*
*
*
*
* Name: OGC
:src_semi_major
*
*
*
* Type: {@code Double}
* Obligation: optional
* Value range: [0…∞) metres
*
*
*
*
* Name: OGC
:src_semi_minor
*
*
*
* Type: {@code Double}
* Obligation: optional
* Value range: [0…∞) metres
*
*
*
*
* Name: OGC
:tgt_semi_major
*
*
*
* Type: {@code Double}
* Obligation: optional
* Value range: [0…∞) metres
*
*
*
*
* Name: OGC
:tgt_semi_minor
*
*
*
* Type: {@code Double}
* Obligation: optional
* Value range: [0…∞) metres
*
*
*
*
* Name: Geotk
:src_dim
*
*
*
* Type: {@code Integer}
* Obligation: optional
* Value range: [2…3]
* Default value: 2
*
*
*
*
* Name: Geotk
:tgt_dim
*
*
*
* Type: {@code Integer}
* Obligation: optional
* Value range: [2…3]
* Default value: 2
*
*
*
*/
@SuppressWarnings("hiding")
public static final ParameterDescriptorGroup PARAMETERS = UniversalParameters.createDescriptorGroup(
new ReferenceIdentifier[] {
new NamedIdentifier(Citations.EPSG, "Geocentric translations (geog2D domain)"),
new NamedIdentifier(Citations.EPSG, "Geocentric Translations"), // Legacy name
new IdentifierCode (Citations.EPSG, 9603)
}, null, new ParameterDescriptor>[] {
DX, DY, DZ,
SRC_SEMI_MAJOR, SRC_SEMI_MINOR,
TGT_SEMI_MAJOR, TGT_SEMI_MINOR,
SRC_DIM, TGT_DIM
}, 0);
/**
* Constructs the provider.
*/
public GeocentricTranslation() {
super(PARAMETERS);
}
/**
* Fills the given Bursa-Wolf parameters according the specified values.
* Only the translation terms are extracted from the given parameter values.
*/
@Override
void fill(final BursaWolfParameters parameters, final ParameterValueGroup values) {
parameters.dx = Parameters.doubleValue(DX, values);
parameters.dy = Parameters.doubleValue(DY, values);
parameters.dz = Parameters.doubleValue(DZ, values);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy