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

The following examples show how to use org.opengis.referencing.operation.Projection#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: DefaultProjectedCRS.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
final AbstractCRS createSameType(final Map<String,?> properties, final CoordinateSystem cs) {
    final Projection conversion = super.getConversionFromBase();
    return new DefaultProjectedCRS(properties, (GeographicCRS) conversion.getSourceCRS(), conversion, (CartesianCS) cs);
}
 
Example 2
Source File: DefaultProjectedCRS.java    From sis with Apache License 2.0 3 votes vote down vote up
/**
 * Returns the geographic CRS on which the map projection is applied.
 * This CRS defines the {@linkplain #getDatum() datum} of this CRS and (at least implicitly)
 * the {@linkplain org.apache.sis.referencing.operation.DefaultConversion#getSourceCRS() source}
 * of the {@linkplain #getConversionFromBase() conversion from base}.
 *
 * @return the base coordinate reference system, which must be geographic.
 */
@Override
@XmlElement(name = "baseGeodeticCRS", required = true)        // Note: older GML version used "baseGeographicCRS".
public GeographicCRS getBaseCRS() {
    final Projection projection = super.getConversionFromBase();
    return (projection != null) ? (GeographicCRS) projection.getSourceCRS() : null;
}