Java Doc for GeodeticCalculator.java in  » GIS » GeoTools-2.4.1 » org » geotools » referencing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.referencing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.referencing.GeodeticCalculator

GeodeticCalculator
public class GeodeticCalculator (Code)
Performs geodetic calculations on an . This class encapsulates a generic ellipsoid and calculates the following properties:

  • Distance and azimuth between two points.
  • Point located at a given distance and azimuth from an other point.

The calculation use the following informations:

  • The , which is always considered valid. It is initially set at (0,0) and can only be changed to another legitimate value.
  • Only one of the following:
    • The , or
    • An .
    The latest one set overrides the other and determines what will be calculated.

Note: This class is not thread-safe. If geodetic calculations are needed in a multi-threads environment, create one distinct instance of GeodeticCalculator for each thread.
since:
   2.1
version:
   $Id: GeodeticCalculator.java 24925 2007-03-27 20:12:08Z jgarnett $
author:
   Daniele Franzoni
author:
   Martin Desruisseaux




Constructor Summary
public  GeodeticCalculator()
     Constructs a new geodetic calculator associated with the WGS84 ellipsoid.
public  GeodeticCalculator(Ellipsoid ellipsoid)
     Constructs a new geodetic calculator associated with the specified ellipsoid.
public  GeodeticCalculator(CoordinateReferenceSystem crs)
     Constructs a new geodetic calculator expecting coordinates in the supplied CRS.

Method Summary
public  doublegetAzimuth()
     Returns the azimuth.
public  CoordinateReferenceSystemgetCoordinateReferenceSystem()
     Returns the coordinate reference system for all methods working on Position objects.
public  Point2DgetDestinationGeographicPoint()
     Returns the destination point.
public  DirectPositiongetDestinationPosition()
     Returns the destination position in user coordinates, which doesn't need to be geographic.
public  EllipsoidgetEllipsoid()
     Returns the referenced ellipsoid.
public  ShapegetGeodeticCurve(int numberOfPoints)
     Calculates the geodetic curve between two points in the referenced ellipsoid. A curve in the ellipsoid is a path which points contain the longitude and latitude of the points in the geodetic curve.
public  ShapegetGeodeticCurve()
     Calculates the geodetic curve between two points in the referenced ellipsoid. A curve in the ellipsoid is a path which points contain the longitude and latitude of the points in the geodetic curve.
public  GeographicCRSgetGeographicCRS()
     Returns the geographic coordinate reference system for all methods working on Point2D objects.
public  doublegetMeridianArcLength(double latitude1, double latitude2)
     Calculates the meridian arc length between two points in the same meridian in the referenced ellipsoid.
Parameters:
  latitude1 - The latitude of the first point (in decimal degrees).
Parameters:
  latitude2 - The latitude of the second point (in decimal degrees).
public  doublegetOrthodromicDistance()
     Returns the orthodromic distance.
public  Point2DgetStartingGeographicPoint()
     Returns the starting point in geographic coordinates.
public  DirectPositiongetStartingPosition()
     Returns the starting position in user coordinates, which doesn't need to be geographic.
public  voidsetDestinationGeographicPoint(double longitude, double latitude)
     Set the destination point in geographic coordinates.
public  voidsetDestinationGeographicPoint(Point2D point)
     Set the destination point in geographic coordinates.
public  voidsetDestinationPosition(Position position)
     Set the destination position in user coordinates, which doesn't need to be geographic.
public  voidsetDirection(double azimuth, double distance)
     Set the azimuth and the distance from the .
public  voidsetStartingGeographicPoint(double longitude, double latitude)
     Set the starting point in geographic coordinates. The , the and the are discarted.
public  voidsetStartingGeographicPoint(Point2D point)
     Set the starting point in geographic coordinates.
public  voidsetStartingPosition(Position position)
     Set the starting position in user coordinates, which doesn't need to be geographic.
public  StringtoString()
     Returns a string representation of the current state of this calculator.


