Created
February 26, 2021 00:52
-
-
Save hiroyuki-sato/1327ceb2bb25f2b33805fa7787296854 to your computer and use it in GitHub Desktop.
EPSG:32654 -> EPSG:6677変換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This Java source file was generated by the Gradle 'init' task. | |
*/ | |
package test; | |
import org.locationtech.proj4j.CRSFactory; | |
import org.locationtech.proj4j.CoordinateReferenceSystem; | |
import org.locationtech.proj4j.CoordinateTransform; | |
import org.locationtech.proj4j.CoordinateTransformFactory; | |
import org.locationtech.proj4j.ProjCoordinate; | |
public class App { | |
public static void main(String[] args) { | |
CoordinateReferenceSystem src, dst; | |
CRSFactory crsFactory = new CRSFactory(); | |
src = crsFactory.createFromName("EPSG:32654"); | |
dst = crsFactory.createFromName("EPSG:6677"); | |
ProjCoordinate sproj = new ProjCoordinate(0,0); | |
ProjCoordinate dproj = new ProjCoordinate(); | |
CoordinateTransformFactory factory = new CoordinateTransformFactory(); | |
CoordinateTransform transform = factory.createTransform(src,dst); | |
transform.transform(sproj,dproj); | |
System.out.println(src.getParameterString()); | |
System.out.println(dst.getParameterString()); | |
System.out.println(dst); | |
System.out.println(dproj); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment