Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/coordinates/CoordinateUtils"

Index

Functions

convertDmsToDecimalDegrees

  • convertDmsToDecimalDegrees(app: ViewerApplication, deg: string, min: string, sec: string, bearing: string): number
  • Convert DMS to Decimal Degrees for deciphering manual user input.

    Parameters

    Returns number

formatAngle

  • formatAngle(angle: number, format: string, app: Application, fractionalDigits?: number, descriptor?: string): string
  • Formats an angle for display.

    Parameters

    • angle: number

      The angle to format, in decimal degrees.

    • format: string

      The format to use. One of the AngleFormat constants.

    • app: Application

      The Geocortex application.

    • Optional fractionalDigits: number

      The number of digits to display after the decimal point, for formats that display fractional values.

    • Optional descriptor: string

      If this angle is to be formatted as dm or dms the N/S/E/W descriptor should be passed in here. This must match the localized strings.

    Returns string

formatBearing

  • formatBearing(angle: number, format: string, app: Application, fractionalDigits?: number): string
  • Formats an angle in quadrant bearing notation, e.g. "N 48.5° E".

    Parameters

    • angle: number

      The angle to format, specified in decimal degrees using the North azimuth direction system.

    • format: string

      The format to use. One of the AngleFormat constants.

    • app: Application

      The Geocortex application.

    • Optional fractionalDigits: number

      The number of digits to display after the decimal point, for formats that display fractional values.

    Returns string

formatLatLon

  • formatLatLon(latitude: number, longitude: number, format: string, app: Application, fractionalDigits?: number): object
  • Formats latitude and longitude numbers for display.

    Parameters

    • latitude: number

      The degrees of latitude.

    • longitude: number

      The degrees of longitude.

    • format: string

      The format to use. One of the AngleFormat constants.

    • app: Application

      The Geocortex application.

    • Optional fractionalDigits: number

      The number of digits to display after the decimal point, for formats that display fractional values.

    Returns object

    • latitude: string
    • longitude: string

formatXYCoordinate

  • formatXYCoordinate(coordinate: number, app: Application, fractionalDigits?: number): string
  • Formats a projected coordinate (X/Y value) for display.

    Parameters

    • coordinate: number

      The coordinate to format.

    • app: Application

      The Geocortex application.

    • Optional fractionalDigits: number

      The number of digits to display after the decimal point.

    Returns string

fromGeoCoordinateString

  • Converts and returns a map point for the given geo coordinate string.

    Parameters

    Returns Promise<Point>

getCoordinate

  • Retrieves the coordinates for the provided mapPoint in the target coordinate system.

    Parameters

    • app: ViewerApplication

      The Viewer Application.

    • mapPointOrCoordStr: Point | GeoCoordinateString

      The input map point or Geo Coordinate string.

    • targetCoordSys: CoordinateSystem

      The target coordinate system.

    • Optional fracDigits: number
    • Optional geographicCoordSys: number

    Returns Promise<Coordinate>

    Returns a promise for the requested Coordinate.

getResource

  • getResource(app: Application, resource: string): string
  • Retrieves coordinate string resources from the infrastructure library.

    Parameters

    • app: Application

      The application that this utilities class belongs to.

    • resource: string

      Input resource name. Can be of the form "language-coordinates-xxx" or simply "xxx".

    Returns string

toGeoCoordinateString

  • Returns the geocoordinate string for the provided map point.

    Parameters

    Returns Promise<string>