/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.27
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.gdal.osr;

public class SpatialReference {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public SpatialReference(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }
  
  public static long getCPtr(SpatialReference obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      osrJNI.delete_SpatialReference(swigCPtr);
    }
    swigCPtr = 0;
  }

  public SpatialReference(String wkt) {
    this(osrJNI.new_SpatialReference(wkt), true);
  }

  public String __str__() {
    return osrJNI.SpatialReference___str__(swigCPtr);
  }

  public int IsSame(SpatialReference rhs) {
    return osrJNI.SpatialReference_IsSame(swigCPtr, SpatialReference.getCPtr(rhs));
  }

  public int IsSameGeogCS(SpatialReference rhs) {
    return osrJNI.SpatialReference_IsSameGeogCS(swigCPtr, SpatialReference.getCPtr(rhs));
  }

  public int IsGeographic() {
    return osrJNI.SpatialReference_IsGeographic(swigCPtr);
  }

  public int IsProjected() {
    return osrJNI.SpatialReference_IsProjected(swigCPtr);
  }

  public String GetAttrValue(String name, int child) {
    return osrJNI.SpatialReference_GetAttrValue(swigCPtr, name, child);
  }

  public int SetAttrValue(String name, String value) {
    return osrJNI.SpatialReference_SetAttrValue(swigCPtr, name, value);
  }

  public int SetAngularUnits(String name, double to_radians) {
    return osrJNI.SpatialReference_SetAngularUnits(swigCPtr, name, to_radians);
  }

  public double GetAngularUnits() {
    return osrJNI.SpatialReference_GetAngularUnits(swigCPtr);
  }

  public int SetLinearUnits(String name, double to_meters) {
    return osrJNI.SpatialReference_SetLinearUnits(swigCPtr, name, to_meters);
  }

  public double GetLinearUnits() {
    return osrJNI.SpatialReference_GetLinearUnits(swigCPtr);
  }

  public String GetLinearUnitsName() {
    return osrJNI.SpatialReference_GetLinearUnitsName(swigCPtr);
  }

  public String GetAuthorityCode(String target_key) {
    return osrJNI.SpatialReference_GetAuthorityCode(swigCPtr, target_key);
  }

  public String GetAuthorityName(String target_key) {
    return osrJNI.SpatialReference_GetAuthorityName(swigCPtr, target_key);
  }

  public int SetUTM(int zone, int north) {
    return osrJNI.SpatialReference_SetUTM(swigCPtr, zone, north);
  }

  public int SetStatePlane(int zone, int is_nad83, String unitsname, double units) {
    return osrJNI.SpatialReference_SetStatePlane(swigCPtr, zone, is_nad83, unitsname, units);
  }

  public int AutoIdentifyEPSG() {
    return osrJNI.SpatialReference_AutoIdentifyEPSG(swigCPtr);
  }

  public int SetProjection(String arg) {
    return osrJNI.SpatialReference_SetProjection(swigCPtr, arg);
  }

  public int SetProjParm(String name, double val) {
    return osrJNI.SpatialReference_SetProjParm(swigCPtr, name, val);
  }

  public double GetProjParm(String name, double default_val) {
    return osrJNI.SpatialReference_GetProjParm(swigCPtr, name, default_val);
  }

  public int SetNormProjParm(String name, double val) {
    return osrJNI.SpatialReference_SetNormProjParm(swigCPtr, name, val);
  }

  public double GetNormProjParm(String name, double default_val) {
    return osrJNI.SpatialReference_GetNormProjParm(swigCPtr, name, default_val);
  }

  public int SetACEA(double stdp1, double stdp2, double clat, double clong, double fe, double fn) {
    return osrJNI.SpatialReference_SetACEA(swigCPtr, stdp1, stdp2, clat, clong, fe, fn);
  }

  public int SetAE(double clat, double clon, double fe, double fn) {
    return osrJNI.SpatialReference_SetAE(swigCPtr, clat, clon, fe, fn);
  }

  public int SetCS(double clat, double clong, double fe, double fn) {
    return osrJNI.SpatialReference_SetCS(swigCPtr, clat, clong, fe, fn);
  }

  public int SetBonne(double clat, double clong, double fe, double fn) {
    return osrJNI.SpatialReference_SetBonne(swigCPtr, clat, clong, fe, fn);
  }

  public int SetEC(double stdp1, double stdp2, double clat, double clong, double fe, double fn) {
    return osrJNI.SpatialReference_SetEC(swigCPtr, stdp1, stdp2, clat, clong, fe, fn);
  }

  public int SetEckertIV(double cm, double fe, double fn) {
    return osrJNI.SpatialReference_SetEckertIV(swigCPtr, cm, fe, fn);
  }

  public int SetEckertVI(double cm, double fe, double fn) {
    return osrJNI.SpatialReference_SetEckertVI(swigCPtr, cm, fe, fn);
  }

  public int SetEquirectangular(double clat, double clong, double fe, double fn) {
    return osrJNI.SpatialReference_SetEquirectangular(swigCPtr, clat, clong, fe, fn);
  }

  public int SetGS(double cm, double fe, double fn) {
    return osrJNI.SpatialReference_SetGS(swigCPtr, cm, fe, fn);
  }

  public int SetWellKnownGeogCS(String name) {
    return osrJNI.SpatialReference_SetWellKnownGeogCS(swigCPtr, name);
  }

  public int SetFromUserInput(String name) {
    return osrJNI.SpatialReference_SetFromUserInput(swigCPtr, name);
  }

  public int CopyGeogCSFrom(SpatialReference rhs) {
    return osrJNI.SpatialReference_CopyGeogCSFrom(swigCPtr, SpatialReference.getCPtr(rhs));
  }

  public int SetTOWGS84(double p1, double p2, double p3, double p4, double p5, double p6, double p7) {
    return osrJNI.SpatialReference_SetTOWGS84(swigCPtr, p1, p2, p3, p4, p5, p6, p7);
  }

  public int GetTOWGS84(double[] argout) {
    return osrJNI.SpatialReference_GetTOWGS84(swigCPtr, argout);
  }

  public int SetGeogCS(String pszGeogName, String pszDatumName, String pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, String pszPMName, double dfPMOffset, String pszUnits, double dfConvertToRadians) {
    return osrJNI.SpatialReference_SetGeogCS(swigCPtr, pszGeogName, pszDatumName, pszEllipsoidName, dfSemiMajor, dfInvFlattening, pszPMName, dfPMOffset, pszUnits, dfConvertToRadians);
  }

  public int SetProjCS(String name) {
    return osrJNI.SpatialReference_SetProjCS(swigCPtr, name);
  }

  public int ImportFromWkt(String ppszInput) {
    return osrJNI.SpatialReference_ImportFromWkt(swigCPtr, ppszInput);
  }

  public int ImportFromProj4(String ppszInput) {
    return osrJNI.SpatialReference_ImportFromProj4(swigCPtr, ppszInput);
  }

  public int ImportFromESRI(String ppszInput) {
    return osrJNI.SpatialReference_ImportFromESRI(swigCPtr, ppszInput);
  }

  public int ImportFromEPSG(int arg) {
    return osrJNI.SpatialReference_ImportFromEPSG(swigCPtr, arg);
  }

  public int ImportFromPCI(String proj, String units, double[] argin) {
    return osrJNI.SpatialReference_ImportFromPCI(swigCPtr, proj, units, argin);
  }

  public int ImportFromUSGS(int proj_code, int zone, double[] argin, int datum_code) {
    return osrJNI.SpatialReference_ImportFromUSGS(swigCPtr, proj_code, zone, argin, datum_code);
  }

  public int ImportFromXML(String xmlString) {
    return osrJNI.SpatialReference_ImportFromXML(swigCPtr, xmlString);
  }

  public int ExportToWkt(String[] argout) {
    return osrJNI.SpatialReference_ExportToWkt(swigCPtr, argout);
  }

  public int ExportToPrettyWkt(String[] argout, int simplify) {
    return osrJNI.SpatialReference_ExportToPrettyWkt(swigCPtr, argout, simplify);
  }

  public int ExportToProj4(String[] argout) {
    return osrJNI.SpatialReference_ExportToProj4(swigCPtr, argout);
  }

  public int ExportToPCI(String[] proj, String[] units, double[] parms) {
    return osrJNI.SpatialReference_ExportToPCI(swigCPtr, proj, units, parms);
  }

  public int ExportToUSGS(int[] code, int[] zone, double[] parms, int[] datum) {
    return osrJNI.SpatialReference_ExportToUSGS(swigCPtr, code, zone, parms, datum);
  }

  public int ExportToXML(String[] argout, String dialect) {
    return osrJNI.SpatialReference_ExportToXML(swigCPtr, argout, dialect);
  }

  public SpatialReference CloneGeogCS() {
    long cPtr = osrJNI.SpatialReference_CloneGeogCS(swigCPtr);
    return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
  }

  public int Validate() {
    return osrJNI.SpatialReference_Validate(swigCPtr);
  }

  public int StripCTParms() {
    return osrJNI.SpatialReference_StripCTParms(swigCPtr);
  }

  public int FixupOrdering() {
    return osrJNI.SpatialReference_FixupOrdering(swigCPtr);
  }

  public int Fixup() {
    return osrJNI.SpatialReference_Fixup(swigCPtr);
  }

  public int MorphToESRI() {
    return osrJNI.SpatialReference_MorphToESRI(swigCPtr);
  }

  public int MorphFromESRI() {
    return osrJNI.SpatialReference_MorphFromESRI(swigCPtr);
  }

}
