/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.28
 *
 * 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;
  }

  protected static long getCPtrAndDisown(SpatialReference obj) {
    if (obj != null) obj.swigCMemOwn= false;
    return getCPtr(obj);
  }

  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 int IsLocal() {
    return osrJNI.SpatialReference_IsLocal(swigCPtr);
  }

  public int SetAuthority(String pszTargetKey, String pszAuthority, int nCode) {
    return osrJNI.SpatialReference_SetAuthority(swigCPtr, pszTargetKey, pszAuthority, nCode);
  }

  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 dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetACEA(swigCPtr, dfStdP1, dfStdP2, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetAE(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetAE(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetBonne(double dfStandardParallel, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetBonne(swigCPtr, dfStandardParallel, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetCEA(double dfStdP1, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetCEA(swigCPtr, dfStdP1, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetCS(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetCS(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetEC(double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetEC(swigCPtr, dfStdP1, dfStdP2, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetEckertIV(double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetEckertIV(swigCPtr, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetEckertVI(double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetEckertVI(swigCPtr, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetEquirectangular(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetEquirectangular(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetGS(double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetGS(swigCPtr, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetGH(double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetGH(swigCPtr, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetGEOS(double dfCentralMeridian, double dfSatelliteHeight, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetGEOS(swigCPtr, dfCentralMeridian, dfSatelliteHeight, dfFalseEasting, dfFalseNorthing);
  }

  public int SetGnomonic(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetGnomonic(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetHOM(double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetHOM(swigCPtr, dfCenterLat, dfCenterLong, dfAzimuth, dfRectToSkew, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetHOM2PNO(double dfCenterLat, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetHOM2PNO(swigCPtr, dfCenterLat, dfLat1, dfLong1, dfLat2, dfLong2, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetKrovak(double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfPseudoStdParallelLat, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetKrovak(swigCPtr, dfCenterLat, dfCenterLong, dfAzimuth, dfPseudoStdParallelLat, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetLAEA(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetLAEA(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetLCC(double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetLCC(swigCPtr, dfStdP1, dfStdP2, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetLCC1SP(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetLCC1SP(swigCPtr, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetLCCB(double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetLCCB(swigCPtr, dfStdP1, dfStdP2, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetMC(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetMC(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetMercator(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetMercator(swigCPtr, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetMollweide(double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetMollweide(swigCPtr, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetNZMG(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetNZMG(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetOS(double dfOriginLat, double dfCMeridian, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetOS(swigCPtr, dfOriginLat, dfCMeridian, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetOrthographic(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetOrthographic(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetPolyconic(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetPolyconic(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetPS(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetPS(swigCPtr, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetRobinson(double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetRobinson(swigCPtr, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetSinusoidal(double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetSinusoidal(swigCPtr, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetStereographic(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetStereographic(swigCPtr, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetSOC(double dfLatitudeOfOrigin, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetSOC(swigCPtr, dfLatitudeOfOrigin, dfCentralMeridian, dfFalseEasting, dfFalseNorthing);
  }

  public int SetTM(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetTM(swigCPtr, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetTMVariant(String pszVariantName, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetTMVariant(swigCPtr, pszVariantName, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetTMG(double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetTMG(swigCPtr, dfCenterLat, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  public int SetTMSO(double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetTMSO(swigCPtr, dfCenterLat, dfCenterLong, dfScale, dfFalseEasting, dfFalseNorthing);
  }

  public int SetVDG(double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) {
    return osrJNI.SpatialReference_SetVDG(swigCPtr, dfCenterLong, dfFalseEasting, dfFalseNorthing);
  }

  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 SetLocalCS(String pszName) {
    return osrJNI.SpatialReference_SetLocalCS(swigCPtr, pszName);
  }

  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(java.util.Vector 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);
  }

}
