Package org.gdal.osr

Class osr

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

public class osr extends 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 String GetWellKnownGeogCSAsWKT(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 String GetUserInputAsWKT(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(String name, String[] argout)
    • GetUserInputAsWKT

      public static int GetUserInputAsWKT(String name, 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 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:
    • SetPROJSearchPath

      public static void SetPROJSearchPath(String utf8_path)
    • SetPROJSearchPaths

      public static void SetPROJSearchPaths(Vector paths)
    • GetPROJSearchPaths

      public static 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(String utf8_path)
    • SetPROJAuxDbPaths

      public static void SetPROJAuxDbPaths(Vector paths)
    • GetPROJAuxDbPaths

      public static Vector GetPROJAuxDbPaths()