Package org.apache.sis.openoffice
Class ReferencingFunctions
Object
WeakBase
CalcAddins
ReferencingFunctions
- All Implemented Interfaces:
- XLocalizable,- XServiceInfo,- XServiceName,- XTypeProvider,- XInterface,- XWeak,- XReferencing
Implements the 
XReferencing methods to make available to Apache OpenOffice.- Since:
- 0.8
Defined in the sis-openoffice module
- 
Field SummaryFields inherited from class CalcAddinscontextFields inherited from class WeakBase_mapTypesFields inherited from interface XLocalizableUNOTYPEINFOFields inherited from interface XServiceInfoUNOTYPEINFOFields inherited from interface XServiceNameUNOTYPEINFOFields inherited from interface XTypeProviderUNOTYPEINFOFields inherited from interface XWeakUNOTYPEINFO
- 
Constructor SummaryConstructorsConstructorDescriptionReferencingFunctions(XComponentContext context) Constructs an implementation ofXReferencinginterface.
- 
Method SummaryModifier and TypeMethodDescriptionString[][]formatAngle(double[][] value, Object pattern, Object locale) Converts an angle to text according to a given format.doublegetAccuracy(String sourceCRS, String targetCRS, Object areaOfInterest) Returns the accuracy of a transformation between two coordinate reference systems.Returns the axis name and units for the specified dimension in a coordinate reference system or coordinate system.getDomainOfValidity(String codeOrPath) Returns the domain of validity from an authority code.double[][]getGeographicArea(String codeOrPath) Returns the domain of validity as a geographic bounding box for an identified object.Provides the implementation name of the service.Returns the identified object name from an authority code.Returns the identified object scope from an authority code.The service name that can be used to create such an object by a factory.double[][]parseAngle(String[][] text, Object pattern, Object locale) Converts text in degrees-minutes-seconds to an angle in decimal degrees.double[][]transformEnvelope(String sourceCRS, String targetCRS, double[][] envelope) Transforms an envelope from the specified source CRS to the specified target CRS.double[][]transformPoints(String sourceCRS, String targetCRS, double[][] points) Transforms coordinates from the specified source CRS to the specified target CRS.Methods inherited from class CalcAddinsgetJavaLocale, getLocale, getLocalizedMessage, getLogger, getSupportedServiceNames, setLocale, supportsServiceMethods inherited from class WeakBasefinalize, getImplementationId, getTypes, queryAdapter
- 
Constructor Details- 
ReferencingFunctionspublic ReferencingFunctions(XComponentContext context) Constructs an implementation ofXReferencinginterface.- Parameters:
- context- the value to assign to the- CalcAddins.contextfield.
 
 
- 
- 
Method Details- 
getServiceNameThe service name that can be used to create such an object by a factory.- Specified by:
- getServiceNamein interface- XServiceName
- Specified by:
- getServiceNamein class- CalcAddins
- Returns:
- unique name of the service.
 
- 
getImplementationNameProvides the implementation name of the service.- Specified by:
- getImplementationNamein interface- XServiceInfo
- Returns:
- unique name of the implementation.
 
- 
getNameReturns the identified object name from an authority code.- Specified by:
- getNamein interface- XReferencing
- Parameters:
- codeOrPath- the code allocated by an authority, or the path to a file.
- Returns:
- the object name.
 
- 
getScopeReturns the identified object scope from an authority code.- Specified by:
- getScopein interface- XReferencing
- Parameters:
- codeOrPath- the code allocated by an authority, or the path to a file.
- Returns:
- the object scope.
 
- 
getDomainOfValidityReturns the domain of validity from an authority code.- Specified by:
- getDomainOfValidityin interface- XReferencing
- Parameters:
- codeOrPath- the code allocated by an authority, or the path to a file.
- Returns:
- the domain of validity.
 
- 
getGeographicAreaReturns the domain of validity as a geographic bounding box for an identified object. This method returns a 2×2 matrix: the first row contains the latitude and longitude of upper left corner, and the second row contains the latitude and longitude of bottom right corner. Units are degrees.- Specified by:
- getGeographicAreain interface- XReferencing
- Parameters:
- codeOrPath- the code allocated by an authority, or the path to a file.
- Returns:
- the object bounding box.
 
- 
getAxisReturns the axis name and units for the specified dimension in a coordinate reference system or coordinate system. This method returns a short axis name as used in Well Known Text (WKT) format, for example "Latitude" instead of "Geodetic latitude".- Specified by:
- getAxisin interface- XReferencing
- Parameters:
- codeOrPath- the code allocated by an authority, or the path to a file.
- dimension- the dimension (1, 2, …).
- Returns:
- the name of the requested axis.
 
- 
getAccuracypublic double getAccuracy(String sourceCRS, String targetCRS, Object areaOfInterest) throws IllegalArgumentException Returns the accuracy of a transformation between two coordinate reference systems.- Specified by:
- getAccuracyin interface- XReferencing
- Parameters:
- sourceCRS- the authority code for the source coordinate reference system.
- targetCRS- the authority code for the target coordinate reference system.
- areaOfInterest- an optional bounding box of source coordinates to transform.
- Returns:
- the operation accuracy.
- Throws:
- IllegalArgumentException- if- pointsis not a- double[][]value or void.
 
- 
transformPointsTransforms coordinates from the specified source CRS to the specified target CRS.- Specified by:
- transformPointsin interface- XReferencing
- Parameters:
- sourceCRS- the authority code for the source coordinate reference system.
- targetCRS- the authority code for the target coordinate reference system.
- points- the coordinates to transform.
- Returns:
- the transformed coordinates.
 
- 
transformEnvelopeTransforms an envelope from the specified source CRS to the specified target CRS.- Specified by:
- transformEnvelopein interface- XReferencing
- Parameters:
- sourceCRS- the authority code for the source coordinate reference system.
- targetCRS- the authority code for the target coordinate reference system.
- envelope- points inside the envelope to transform.
- Returns:
- the transformed envelope.
 
- 
parseAnglepublic double[][] parseAngle(String[][] text, Object pattern, Object locale) throws IllegalArgumentException Converts text in degrees-minutes-seconds to an angle in decimal degrees. SeeAngleFormatfor pattern description.- Specified by:
- parseAnglein interface- XReferencing
- Parameters:
- text- the text to be converted to an angle.
- pattern- an optional text that describes the format (example: "D°MM.m'").
- locale- the convention to use (e.g. decimal separator symbol).
- Returns:
- the angle parsed as a number.
- Throws:
- IllegalArgumentException- if- patternis not a string value or void.
 
- 
formatAnglepublic String[][] formatAngle(double[][] value, Object pattern, Object locale) throws IllegalArgumentException Converts an angle to text according to a given format. This method uses the pattern described byAngleFormatwith the following extension:- If the pattern ends with E or W, then the angle is formatted as a longitude.
- If the pattern ends with N or S, then the angle is formatted as a latitude.
 - Specified by:
- formatAnglein interface- XReferencing
- Parameters:
- value- the angle value (in decimal degrees) to be converted.
- pattern- an optional text that describes the format (example: "D°MM.m'").
- locale- the convention to use (e.g. decimal separator symbol).
- Returns:
- the angle formatted as a string.
- Throws:
- IllegalArgumentException- if- patternis not a string value or void.
 
 
-