Class CoordinateListMetrics
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.CoordinateListMetrics
Generates strings describing metrics for coordinate lists.
- Version:
- 1.0
- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleComputes the angle between the last 2 segments in the coordinates listdoublestatic doubleGiuseppe Aruta (Peppe - ma15569) 03-14-2014 Computes the angle facing North (upper side of the view)doublestatic doubleGiuseppe Aruta 2015_01_10 code from ConstrainedManager.class return Bearing in degrees (between EW axes, -180 to +180) from 2 coordinatesvoiddisplayMetrics(List coordinates, LayerViewPanel panel) voiddisplayMetrics(List coordinates, LayerViewPanel panel, boolean closedDistance) Display the coordinates metrics with the option to compute the distance for a closed geometry.static doublestatic doubleComputes the distance with the option to compute the distance for a closed geometry.doubledistancelast(List coordinates) static doubledistancelast(List coordinates, boolean closedDistance) Giuseppe Aruta (Peppe - ma15569) 03-14-2014 Computes the angle between the last drawn segment and the position of the cursorgetMetricsString(List coordinates, LayerViewPanel panel) getMetricsString(List coordinates, LayerViewPanel panel, boolean closedDistance) Get's the the coordinates metrics with the option to compute the distance for a closed geometry. 14-3-2014 (Giuseppe Aruta) Added compute of last distance (between last point and the cursor and the compute of azimuth
-
Constructor Details
-
CoordinateListMetrics
public CoordinateListMetrics()
-
-
Method Details
-
displayMetrics
-
displayMetrics
Display the coordinates metrics with the option to compute the distance for a closed geometry.- Parameters:
coordinates- list of coordinatespanel- the LayerViewPanelclosedDistance- true if coordinates represent a closed line (ring)
-
getMetricsString
-
getMetricsString
Get's the the coordinates metrics with the option to compute the distance for a closed geometry. 14-3-2014 (Giuseppe Aruta) Added compute of last distance (between last point and the cursor and the compute of azimuth- Parameters:
coordinates- list of coordinatespanel- the LayerViewPanelclosedDistance- true if coordinates represent a closed line (ring)- Returns:
- the String representing the geometry metrics
-
distance
-
distance
Computes the distance with the option to compute the distance for a closed geometry.- Parameters:
coordinates- list of coordinatesclosedDistance- true if coordinates represent a closed line (ring)- Returns:
- the sum of the distance between coordinates
-
angle
Computes the angle between the last 2 segments in the coordinates list- Parameters:
coordinates- list of coordinates- Returns:
- the angle in degrees
-
azimuth
Giuseppe Aruta (Peppe - ma15569) 03-14-2014 Computes the angle facing North (upper side of the view)- Parameters:
coordinates- list of coordinatesclosedDistance- true if coordinates represent a closed line (ring)- Returns:
- the angle in degrees
-
azimuth
-
distancelast
Giuseppe Aruta (Peppe - ma15569) 03-14-2014 Computes the angle between the last drawn segment and the position of the cursor- Parameters:
coordinates- list of coordinatesclosedDistance- true if coordinates represent a closed line (ring)- Returns:
- the distance between coordinates of last point and coordinates of cursor
-
distancelast
-
bearing
Giuseppe Aruta 2015_01_10 code from ConstrainedManager.class return Bearing in degrees (between EW axes, -180 to +180) from 2 coordinates- Parameters:
coordinates- list of coordinatesclosedDistance- true if coordinates represent a closed line (ring)- Returns:
- bearing in degrees
-
bearing
-