maptalks/proj4m


proj4 minimal/maptalks

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.maptalks:proj4m:v1.0.5'
	}
	dependencies {
		implementation("com.github.maptalks:proj4m:v1.0.5")
	}
	<dependency>
	    <groupId>com.github.maptalks</groupId>
	    <artifactId>proj4m</artifactId>
	    <version>v1.0.5</version>
	</dependency>

                            
    libraryDependencies += "com.github.maptalks" % "proj4m" % "v1.0.5"
        
        

                            
    :dependencies [[com.github.maptalks/proj4m "v1.0.5"]]
        
        

Readme


proj4m

Circle CI

proj 4 mapresty

supported projection

  • Normal
    • EPSG:3857, +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
    • EPSG:4326, +proj=longlat +datum=WGS84 +no_defs
  • GCJ02
    • GCJ02, +proj=longlat +dataum=GCJ02
    • GCJ02MC, +proj=merc +datum=GCJ02
  • BD09
    • BD09LL, +proj=longlat +datum=BD09
    • BD09MC, +proj=bmerc +datum=BD09

Usage

Proj4 proj = new Proj4("GCJ02", "+proj=merc +datum=GCJ02");
proj.forward(new double[]{120.0, 30.0});