Java Code Examples for org.opengis.referencing.operation.Conversion#getSourceCRS()

The following examples show how to use org.opengis.referencing.operation.Conversion#getSourceCRS() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultDerivedCRS.java    From sis with Apache License 2.0 4 votes vote down vote up
/**
 * Returns a coordinate reference system of the same type than this CRS but with different axes.
 */
@Override
AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
    final Conversion conversionFromBase = super.getConversionFromBase();
    return new DefaultDerivedCRS(properties, (SingleCRS) conversionFromBase.getSourceCRS(), conversionFromBase, derivedCS);
}
 
Example 2
Source File: DefaultDerivedCRS.java    From sis with Apache License 2.0 4 votes vote down vote up
/** Returns a coordinate reference system of the same type than this CRS but with different axes. */
@Override AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
    final Conversion conversionFromBase = getConversionFromBase();
    return new Geodetic(properties, (GeodeticCRS) conversionFromBase.getSourceCRS(),
            conversionFromBase, derivedCS);
}
 
Example 3
Source File: DefaultDerivedCRS.java    From sis with Apache License 2.0 4 votes vote down vote up
/** Returns a coordinate reference system of the same type than this CRS but with different axes. */
@Override AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
    final Conversion conversionFromBase = getConversionFromBase();
    return new Vertical(properties, (VerticalCRS) conversionFromBase.getSourceCRS(),
            conversionFromBase, (VerticalCS) derivedCS);
}
 
Example 4
Source File: DefaultDerivedCRS.java    From sis with Apache License 2.0 4 votes vote down vote up
/** Returns a coordinate reference system of the same type than this CRS but with different axes. */
@Override AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
    final Conversion conversionFromBase = getConversionFromBase();
    return new Temporal(properties, (TemporalCRS) conversionFromBase.getSourceCRS(),
            conversionFromBase, (TimeCS) derivedCS);
}
 
Example 5
Source File: DefaultDerivedCRS.java    From sis with Apache License 2.0 4 votes vote down vote up
/** Returns a coordinate reference system of the same type than this CRS but with different axes. */
@Override AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
    final Conversion conversionFromBase = getConversionFromBase();
    return new Parametric(properties, (ParametricCRS) conversionFromBase.getSourceCRS(),
            conversionFromBase, (DefaultParametricCS) derivedCS);
}
 
Example 6
Source File: DefaultDerivedCRS.java    From sis with Apache License 2.0 4 votes vote down vote up
/** Returns a coordinate reference system of the same type than this CRS but with different axes. */
@Override AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem derivedCS) {
    final Conversion conversionFromBase = getConversionFromBase();
    return new Engineering(properties, (EngineeringCRS) conversionFromBase.getSourceCRS(), conversionFromBase, derivedCS);
}
 
Example 7
Source File: TransformTestCase.java    From sis with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the inverse of the given conversion. This method is not strictly correct
 * since we reuse the properties (name, aliases, etc.) from the given conversion.
 * However those properties are not significant for the purpose of this test.
 */
private static Conversion inverse(final Conversion conversion) throws NoninvertibleTransformException {
    return new DefaultConversion(IdentifiedObjects.getProperties(conversion), conversion.getTargetCRS(),
            conversion.getSourceCRS(), null, conversion.getMethod(), conversion.getMathTransform().inverse());
}