Package org.gdal.osr

Class osr

java.lang.Object
org.gdal.osr.osr
All Implemented Interfaces:
osrConstants

public class osr
extends java.lang.Object
implements osrConstants
Class with static methods for utility functions.
  • Method Details

    • UseExceptions

      public static void UseExceptions()
      Use exceptions instead of error return codes.

      This is the default behavior : methods that in C/C++ return an OGRErr return code would throw a RuntimeException() in case the code it is different from ogr.OGRERR_NONE. By calling this method, you can get back to that original state if DontUseExceptions() was called in-between. This will only apply to the org.gdal.osr.* package.

      Since:
      Java bindings 1.7.0
    • DontUseExceptions

      public static void DontUseExceptions()
      Use return code instead of exceptions.

      By default, methods that in C/C++ return an OGRErr return code would throw a RuntimeException() in case the code is different from ogr.OGRERR_NONE. By calling this method, you can prevent the exception to be thrown and get the original error code (ogr.OGRERR_* codes) This will only apply to the org.gdal.osr.* package.

      Since:
      Java bindings 1.7.0
    • GetUseExceptions

      public static boolean GetUseExceptions()
    • GetWellKnownGeogCSAsWKT

      public static java.lang.String GetWellKnownGeogCSAsWKT​(java.lang.String definition)
      Utility function that returns the WKT definition of the SRS expressed as a well known Geog CS.

      Such a user input is what can be passed in to SpatialReference.SetWellKnownGeogCS().

      Parameters:
      definition - text definition to try to deduce SRS from.
      Returns:
      WKT definition
    • GetUserInputAsWKT

      public static java.lang.String GetUserInputAsWKT​(java.lang.String definition)
      Utility function that returns the WKT definition of the SRS expressed as a user input.

      Such a user input is what can be passed in to SpatialReference.SetFromUserInput().

      Parameters:
      definition - text definition to try to deduce SRS from.
      Returns:
      WKT definition
    • GetWellKnownGeogCSAsWKT

      public static int GetWellKnownGeogCSAsWKT​(java.lang.String name, java.lang.String[] argout)
    • GetUserInputAsWKT

      public static int GetUserInputAsWKT​(java.lang.String name, java.lang.String[] argout)
    • OSRAreaOfUse_west_lon_degree_get

      public static double OSRAreaOfUse_west_lon_degree_get​(AreaOfUse area)
    • OSRAreaOfUse_south_lat_degree_get

      public static double OSRAreaOfUse_south_lat_degree_get​(AreaOfUse area)
    • OSRAreaOfUse_east_lon_degree_get

      public static double OSRAreaOfUse_east_lon_degree_get​(AreaOfUse area)
    • OSRAreaOfUse_north_lat_degree_get

      public static double OSRAreaOfUse_north_lat_degree_get​(AreaOfUse area)
    • OSRAreaOfUse_name_get

      public static java.lang.String OSRAreaOfUse_name_get​(AreaOfUse area)
    • CreateCoordinateTransformation

      public static CoordinateTransformation CreateCoordinateTransformation​(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options)
    • CreateCoordinateTransformation

      public static CoordinateTransformation CreateCoordinateTransformation​(SpatialReference src, SpatialReference dst)
      Create transformation object.
      Parameters:
      src - source spatial reference system.
      dst - target spatial reference system.
      Returns:
      a new CoordinateTransformation object, or null in case of failure
      Since:
      GDAL 1.10
      See Also:
      CoordinateTransformation.CreateCoordinateTransformation(org.gdal.osr.SpatialReference, org.gdal.osr.SpatialReference
    • SetPROJSearchPath

      public static void SetPROJSearchPath​(java.lang.String utf8_path)
    • SetPROJSearchPaths

      public static void SetPROJSearchPaths​(java.util.Vector paths)
    • GetPROJSearchPaths

      public static java.util.Vector GetPROJSearchPaths()
    • GetPROJVersionMajor

      public static int GetPROJVersionMajor()
    • GetPROJVersionMinor

      public static int GetPROJVersionMinor()
    • GetPROJVersionMicro

      public static int GetPROJVersionMicro()
    • GetPROJEnableNetwork

      public static boolean GetPROJEnableNetwork()
    • SetPROJEnableNetwork

      public static void SetPROJEnableNetwork​(boolean enabled)
    • SetPROJAuxDbPath

      public static void SetPROJAuxDbPath​(java.lang.String utf8_path)
    • SetPROJAuxDbPaths

      public static void SetPROJAuxDbPaths​(java.util.Vector paths)
    • GetPROJAuxDbPaths

      public static java.util.Vector GetPROJAuxDbPaths()