Class SpatialReference

java.lang.Object
com.eco.bio7.gdal.SpatialReference
All Implemented Interfaces:
AutoCloseable

public final class SpatialReference extends Object implements AutoCloseable
A coordinate reference system of GDAL (OGRSpatialReference). The axis order is the traditional one of GIS (x = easting or longitude, y = northing or latitude), also for EPSG:4326. Close it after use.
  • Method Details

    • fromEpsg

      public static SpatialReference fromEpsg(int code)
      A coordinate system of the EPSG database (e.g., 4326 for WGS84 longitude/latitude).
    • fromWkt

      public static SpatialReference fromWkt(String wkt)
      A coordinate system of a WKT definition.
    • fromUserInput

      public static SpatialReference fromUserInput(String definition)
      A coordinate system of a definition: "EPSG:32632", WKT, a PROJ string, "WGS84", a file with a definition, ...
    • toWkt

      public String toWkt()
    • toPrettyWkt

      public String toPrettyWkt()
    • toProj4

      public String toProj4()
    • name

      public String name()
      The name (e.g., "WGS 84 / UTM zone 32N").
    • authority

      public String authority()
      The authority and code (e.g., "EPSG:32632"), null if unknown.
    • isGeographic

      public boolean isGeographic()
    • isProjected

      public boolean isProjected()
    • transformTo

      public CoordinateTransform transformTo(SpatialReference target)
      The transformation of coordinates of this system into the target system. Close it after use.
    • close

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

      public String toString()
      Overrides:
      toString in class Object