Coordinates

scalation.Coordinates
class Coordinates(aniWidth: Double, aniHeight: Double, coords: Array[(Double, Double)])

The Coordinates class calculates the animation coordinates for a set of provided lat-long coordinates. Uses CTM (Custom Transverse Mercator) coordinates as an intermediate step.

Value parameters

aniHeight

the height of the animation window

aniWidth

the width of the animation window

coords

an array of lat-long coordinates

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def calcAniCoords(): (ListBuffer[(Double, Double)], Double)

Calculate the animation coordinates that will represent the lat-long coordinates provided to the class.

Calculate the animation coordinates that will represent the lat-long coordinates provided to the class.

Attributes

def dist(p: (Double, Double), q: (Double, Double)): Double

Utility function for calculating the distance between two points as (Double, Double) values.

Utility function for calculating the distance between two points as (Double, Double) values.

Value parameters

p

the first point (Double, Double)

q

the second point (Double, Double)

Attributes

def findNSEW(): Array[Double]

Find the northern-most, southern-most, eastern-most, and western-most CTM x-values and y-values in the set of provided coordinates. NOTE: This does not necessarily correspond to actual complete coordinates in the set. These values provide a bounding box around the set.

Find the northern-most, southern-most, eastern-most, and western-most CTM x-values and y-values in the set of provided coordinates. NOTE: This does not necessarily correspond to actual complete coordinates in the set. These values provide a bounding box around the set.

Attributes

def getCentral(c: Array[(Double, Double)]): Double

Calculate the central meridian for the CTM by taking the average longitude of all lat-longs in the set.

Calculate the central meridian for the CTM by taking the average longitude of all lat-longs in the set.

Value parameters

c

the array (set) of lat-longs

Attributes

def getCtmCoords(): ListBuffer[(Double, Double)]

Convert Latitude-Longitude coordinates to CTM coordinates using the coords parameter of the class and output as a ListBuffer.

Convert Latitude-Longitude coordinates to CTM coordinates using the coords parameter of the class and output as a ListBuffer.

Attributes

Concrete fields

val aniCoords: ListBuffer[(Double, Double)]
val cTMCoords: ListBuffer[(Double, Double)]
val scale: Double