All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tsingjyujing.geo.util.convertor.WGS84.scala Maven / Gradle / Ivy

There is a newer version: 2.8.9-2.11
Show newest version
package com.github.tsingjyujing.geo.util.convertor

import com.github.tsingjyujing.geo.basic.IGeoPoint
import com.github.tsingjyujing.geo.basic.operations.GeoTransformable
import com.github.tsingjyujing.geo.element.mutable.GeoPoint

/**
  * Return a new object which extends IGeoPoint and has same longitude and latitude
  * @author [email protected]
  */
object WGS84 extends GeoTransformable {
    /**
      * Encrypt WGS84 location to other format
      *
      * @param x WGS84 position
      * @return
      */
    override def transform(x: IGeoPoint) = GeoPoint(x.getLongitude, x.getLatitude)

    override def inverseTransform(y: IGeoPoint, eps: Double = 0): IGeoPoint = GeoPoint(y.getLongitude, y.getLatitude)

    override def inverseTransformFast(y: IGeoPoint): GeoPoint = GeoPoint(y.getLongitude, y.getLatitude)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy