Package org.apache.sis.referencing.crs
Class DefaultProjectedCRS
Object
FormattableObject
AbstractIdentifiedObject
AbstractReferenceSystem
AbstractCRS
DefaultProjectedCRS
- All Implemented Interfaces:
- Serializable,- Formattable,- Deprecable,- LenientComparable,- CoordinateReferenceSystem,- GeneralDerivedCRS,- ProjectedCRS,- SingleCRS,- IdentifiedObject,- ReferenceSystem
A 2-dimensional coordinate reference system used to approximate the shape of the earth on a planar surface.
 It is done in such a way that the distortion that is inherent to the approximation is carefully controlled and known.
 Distortion correction is commonly applied to calculated bearings and distances to produce values
 that are a close match to actual field values.
 
Used with datum type:
   Geodetic.
 Used with coordinate system type:
   Cartesian.
 
Immutability and thread safety
This class is immutable and thus thread-safe if the property values (not necessarily the map itself), the coordinate system and the datum instances given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if all components were created using only SIS factories and static constants.- Since:
- 0.6
- See Also:
Defined in the sis-referencing module
- 
Field SummaryFields inherited from class AbstractIdentifiedObjectDEPRECATED_KEY, LOCALE_KEYFields inherited from interface IdentifiedObjectALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface ReferenceSystemDOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionDefaultProjectedCRS(Map<String, ?> properties, GeographicCRS baseCRS, Conversion conversion, CartesianCS derivedCS) Creates a projected CRS from a defining conversion.protectedConstructs a new coordinate reference system with the same values than the specified one.
- 
Method SummaryModifier and TypeMethodDescriptionstatic DefaultProjectedCRScastOrCopy(ProjectedCRS object) Returns a SIS coordinate reference system implementation with the same values than the given arbitrary implementation.protected longInvoked byhashCode()for computing the hash code when first needed.booleanequals(Object object, ComparisonMode mode) Compares this coordinate reference system with the specified object for equality.forConvention(AxesConvention convention) Returns a coordinate reference system equivalent to this one but with axes rearranged according the given convention.protected StringFormats the inner part of the Well Known Text (WKT) representation of this CRS.Returns the geographic CRS on which the map projection is applied.Returns the map projection from the base CRS to this CRS.final CartesianCSReturns the coordinate system.Returns the datum of the base CRS.Class<? extends ProjectedCRS>Returns the GeoAPI interface implemented by this class.Methods inherited from class AbstractCRScastOrCopyMethods inherited from class AbstractReferenceSystemgetDomainOfValidity, getScopeMethods inherited from class AbstractIdentifiedObjectcastOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameMethods inherited from class FormattableObjectprint, toString, toString, toWKTMethods inherited from class Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface IdentifiedObjectgetAlias, getIdentifiers, getName, getRemarks, toWKTMethods inherited from interface ReferenceSystemgetDomainOfValidity, getScope
- 
Constructor Details- 
DefaultProjectedCRSpublic DefaultProjectedCRS(Map<String, ?> properties, GeographicCRS baseCRS, Conversion conversion, CartesianCS derivedCS) throws MismatchedDimensionExceptionCreates a projected CRS from a defining conversion. The properties given in argument follow the same rules than for the super-class constructor. The following table is a reminder of main (not all) properties:
 The suppliedRecognized properties (non exhaustive list) Property name Value type Returned by "name" IdentifierorStringAbstractIdentifiedObject.getName()"alias" GenericNameorCharSequence(optionally as array)AbstractIdentifiedObject.getAlias()"identifiers" Identifier(optionally as array)AbstractIdentifiedObject.getIdentifiers()"remarks" InternationalStringorStringAbstractIdentifiedObject.getRemarks()"domainOfValidity" ExtentAbstractReferenceSystem.getDomainOfValidity()"scope" InternationalStringorStringAbstractReferenceSystem.getScope()conversionargument shall not includes the operation steps for performing unit conversions and change of axis order since those operations will be inferred by this constructor.- Parameters:
- properties- the properties to be given to the new derived CRS object.
- baseCRS- coordinate reference system to base the derived CRS on.
- conversion- the defining conversion from a normalized base to a normalized derived CRS.
- derivedCS- the coordinate system for the derived CRS. The number of axes must match the target dimension of the- baseToDerivedtransform.
- Throws:
- MismatchedDimensionException- if the source and target dimensions of- baseToDeriveddo not match the dimensions of- baseand- derivedCSrespectively.
- See Also:
 
- 
DefaultProjectedCRSConstructs a new coordinate reference system with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.This constructor performs a shallow copy, i.e. the properties are not cloned. - Parameters:
- crs- the coordinate reference system to copy.
- See Also:
 
 
- 
- 
Method Details- 
castOrCopyReturns a SIS coordinate reference system implementation with the same values than the given arbitrary implementation. If the given object isnull, then this method returnsnull. Otherwise if the given object is already a SIS implementation, then the given object is returned unchanged. Otherwise a new SIS implementation is created and initialized to the attribute values of the given object.- Parameters:
- object- the object to get as a SIS implementation, or- nullif none.
- Returns:
- a SIS implementation containing the values of the given object (may be the
         given object itself), or nullif the argument was null.
 
- 
getInterfaceReturns the GeoAPI interface implemented by this class. The SIS implementation returnsProjectedCRS.class.Note for implementers: Subclasses usually do not need to override this method since GeoAPI does not defineProjectedCRSsub-interface. Overriding possibility is left mostly for implementers who wish to extend GeoAPI with their own set of interfaces.- Returns:
- ProjectedCRS.classor a user-defined sub-interface.
 
- 
getDatumReturns the datum of the base CRS.- Specified by:
- getDatumin interface- ProjectedCRS
- Specified by:
- getDatumin interface- SingleCRS
- Returns:
- the datum of the base CRS.
 
