c

scalation.spatial

LatitudeLongitude

case class LatitudeLongitude(lat: Double, long: Double) extends Product with Serializable

The LatitudeLongitude class stores Latitude-Longitude coordinates.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LatitudeLongitude
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LatitudeLongitude(latDMS: (Int, Int, Int), longDMS: (Int, Int, Int))

    Construct a LatitudeLongitude object from latitude and longitude as DMS strings.

    Construct a LatitudeLongitude object from latitude and longitude as DMS strings.

    latDMS

    the latitude in Degrees, Minutes, Seconds

    longDMS

    the longitude in Degrees, Minutes, Seconds

  2. new LatitudeLongitude(latLong: (Double, Double))

    Construct a LatitudeLongitude object from a pair of doubles.

    Construct a LatitudeLongitude object from a pair of doubles.

    latLong

    the pair of doubles

  3. new LatitudeLongitude(lat: Double, long: Double)

Value Members

  1. def distance(loc2: LatitudeLongitude, elevation: Double = 0.0): Double

    Compute the distance between 'this' Latitude-Longitude and location 'loc2' in meters.

    Compute the distance between 'this' Latitude-Longitude and location 'loc2' in meters.

    loc2

    the other Latitude-Longitude location

    elevation

    the average elevation for two locations (default 0 => sea level)

  2. def invalid: Boolean

    Determine whether the latitude and longitude are valid.

  3. def kNearest(locs: Array[LatitudeLongitude], kappa: Int = 3): Array[(Int, Double)]

    Find the 'kappa' nearest neighbors (top-'kappa') to the 'this' location, returning the indices and distances where they are found in 'locs'.

    Find the 'kappa' nearest neighbors (top-'kappa') to the 'this' location, returning the indices and distances where they are found in 'locs'.

    locs

    the other locations to be considered

    kappa

    the number of nearest neighbors to collect

  4. val lat: Double
  5. val long: Double