Class Projection

Projection Class, if no valid options are given, the Projection will initialize with the Framework default Projection For example:


{
"epsg" : "EPSG:25833"
"proj4" : "+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs"
}

Accessors

Constructors

Methods

  • Fast transform from Web-Mercator to WGS84

    Parameters

    • coords: Coordinate
    • OptionalinPlace: boolean

      whether to transform in place

    Returns Coordinate

  • parses an epsg code returns empty string if no code has been found for example: parseEPSGCode('epsg:4326') ==> '4326' parseEPSGCode('epsg:4326', 'EPSG:') ==> 'EPSG:4326' parseEPSGCode('asdasd', 'EPSG:') ==> ''

    Parameters

    • Optionalvalue: string | number
    • prefix: string = 'EPSG:'

    Returns string

  • Fast transform from WGS84 to Web-Mercator

    Parameters

    • coords: Coordinate
    • OptionalinPlace: boolean

      whether to transform in place

    Returns Coordinate