Class CoordinateListMetrics
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.cursortool.CoordinateListMetrics
-
public class CoordinateListMetrics extends Object
Generates strings describing metrics for coordinate lists.- Version:
- 1.0
- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description CoordinateListMetrics()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static double
angle(List coordinates)
Computes the angle between the last 2 segments in the coordinates listdouble
azimuth(List coordinates)
static double
azimuth(List coordinates, boolean closedDistance)
Giuseppe Aruta (Peppe - ma15569) 03-14-2014 Computes the angle facing North (upper side of the view)double
bearing(List coordinates)
static double
bearing(List coordinates, boolean closedDistance)
Giuseppe Aruta 2015_01_10 code from ConstrainedManager.class return Bearing in degrees (between EW axes, -180 to +180) from 2 coordinatesvoid
displayMetrics(List coordinates, LayerViewPanel panel)
void
displayMetrics(List coordinates, LayerViewPanel panel, boolean closedDistance)
Display the coordinates metrics with the option to compute the distance for a closed geometry.static double
distance(List coordinates)
static double
distance(List coordinates, boolean closedDistance)
Computes the distance with the option to compute the distance for a closed geometry.double
distancelast(List coordinates)
static double
distancelast(List coordinates, boolean closedDistance)
Giuseppe Aruta (Peppe - ma15569) 03-14-2014 Computes the angle between the last drawn segment and the position of the cursorString
getMetricsString(List coordinates, LayerViewPanel panel)
String
getMetricsString(List coordinates, LayerViewPanel panel, boolean closedDistance)
Get's the the coordinates metrics with the option to compute the distance for a closed geometry.
-
-
-
Method Detail
-
displayMetrics
public void displayMetrics(List coordinates, LayerViewPanel panel)
-
displayMetrics
public void displayMetrics(List coordinates, LayerViewPanel panel, boolean closedDistance)
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
public String getMetricsString(List coordinates, LayerViewPanel panel)
-
getMetricsString
public String 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- Parameters:
coordinates
- list of coordinatespanel
- the LayerViewPanelclosedDistance
- true if coordinates represent a closed line (ring)- Returns:
- the String representing the geometry metrics
-
distance
public static double distance(List coordinates)
-
distance
public static double distance(List coordinates, boolean closedDistance)
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
public static double angle(List coordinates)
Computes the angle between the last 2 segments in the coordinates list- Parameters:
coordinates
- list of coordinates- Returns:
- the angle in degrees
-
azimuth
public static double azimuth(List coordinates, boolean closedDistance)
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
public double azimuth(List coordinates)
-
distancelast
public static double distancelast(List coordinates, boolean closedDistance)
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
public double distancelast(List coordinates)
-
bearing
public static double bearing(List coordinates, boolean closedDistance)
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
public double bearing(List coordinates)
-
-