001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.openoffice;
017:
018: // OpenOffice dependencies
019: import com.sun.star.uno.XInterface;
020: import com.sun.star.beans.XPropertySet;
021: import com.sun.star.lang.IllegalArgumentException;
022:
023: /**
024: * Services from the {@link org.geotools.referencing} package to be exported to
025: * <A HREF="http://www.openoffice.org">OpenOffice</A>.
026: *
027: * This interface is derived from the {@code XReferencing.idl} file using the {@code javamaker}
028: * tool provided in OpenOffice SDK, and disassembling the output using the {@code javap} tool
029: * provided in Java SDK. This source file exists mostly for javadoc purpose and in order to keep
030: * IDE happy. The {@code .class} file compiled from this source file <strong>MUST</strong> be
031: * overwritten by the {@code .class} file generated by {@code javamaker}.
032: *
033: * @since 2.2
034: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/extension/openoffice/src/main/java/org/geotools/openoffice/XReferencing.java $
035: * @version $Id: XReferencing.java 20771 2006-07-31 12:52:44Z jgarnett $
036: * @author Martin Desruisseaux
037: */
038: public interface XReferencing extends XInterface {
039: /**
040: * Converts text in degrees-minutes-seconds to an angle in decimal degrees.
041: *
042: * @param xOptions Provided by OpenOffice.
043: * @param text The text to be converted to an angle.
044: * @param pattern The text that describes the format (example: "D°MM.m'").
045: * @throws IllegalArgumentException if {@code pattern} is illegal.
046: */
047: double getValueAngle(XPropertySet xOptions, String text,
048: Object pattern) throws IllegalArgumentException;
049:
050: /**
051: * Converts an angle to text according to a given format.
052: *
053: * @param xOptions Provided by OpenOffice.
054: * @param value The angle value (in decimal degrees) to be converted.
055: * @param pattern The text that describes the format (example: "D°MM.m'").
056: * @throws IllegalArgumentException if {@code pattern} is illegal.
057: */
058: String getTextAngle(XPropertySet xOptions, double value,
059: Object pattern) throws IllegalArgumentException;
060:
061: /**
062: * Converts a longitude to text according to a given format.
063: *
064: * @param xOptions Provided by OpenOffice.
065: * @param value The longitude value (in decimal degrees) to be converted.
066: * @param pattern The text that describes the format (example: "D°MM.m'").
067: * @throws IllegalArgumentException if {@code pattern} is illegal.
068: */
069: String getTextLongitude(XPropertySet xOptions, double value,
070: Object pattern) throws IllegalArgumentException;
071:
072: /**
073: * Converts a latitude to text according to a given format.
074: *
075: * @param xOptions Provided by OpenOffice.
076: * @param value The latitude value (in decimal degrees) to be converted.
077: * @param pattern The text that describes the format (example: "D°MM.m'").
078: * @throws IllegalArgumentException if {@code pattern} is illegal.
079: */
080: String getTextLatitude(XPropertySet xOptions, double value,
081: Object pattern) throws IllegalArgumentException;
082:
083: /**
084: * Returns the identified object description from an authority code.
085: *
086: * @param xOptions Provided by OpenOffice.
087: * @param authorityCode The code allocated by the authority.
088: */
089: String getDescription(XPropertySet xOptions, String authorityCode);
090:
091: /**
092: * Returns the scope for an identified object.
093: *
094: * @param xOptions Provided by OpenOffice.
095: * @param authorityCode The code allocated by the authority.
096: */
097: String getScope(XPropertySet xOptions, String authorityCode);
098:
099: /**
100: * Returns the valid area as a textual description for an identified object.
101: *
102: * @param xOptions Provided by OpenOffice.
103: * @param authorityCode The code allocated by the authority.
104: */
105: String getValidArea(XPropertySet xOptions, String authorityCode);
106:
107: /**
108: * Returns the valid area as a geographic bounding box for an identified object. This method
109: * returns a 2×2 matrix. The first row contains the latitude and longitude of upper left
110: * corder, and the second row contains the latitude and longitude or bottom right corner. Units
111: * are degrees.
112: *
113: * @param xOptions Provided by OpenOffice.
114: * @param authorityCode The code allocated by the authority.
115: */
116: double[][] getBoundingBox(XPropertySet xOptions,
117: String authorityCode);
118:
119: /**
120: * Returns the remarks for an identified object.
121: *
122: * @param xOptions Provided by OpenOffice.
123: * @param authorityCode The code allocated by the authority.
124: */
125: String getRemarks(XPropertySet xOptions, String authorityCode);
126:
127: /**
128: * Returns the axis name for the specified dimension in an identified object.
129: *
130: * @param xOptions Provided by OpenOffice.
131: * @param authorityCode The code allocated by the authority.
132: * @param dimension The dimension (1, 2, ...).
133: */
134: String getAxis(XPropertySet xOptions, String authorityCode,
135: int dimension);
136:
137: /**
138: * Returns the value for a coordinate reference system parameter.
139: *
140: * @param xOptions Provided by OpenOffice.
141: * @param authorityCode The code allocated by the authority.
142: * @param parameter The parameter name (e.g. "False easting").
143: */
144: Object getParameter(XPropertySet xOptions, String authorityCode,
145: String parameter);
146:
147: /**
148: * Returns the Well Know Text (WKT) for an identified object.
149: *
150: * @param xOptions Provided by OpenOffice.
151: * @param authorityCode The code allocated by the authority.
152: * @param authority The authority name for choice of parameter names. Usually "OGC".
153: */
154: String getWKT(XPropertySet xOptions, String authorityCode,
155: Object authority);
156:
157: /**
158: * Returns the Well Know Text (WKT) of a transformation between two coordinate reference
159: * systems.
160: *
161: * @param xOptions Provided by OpenOffice.
162: * @param sourceCRS The authority code for the source coordinate reference system.
163: * @param targetCRS The authority code for the target coordinate reference system.
164: * @param authority The authority name for choice of parameter names. Usually "OGC".
165: */
166: String getTransformWKT(XPropertySet xOptions, String sourceCRS,
167: String targetCRS, Object authority);
168:
169: /**
170: * Returns the accuracy of a transformation between two coordinate reference systems.
171: *
172: * @param xOptions Provided by OpenOffice.
173: * @param sourceCRS The authority code for the source coordinate reference system.
174: * @param targetCRS The authority code for the target coordinate reference system.
175: */
176: double getAccuracy(XPropertySet xOptions, String sourceCRS,
177: String targetCRS);
178:
179: /**
180: * Transforms coordinates from the specified source CRS to the specified target CRS.
181: *
182: * @param xOptions Provided by OpenOffice.
183: * @param coordinates The coordinates to transform.
184: * @param sourceCRS The authority code for the source coordinate reference system.
185: * @param targetCRS The authority code for the target coordinate reference system.
186: */
187: double[][] getTransformedCoordinates(XPropertySet xOptions,
188: double[][] coordinates, String sourceCRS, String targetCRS);
189:
190: /**
191: * Computes the orthodromic distance and azimuth between two coordinates.
192: *
193: * @param xOptions Provided by OpenOffice.
194: * @param source The source positions.
195: * @param target The target positions.
196: * @param CRS Authority code of the coordinate reference system.
197: */
198: double[][] getOrthodromicDistance(XPropertySet xOptions,
199: double[][] source, double[][] target, Object CRS);
200:
201: /**
202: * Computes the coordinates after a displacement of the specified distance.
203: *
204: * @param xOptions Provided by OpenOffice.
205: * @param source The source positions.
206: * @param displacement The distance and azimuth.
207: * @param CRS Authority code of the coordinate reference system.
208: */
209: double[][] getOrthodromicForward(XPropertySet xOptions,
210: double[][] source, double[][] displacement, Object CRS);
211: }
|