- 
getBaseCRSReturns the geographic CRS on which the map projection is applied. This CRS defines the datum of this CRS and (at least implicitly) the source of the conversion from base.- Specified by:
- getBaseCRSin interface- GeneralDerivedCRS
- Specified by:
- getBaseCRSin interface- ProjectedCRS
- Returns:
- the base coordinate reference system, which must be geographic.
 
- 
getConversionFromBaseReturns the map projection from the base CRS to this CRS. In Apache SIS, the conversion source and target CRS are set to the following values:- The conversion source CRS is the base CRS of thisCRS.
- The conversion target CRS is thisCRS.
 Note: This is different than ISO 19111, which allows source and target CRS to benull.- Specified by:
- getConversionFromBasein interface- GeneralDerivedCRS
- Specified by:
- getConversionFromBasein interface- ProjectedCRS
- Returns:
- the map projection from base CRS to this CRS.
 
- The conversion source CRS is the base CRS of 
- 
getCoordinateSystemReturns the coordinate system.- Specified by:
- getCoordinateSystemin interface- CoordinateReferenceSystem
- Specified by:
- getCoordinateSystemin interface- ProjectedCRS
- Specified by:
- getCoordinateSystemin interface- SingleCRS
- Overrides:
- getCoordinateSystemin class- AbstractCRS
- Returns:
- the coordinate system.
 
- 
forConventionReturns a coordinate reference system equivalent to this one but with axes rearranged according the given convention. If this CRS is already compatible with the given convention, then this method returnsthis.- Overrides:
- forConventionin class- AbstractCRS
- Parameters:
- convention- the axes convention for which a coordinate reference system is desired.
- Returns:
- a coordinate reference system compatible with the given convention (may be this).
- See Also:
 
- 
equalsCompares this coordinate reference system with the specified object for equality. In addition to the metadata documented in the parent class, this method considers coordinate system axes of the base CRS as metadata. This means that if the givenComparisonModeisIGNORE_METADATAorAPPROXIMATE, then axis order of the base geographic CRS are ignored (but not axis order of this projected CRS).- Specified by:
- equalsin interface- LenientComparable
- Parameters:
- object- the object to compare to- this.
- mode-- STRICTfor performing a strict comparison, or- IGNORE_METADATAfor comparing only properties relevant to coordinate transformations.
- Returns:
- trueif both objects are equal.
- See Also:
 
- 
computeHashCodeprotected long computeHashCode()Invoked byhashCode()for computing the hash code when first needed. SeeAbstractIdentifiedObject.computeHashCode()for more information.- Returns:
- the hash code value. This value may change in any future Apache SIS version.
 
- 
formatToFormats the inner part of the Well Known Text (WKT) representation of this CRS.Example: Well-Known Text (version 2) of a projected coordinate reference system using the Lambert Conformal method.ProjectedCRS[“NTF (Paris) / Lambert zone II”, BaseGeodCRS[“NTF (Paris)”, Datum[“Nouvelle Triangulation Francaise”, Ellipsoid[“NTF”, 6378249.2, 293.4660212936269, LengthUnit[“metre”, 1]]], PrimeMeridian[“Paris”, 2.5969213, AngleUnit[“grad”, 0.015707963267948967]]], Conversion[“Lambert zone II”, Method[“Lambert Conic Conformal (1SP)”, Id[“EPSG”, 9801, Citation[“IOGP”]]], Parameter[“Latitude of natural origin”, 52.0, AngleUnit[“grad”, 0.015707963267948967], Id[“EPSG”, 8801]], Parameter[“Longitude of natural origin”, 0.0, AngleUnit[“degree”, 0.017453292519943295], Id[“EPSG”, 8802]], Parameter[“Scale factor at natural origin”, 0.99987742, ScaleUnit[“unity”, 1], Id[“EPSG”, 8805]], Parameter[“False easting”, 600000.0, LengthUnit[“metre”, 1], Id[“EPSG”, 8806]], Parameter[“False northing”, 2200000.0, LengthUnit[“metre”, 1], Id[“EPSG”, 8807]]], CS[“Cartesian”, 2], Axis[“Easting (E)”, east, Order[1]], Axis[“Northing (N)”, north, Order[2]], LengthUnit[“metre”, 1], Id[“EPSG”, 27572, Citation[“IOGP”], URI[“urn:ogc:def:crs:EPSG::27572”]]]Same coordinate reference system using WKT 1. PROJCS[“NTF (Paris) / Lambert zone II”, GEOGCS[“NTF (Paris)”, DATUM[“Nouvelle Triangulation Francaise”, SPHEROID[“NTF”, 6378249.2, 293.4660212936269]], PRIMEM[“Paris”, 2.33722917], UNIT[“degree”, 0.017453292519943295], AXIS[“Longitude”, EAST], AXIS[“Latitude”, NORTH]], PROJECTION[“Lambert_Conformal_Conic_1SP”, AUTHORITY[“EPSG”, “9801”]], PARAMETER[“latitude_of_origin”, 46.8], PARAMETER[“central_meridian”, 0.0], PARAMETER[“scale_factor”, 0.99987742], PARAMETER[“false_easting”, 600000.0], PARAMETER[“false_northing”, 2200000.0], UNIT[“metre”, 1], AXIS[“Easting”, EAST], AXIS[“Northing”, NORTH], AUTHORITY[“EPSG”, “27572”]]- Overrides:
- formatToin class- AbstractCRS
- Parameters:
- formatter- the formatter where to format the inner content of this WKT element.
- Returns:
- "ProjectedCRS"(WKT 2) or- "ProjCS"(WKT 1).
- See Also:
 
 
-