Skip to content

Simple java class to convert between geo and web mercator coordinates

License

Notifications You must be signed in to change notification settings

adamochayon/WebMercator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebMercator

Simple Java class to convert between geo and web mercator coordinates.

Update 2018 Feb: Updated Maven pom to compile and build Scala implicits. In addition, the output jar has the compact Scala version as a classifier.

Update 2017 Apr: Added Scala Double implicits to enable the conversion to/from web mercator values. For example:

import com.esri.webmercator._

val lon1 = -127.2
val lat1 = 45.6

val mercatorX = lon1 toMercatorX
val mercatorY = lat1 toMercatorY

val lon2 = mercatorX toLongitude
val lat2 = mercatorY toLatitude

Build the project using Maven

The following will install the Scala 2.10 version:

mvn clean install

To install the Scala 2.11 version, specify the scala-2.11 profile:

mvn -Pscala-2.11 clean install

Usage in pom.xml

<dependency>
    <groupId>com.esri</groupId>
    <artifactId>webmercator</artifactId>
    <version>1.4</version>
    <classifier>${scala.compact}</classifier>
</dependency>

Build the project using SBT

sbt clean +publishM2 +publishLocal

About

Simple java class to convert between geo and web mercator coordinates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 64.6%
  • Scala 35.4%