Revision 817 org.gvsig.proj/branches/refactor2018/org.gvsig.proj/org.gvsig.proj.catalog/org.gvsig.proj.catalog.api/src/main/java/org/gvsig/proj/catalog/CRSDefinition.java
CRSDefinition.java | ||
---|---|---|
221 | 221 |
* @return the datum |
222 | 222 |
*/ |
223 | 223 |
Datum getDatum(); |
224 |
|
|
225 |
/** |
|
226 |
* Calculates the distance between 2 points on the surface of the Earth. |
|
227 |
* |
|
228 |
* The distances are calculated based on the characteristics of CRSDefinition, |
|
229 |
* using geodetic distances when possible. Geodetic distances offer highly |
|
230 |
* accurate measurements and are based on the exact shape of the ellipsoid. |
|
231 |
* |
|
232 |
* If this CRSDefinition is projected, then the geodetic calculations are done |
|
233 |
* using its base (geographic) CRS. If this CRSDefinition is not geodetic nor |
|
234 |
* projected, then Euclidean distances are calculated. |
|
235 |
* |
|
236 |
* The provided points are considered to be 2D points |
|
237 |
* (additional dimensions are ignored). |
|
238 |
* |
|
239 |
* @param point1 |
|
240 |
* @param point2 |
|
241 |
* @param the unit in which the distance should be measure |
|
242 |
* |
|
243 |
* @return The distance between point1 and point2 measured in the units |
|
244 |
* provided by the unit parameter. |
|
245 |
*/ |
|
246 |
double getDistance(double[] point1, double[] point2, Unit<Length> unit); |
|
247 |
|
|
248 |
/** |
|
249 |
* Calculates the distance between 2 points on the surface of the Earth. |
|
250 |
* |
|
251 |
* If this CRS is projected and useBaseCRS is <code>false</code>, then |
|
252 |
* the Euclidean distance is calculated. If the CRS is projected and |
|
253 |
* <code>useBaseCRS</code> is <code>true<code>, then the |
|
254 |
* geodetic distance is calculated, using its base (geographic) CRS. |
|
255 |
* |
|
256 |
* If the CRS is geodetic, then the geodetic distance is calculated. |
|
257 |
* If the CRS is not projected nor geometric, then the Euclidean distance |
|
258 |
* is calculated. |
|
259 |
* |
|
260 |
* Geodetic distances offer highly accurate measurements and are based on |
|
261 |
* the exact shape of the ellipsoid. |
|
262 |
* |
|
263 |
* The provided points are considered to be 2D points |
|
264 |
* (additional dimensions are ignored). |
|
265 |
* |
|
266 |
* @param point1 |
|
267 |
* @param point2 |
|
268 |
* @param the unit in which the distance should be measure |
|
269 |
* |
|
270 |
* @return The distance between point1 and point2 measured in the units |
|
271 |
* provided by the unit parameter. |
|
272 |
*/ |
|
273 |
double getDistance(double[] point1, double[] point2, boolean useBaseCRS, Unit<Length> unit); |
|
274 | 224 |
} |
Also available in: Unified diff