geopf-extensions-openlayers
    Preparing search index...

    Variable MathUtils

    MathUtils: {
        convertDistance: (distance: number) => string;
        convertSecondsToTime: (duration: number) => string;
        decimalToDMS: (
            degrees: number,
            hemispheres: any[],
            numDigits: number,
        ) => any;
        isInteger: (s: string) => boolean;
        modulo: (a: number, b: number) => number;
        toFloat: (s: string) => any;
        toInteger: (s: string, base: Numeric) => any;
        coordinateToDecimal(olCoordinate: any): any;
        coordinateToDMS(olCoordinate: any): any;
        coordinateToGon(olCoordinate: any): any;
        coordinateToKMeter(olCoordinate: any): any;
        coordinateToMeter(olCoordinate: any): any;
        coordinateToRad(olCoordinate: any): any;
        dmsToDecimal(
            degrees: any,
            minutes: any,
            seconds: any,
            hemispheres: any,
        ): number;
    } = ...

    Type Declaration

    • convertDistance: (distance: number) => string

      convert distance in meters or kilometers

    • convertSecondsToTime: (duration: number) => string

      convert seconds to time : HH:MM:SS

    • FunctiondecimalToDMS: (degrees: number, hemispheres: any[], numDigits: number) => any

      Transform degrees, minutes, seconds form decimal degrees - Largely inspired by the private function degreesToStringHDMS from ol/coordinate.js

      decimalToDMS

    • FunctionisInteger: (s: string) => boolean

      check if s represents an integer

      isInteger

    • Functionmodulo: (a: number, b: number) => number

      Reste de la division euclidienne

      modulo

    • FunctiontoFloat: (s: string) => any

      Converts s to float

      toFloat

    • FunctiontoInteger: (s: string, base: Numeric) => any

      Converts string to Integer

      toInteger

    • coordinateToDecimal: function
      • Function

        ol coordinate to decimal

        coordinateToDecimal

        Parameters

        • olCoordinate: any

          see ol/coordinate.js

        Returns any

        • {lat, lng, unit:°}
    • coordinateToDMS: function
      • Function

        ol coordinate to dms

        coordinateToDMS

        Parameters

        • olCoordinate: any

          see ol/coordinate.js

        Returns any

        • {lat, lng, unit:dms}
    • coordinateToGon: function
      • Function

        ol coordinate to gon

        coordinateToGon

        Parameters

        • olCoordinate: any

          see ol/coordinate.js

        Returns any

        • {lat, lng, unit:gon}
    • coordinateToKMeter: function
      • Function

        ol coordinate to kilometer

        coordinateToKMeter

        Parameters

        • olCoordinate: any

          see ol/coordinate.js

        Returns any

        • {x, lyng, unit:km}
    • coordinateToMeter: function
      • Function

        ol coordinate to meter

        coordinateToMeter

        Parameters

        • olCoordinate: any

          see ol/coordinate.js

        Returns any

        • {x, y, unit:m}
    • coordinateToRad: function
      • Function

        ol coordinate to rad

        coordinateToRad

        Parameters

        • olCoordinate: any

          see ol/coordinate.js

        Returns any

        • {lat, lng, unit:rad}
    • dmsToDecimal: function
      • Function

        Transform decimal degrees form degrees, minutes, seconds

        dmsToDecimal

        Parameters

        • degrees: any

          degrees

        • minutes: any

          minutes

        • seconds: any

          seconds

        • hemispheres: any

          "NS" ou "EO"

        Returns number

        decimal coordinate