Skip to content

Commit

Permalink
support geocent
Browse files Browse the repository at this point in the history
Signed-off-by: novpla <tuannn.bk@gmail.com>
  • Loading branch information
tuan-nng committed May 18, 2020
1 parent 40c349b commit 143b8e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/locationtech/proj4j/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private synchronized void initialize() {
register("fouc", FoucautProjection.class, "Foucaut");
register("fouc_s", FoucautSinusoidalProjection.class, "Foucaut Sinusoidal");
register("gall", GallProjection.class, "Gall (Gall Stereographic)");
register("geocent", GeocentProjection.class, "Geocentric");
register("geos", GeostationarySatelliteProjection.class, "Geostationary Satellite");
// register( "gins8", Projection.class, "Ginsburg VIII (TsNIIGAiK)" );
// register( "gn_sinu", Projection.class, "General Sinusoidal Series" );
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/org/locationtech/proj4j/proj/GeocentProjection.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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;
}
}

0 comments on commit 143b8e4

Please sign in to comment.