/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.25 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ using System; using System.Runtime.InteropServices; public class SpatialReference : IDisposable { private HandleRef swigCPtr; protected bool swigCMemOwn; internal SpatialReference(IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(SpatialReference obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~SpatialReference() { Dispose(); } public virtual void Dispose() { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; osrPINVOKE.delete_SpatialReference(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } public SpatialReference(string wkt) : this(osrPINVOKE.new_SpatialReference(wkt), true) { } public string __str__() { string ret = osrPINVOKE.SpatialReference___str__(swigCPtr); return ret; } public int IsSame(SpatialReference rhs) { int ret = osrPINVOKE.SpatialReference_IsSame(swigCPtr, SpatialReference.getCPtr(rhs)); return ret; } public int IsSameGeogCS(SpatialReference rhs) { int ret = osrPINVOKE.SpatialReference_IsSameGeogCS(swigCPtr, SpatialReference.getCPtr(rhs)); return ret; } public int IsGeographic() { int ret = osrPINVOKE.SpatialReference_IsGeographic(swigCPtr); return ret; } public int IsProjected() { int ret = osrPINVOKE.SpatialReference_IsProjected(swigCPtr); return ret; } public string GetAttrValue(string name, int child) { string ret = osrPINVOKE.SpatialReference_GetAttrValue(swigCPtr, name, child); return ret; } public int SetAttrValue(string name, string value) { int ret = osrPINVOKE.SpatialReference_SetAttrValue(swigCPtr, name, value); return ret; } public int SetAngularUnits(string name, double to_radians) { int ret = osrPINVOKE.SpatialReference_SetAngularUnits(swigCPtr, name, to_radians); return ret; } public double GetAngularUnits() { double ret = osrPINVOKE.SpatialReference_GetAngularUnits(swigCPtr); return ret; } public int SetLinearUnits(string name, double to_meters) { int ret = osrPINVOKE.SpatialReference_SetLinearUnits(swigCPtr, name, to_meters); return ret; } public double GetLinearUnits() { double ret = osrPINVOKE.SpatialReference_GetLinearUnits(swigCPtr); return ret; } public string GetLinearUnitsName() { string ret = osrPINVOKE.SpatialReference_GetLinearUnitsName(swigCPtr); return ret; } public string GetAuthorityCode(string target_key) { string ret = osrPINVOKE.SpatialReference_GetAuthorityCode(swigCPtr, target_key); return ret; } public string GetAuthorityName(string target_key) { string ret = osrPINVOKE.SpatialReference_GetAuthorityName(swigCPtr, target_key); return ret; } public int SetUTM(int zone, int north) { int ret = osrPINVOKE.SpatialReference_SetUTM(swigCPtr, zone, north); return ret; } public int SetStatePlane(int zone, int is_nad83, string unitsname, double units) { int ret = osrPINVOKE.SpatialReference_SetStatePlane(swigCPtr, zone, is_nad83, unitsname, units); return ret; } public int AutoIdentifyEPSG() { int ret = osrPINVOKE.SpatialReference_AutoIdentifyEPSG(swigCPtr); return ret; } public int SetProjection(string arg) { int ret = osrPINVOKE.SpatialReference_SetProjection(swigCPtr, arg); return ret; } public int SetProjParm(string name, double val) { int ret = osrPINVOKE.SpatialReference_SetProjParm(swigCPtr, name, val); return ret; } public double GetProjParm(string name, double default_val) { double ret = osrPINVOKE.SpatialReference_GetProjParm(swigCPtr, name, default_val); return ret; } public int SetNormProjParm(string name, double val) { int ret = osrPINVOKE.SpatialReference_SetNormProjParm(swigCPtr, name, val); return ret; } public double GetNormProjParm(string name, double default_val) { double ret = osrPINVOKE.SpatialReference_GetNormProjParm(swigCPtr, name, default_val); return ret; } public int SetACEA(double stdp1, double stdp2, double clat, double clong, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetACEA(swigCPtr, stdp1, stdp2, clat, clong, fe, fn); return ret; } public int SetAE(double clat, double clon, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetAE(swigCPtr, clat, clon, fe, fn); return ret; } public int SetCS(double clat, double clong, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetCS(swigCPtr, clat, clong, fe, fn); return ret; } public int SetBonne(double clat, double clong, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetBonne(swigCPtr, clat, clong, fe, fn); return ret; } public int SetEC(double stdp1, double stdp2, double clat, double clong, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetEC(swigCPtr, stdp1, stdp2, clat, clong, fe, fn); return ret; } public int SetEckertIV(double cm, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetEckertIV(swigCPtr, cm, fe, fn); return ret; } public int SetEckertVI(double cm, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetEckertVI(swigCPtr, cm, fe, fn); return ret; } public int SetEquirectangular(double clat, double clong, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetEquirectangular(swigCPtr, clat, clong, fe, fn); return ret; } public int SetGS(double cm, double fe, double fn) { int ret = osrPINVOKE.SpatialReference_SetGS(swigCPtr, cm, fe, fn); return ret; } public int SetWellKnownGeogCS(string name) { int ret = osrPINVOKE.SpatialReference_SetWellKnownGeogCS(swigCPtr, name); return ret; } public int SetFromUserInput(string name) { int ret = osrPINVOKE.SpatialReference_SetFromUserInput(swigCPtr, name); return ret; } public int CopyGeogCSFrom(SpatialReference rhs) { int ret = osrPINVOKE.SpatialReference_CopyGeogCSFrom(swigCPtr, SpatialReference.getCPtr(rhs)); return ret; } public int SetTOWGS84(double p1, double p2, double p3, double p4, double p5, double p6, double p7) { int ret = osrPINVOKE.SpatialReference_SetTOWGS84(swigCPtr, p1, p2, p3, p4, p5, p6, p7); return ret; } public int GetTOWGS84() { int ret = osrPINVOKE.SpatialReference_GetTOWGS84(swigCPtr); return ret; } public int SetGeogCS(string pszGeogName, string pszDatumName, string pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, string pszPMName, double dfPMOffset, string pszUnits, double dfConvertToRadians) { int ret = osrPINVOKE.SpatialReference_SetGeogCS(swigCPtr, pszGeogName, pszDatumName, pszEllipsoidName, dfSemiMajor, dfInvFlattening, pszPMName, dfPMOffset, pszUnits, dfConvertToRadians); return ret; } public int SetProjCS(string name) { int ret = osrPINVOKE.SpatialReference_SetProjCS(swigCPtr, name); return ret; } public int ImportFromWkt(SWIGTYPE_p_p_char ppszInput) { int ret = osrPINVOKE.SpatialReference_ImportFromWkt(swigCPtr, SWIGTYPE_p_p_char.getCPtr(ppszInput)); return ret; } public int ImportFromProj4(string ppszInput) { int ret = osrPINVOKE.SpatialReference_ImportFromProj4(swigCPtr, ppszInput); return ret; } public int ImportFromESRI(SWIGTYPE_p_p_char ppszInput) { int ret = osrPINVOKE.SpatialReference_ImportFromESRI(swigCPtr, SWIGTYPE_p_p_char.getCPtr(ppszInput)); return ret; } public int ImportFromEPSG(int arg) { int ret = osrPINVOKE.SpatialReference_ImportFromEPSG(swigCPtr, arg); return ret; } public int ImportFromPCI(string proj, string units, SWIGTYPE_p_double argin) { int ret = osrPINVOKE.SpatialReference_ImportFromPCI(swigCPtr, proj, units, SWIGTYPE_p_double.getCPtr(argin)); return ret; } public int ImportFromUSGS(int proj_code, int zone, SWIGTYPE_p_double argin, int datum_code) { int ret = osrPINVOKE.SpatialReference_ImportFromUSGS(swigCPtr, proj_code, zone, SWIGTYPE_p_double.getCPtr(argin), datum_code); return ret; } public int ImportFromXML(string xmlString) { int ret = osrPINVOKE.SpatialReference_ImportFromXML(swigCPtr, xmlString); return ret; } public int ExportToWkt() { int ret = osrPINVOKE.SpatialReference_ExportToWkt(swigCPtr); return ret; } public int ExportToPrettyWkt(int simplify) { int ret = osrPINVOKE.SpatialReference_ExportToPrettyWkt(swigCPtr, simplify); return ret; } public int ExportToProj4() { int ret = osrPINVOKE.SpatialReference_ExportToProj4(swigCPtr); return ret; } public int ExportToPCI() { int ret = osrPINVOKE.SpatialReference_ExportToPCI(swigCPtr); return ret; } public int ExportToUSGS(out int code, out int zone, out int datum) { int ret = osrPINVOKE.SpatialReference_ExportToUSGS(swigCPtr, out code, out zone, out datum); return ret; } public int ExportToXML(string dialect) { int ret = osrPINVOKE.SpatialReference_ExportToXML(swigCPtr, dialect); return ret; } public SpatialReference CloneGeogCS() { IntPtr cPtr = osrPINVOKE.SpatialReference_CloneGeogCS(swigCPtr); SpatialReference ret = (cPtr == IntPtr.Zero) ? null : new SpatialReference(cPtr, true); return ret; } public int Validate() { int ret = osrPINVOKE.SpatialReference_Validate(swigCPtr); return ret; } public int StripCTParms() { int ret = osrPINVOKE.SpatialReference_StripCTParms(swigCPtr); return ret; } public int FixupOrdering() { int ret = osrPINVOKE.SpatialReference_FixupOrdering(swigCPtr); return ret; } public int Fixup() { int ret = osrPINVOKE.SpatialReference_Fixup(swigCPtr); return ret; } public int MorphToESRI() { int ret = osrPINVOKE.SpatialReference_MorphToESRI(swigCPtr); return ret; } public int MorphFromESRI() { int ret = osrPINVOKE.SpatialReference_MorphFromESRI(swigCPtr); return ret; } }