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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    angle(List coordinates)
    Computes the angle between the last 2 segments in the coordinates list
    double
    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 coordinates
    void
    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 cursor
    getMetricsString(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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CoordinateListMetrics

      public CoordinateListMetrics()
  • Method Details

    • 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 coordinates
      panel - the LayerViewPanel
      closedDistance - 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 coordinates
      panel - the LayerViewPanel
      closedDistance - 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 coordinates
      closedDistance - 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 coordinates
      closedDistance - 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 coordinates
      closedDistance - 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 coordinates
      closedDistance - true if coordinates represent a closed line (ring)
      Returns:
      bearing in degrees
    • bearing

      public double bearing(List coordinates)