-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support geocent * Add inverse project radians Signed-off-by: novpla <tuannn.bk@gmail.com>
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
src/main/java/org/locationtech/proj4j/proj/GeocentProjection.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.locationtech.proj4j.proj; | ||
|
||
import org.locationtech.proj4j.ProjCoordinate; | ||
import org.locationtech.proj4j.datum.GeocentricConverter; | ||
|
||
public class GeocentProjection extends Projection { | ||
|
||
@Override | ||
public ProjCoordinate projectRadians(ProjCoordinate src, ProjCoordinate dst) { | ||
GeocentricConverter geocentricConverter = new GeocentricConverter(this.ellipsoid); | ||
geocentricConverter.convertGeodeticToGeocentric(dst); | ||
return dst; | ||
} | ||
|
||
@Override | ||
public ProjCoordinate inverseProjectRadians(ProjCoordinate src, ProjCoordinate dst) { | ||
GeocentricConverter geocentricConverter = new GeocentricConverter(this.ellipsoid); | ||
geocentricConverter.convertGeocentricToGeodetic(dst); | ||
return dst; | ||
} | ||
} |