Constructor Detail
GeodeticCalculator
public GeodeticCalculator()(Code)
Constructs a new geodetic calculator associated with the WGS84 ellipsoid.



GeodeticCalculator
public GeodeticCalculator(Ellipsoid ellipsoid)(Code)
Constructs a new geodetic calculator associated with the specified ellipsoid. All calculations done by the new instance are referenced to this ellipsoid.
Parameters:
  ellipsoid - The ellipsoid onto which calculates distances and azimuths.



GeodeticCalculator
public GeodeticCalculator(CoordinateReferenceSystem crs)(Code)
Constructs a new geodetic calculator expecting coordinates in the supplied CRS. The ellipsoid will be inferred from the CRS.
Parameters:
  crs - The reference system for the Position objects.
since:
   2.2




Method Detail
getAzimuth
public double getAzimuth() throws IllegalStateException(Code)
Returns the azimuth. This method returns the value set by the last call to (azimuth,distance), except if (...) has been invoked after. In this later case, the azimuth will be computed from the to the destination point. The azimuth, in decimal degrees from -180° to +180°.
throws:
  IllegalStateException - if the destination point has not been set.



getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem()(Code)
Returns the coordinate reference system for all methods working on Position objects. This is the CRS specified at .
since:
   2.2



getDestinationGeographicPoint
public Point2D getDestinationGeographicPoint() throws IllegalStateException(Code)
Returns the destination point. This method returns the point set by the last call to a (...) method, except if (...) has been invoked after. In this later case, the destination point will be computed from the to the azimuth and distance specified. The destination point. The x and y coordinatesare the longitude and latitude in decimal degrees, respectively.
throws:
  IllegalStateException - if the azimuth and the distance have not been set.
since:
   2.3



getDestinationPosition
public DirectPosition getDestinationPosition() throws TransformException(Code)
Returns the destination position in user coordinates, which doesn't need to be geographic. The coordinate reference system is the one specified to the .
throws:
  TransformException - if the position can't be transformed to user coordinates.
since:
   2.2



getEllipsoid
public Ellipsoid getEllipsoid()(Code)
Returns the referenced ellipsoid.



getGeodeticCurve
public Shape getGeodeticCurve(int numberOfPoints)(Code)
Calculates the geodetic curve between two points in the referenced ellipsoid. A curve in the ellipsoid is a path which points contain the longitude and latitude of the points in the geodetic curve. The geodetic curve is computed from the to the .
Parameters:
  numberOfPoints - The number of vertex in the geodetic curve.NOTE: This argument is only a hint and may be ignoredin future version (if we compute a real curve rather than a list of linesegments). The path that represents the geodetic curve from the to the.



getGeodeticCurve
public Shape getGeodeticCurve()(Code)
Calculates the geodetic curve between two points in the referenced ellipsoid. A curve in the ellipsoid is a path which points contain the longitude and latitude of the points in the geodetic curve. The geodetic curve is computed from the to the . The path that represents the geodetic curve from the to the.



getGeographicCRS
public GeographicCRS getGeographicCRS()(Code)
Returns the geographic coordinate reference system for all methods working on Point2D objects. This is inferred from the CRS specified at .
since:
   2.3



getMeridianArcLength
public double getMeridianArcLength(double latitude1, double latitude2)(Code)
Calculates the meridian arc length between two points in the same meridian in the referenced ellipsoid.
Parameters:
  latitude1 - The latitude of the first point (in decimal degrees).
Parameters:
  latitude2 - The latitude of the second point (in decimal degrees). Returned the meridian arc length between latitude1 and latitude2



getOrthodromicDistance
public double getOrthodromicDistance() throws IllegalStateException(Code)
Returns the orthodromic distance. This method returns the value set by the last call to (azimuth,distance), except if (...) has been invoked after. In this later case, the distance will be computed from the to the destination point. The orthodromic distance, in the same units as the axis.
throws:
  IllegalStateException - if the destination point has not been set.



getStartingGeographicPoint
public Point2D getStartingGeographicPoint()(Code)
Returns the starting point in geographic coordinates. The x and y coordinates are the longitude and latitude in decimal degrees, respectively. If the starting point has never been set, then the default value is (0,0). The starting point in geographic coordinates.
since:
   2.3



getStartingPosition
public DirectPosition getStartingPosition() throws TransformException(Code)
Returns the starting position in user coordinates, which doesn't need to be geographic. The coordinate reference system is the one specified to the .
throws:
  TransformException - if the position can't be transformed to user coordinates.
since:
   2.3



setDestinationGeographicPoint
public void setDestinationGeographicPoint(double longitude, double latitude) throws IllegalArgumentException(Code)
Set the destination point in geographic coordinates. The azimuth and distance values will be updated as a side effect of this call. They will be recomputed the next time GeodeticCalculator.getAzimuth() or GeodeticCalculator.getOrthodromicDistance() are invoked.
Parameters:
  longitude - The longitude in decimal degrees between -180 and +180°
Parameters:
  latitude - The latgitude in decimal degrees between -90 and +90°
throws:
  IllegalArgumentException - if the longitude or the latitude is out of bounds.
since:
   2.3



setDestinationGeographicPoint
public void setDestinationGeographicPoint(Point2D point) throws IllegalArgumentException(Code)
Set the destination point in geographic coordinates. The x and y coordinates must be the longitude and latitude in decimal degrees, respectively. This is a convenience method for (x,y).
Parameters:
  point - The destination point.
throws:
  IllegalArgumentException - if the longitude or the latitude is out of bounds.
since:
   2.3



setDestinationPosition
public void setDestinationPosition(Position position) throws TransformException(Code)
Set the destination position in user coordinates, which doesn't need to be geographic. The coordinate reference system is the one specified to the .
Parameters:
  position - The position in user coordinate reference system.
throws:
  TransformException - if the position can't be transformed.
since:
   2.2



setDirection
public void setDirection(double azimuth, double distance) throws IllegalArgumentException(Code)
Set the azimuth and the distance from the . The destination point will be updated as a side effect of this call. It will be recomputed the next time GeodeticCalculator.getDestinationGeographicPoint() is invoked.
Parameters:
  azimuth - The azimuth in decimal degrees from -180° to 180°.
Parameters:
  distance - The orthodromic distance in the same units as the axis.
throws:
  IllegalArgumentException - if the azimuth or the distance is out of bounds.
See Also:   GeodeticCalculator.getAzimuth
See Also:   GeodeticCalculator.getOrthodromicDistance



setStartingGeographicPoint
public void setStartingGeographicPoint(double longitude, double latitude) throws IllegalArgumentException(Code)
Set the starting point in geographic coordinates. The , the and the are discarted. They will need to be specified again.
Parameters:
  longitude - The longitude in decimal degrees between -180 and +180°
Parameters:
  latitude - The latitude in decimal degrees between -90 and +90°
throws:
  IllegalArgumentException - if the longitude or the latitude is out of bounds.
since:
   2.3



setStartingGeographicPoint
public void setStartingGeographicPoint(Point2D point) throws IllegalArgumentException(Code)
Set the starting point in geographic coordinates. The x and y coordinates must be the longitude and latitude in decimal degrees, respectively. This is a convenience method for (x,y).
Parameters:
  point - The starting point.
throws:
  IllegalArgumentException - if the longitude or the latitude is out of bounds.
since:
   2.3



setStartingPosition
public void setStartingPosition(Position position) throws TransformException(Code)
Set the starting position in user coordinates, which doesn't need to be geographic. The coordinate reference system is the one specified to the .
Parameters:
  position - The position in user coordinate reference system.
throws:
  TransformException - if the position can't be transformed.
since:
   2.3



toString
public String toString()(Code)
Returns a string representation of the current state of this calculator.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.