Class CoordinateSystem

java.lang.Object
com.agisoft.metashape.CoordinateSystem
All Implemented Interfaces:
AutoCloseable

public class CoordinateSystem extends Object implements AutoCloseable
  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • CoordinateSystem

      protected CoordinateSystem(long cPtr, boolean cMemoryOwn)
    • CoordinateSystem

      public CoordinateSystem()
    • CoordinateSystem

      public CoordinateSystem(CoordinateSystem crs)
  • Method Details

    • getCPtr

      protected static long getCPtr(CoordinateSystem obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • delete

      public void delete()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getAuthority

      public String getAuthority()
      Authority identifier of the coordinate system.
    • getWkt

      public String getWkt()
      Coordinate system definition in WKT format.
    • getProj4

      public String getProj4()
      Coordinate system definition in PROJ.4 format.
    • init

      public boolean init(String wkt)
      Initialize projection based on specified WKT definition or authority identifier.
      Parameters:
      wkt - WKT definition of coordinate system or authority identifier.
    • project

      public Vector project(Vector point)
      Projects point from geocentric coordinates to projected geographic coordinate system.
      Parameters:
      point - 3D point in geocentric coordinates.
      Returns:
      3D point in projected coordinates.
    • unproject

      public Vector unproject(Vector point)
      Unprojects point from projected coordinates to geocentric coordinates.
      Parameters:
      point - 3D point in projected coordinate system.
      Returns:
      3D point in geocentric coordinates.
    • localframe

      public Matrix localframe(Vector point)
      Returns 4x4 transformation matrix to LSE coordinates at the given point.
      Parameters:
      point - Coordinates of the origin in the geocentric coordinates.
      Returns:
      Transformation from geocentric coordinates to local coordinates.
    • makeGeographic

      public Optional<CoordinateSystem> makeGeographic()
      Construct geographic coordinate system using coordinate system datum.
      Returns:
      Geographic coordinate system, may be null.
    • makeGeocentric

      public Optional<CoordinateSystem> makeGeocentric()
      Construct geocentric coordinate system using coordinate system datum.
      Returns:
      Geocentric coordinate system, may be null.
    • datumTransform

      public static Optional<Matrix> datumTransform(CoordinateSystem source, CoordinateSystem target)
      Coordinate transformation from source to target coordinate system datum.
      Parameters:
      source - Source coordinate system.
      target - Target coordinate system.
      Returns:
      Transformation matrix, may be null.
    • transform

      public static Vector transform(Vector point, CoordinateSystem source, CoordinateSystem target)
      Transform point coordinates between coordinate systems.
      Parameters:
      point - Point coordinates.
      source - Source coordinate system.
      target - Target coordinate system.
      Returns:
      Transformed point coordinates.
    • transformationMatrix

      public static Matrix transformationMatrix(Vector point, CoordinateSystem source, CoordinateSystem target)
      Local approximation of coordinate transformation from source to target coordinate system at the given point.
      Parameters:
      point - Point coordinates.
      source - Source coordinate system.
      target - Target coordinate system.
      Returns:
      Transformation matrix.
    • addGeoid

      public static boolean addGeoid(String path)
      Register geoid model.
      Parameters:
      path - Path to geoid file.