// python wrapper for vtkGeoProjection // #define VTK_WRAPPING_CXX #define VTK_STREAMS_FWD_ONLY #include "vtkPythonArgs.h" #include "vtkPythonOverload.h" #include "vtkConfigure.h" #include #include #include "vtkVariant.h" #include "vtkIndent.h" #include "vtkGeoProjection.h" extern "C" { VTK_ABI_EXPORT void PyVTKAddFile_vtkGeoProjection(PyObject *); } extern "C" { VTK_ABI_EXPORT PyObject *PyvtkGeoProjection_ClassNew(); } #ifndef DECLARED_PyvtkObject_ClassNew extern "C" { PyObject *PyvtkObject_ClassNew(); } #define DECLARED_PyvtkObject_ClassNew #endif static const char *PyvtkGeoProjection_Doc = "vtkGeoProjection - Represent a projection from a sphere to a plane\n\n" "Superclass: vtkObject\n\n" "This class uses the PROJ.4 library to represent geographic coordinate\n" "projections.\n\n"; static PyObject * PyvtkGeoProjection_IsTypeOf(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "IsTypeOf"); char *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = vtkGeoProjection::IsTypeOf(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_IsA(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "IsA"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { int tempr = (ap.IsBound() ? op->IsA(temp0) : op->vtkGeoProjection::IsA(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_SafeDownCast(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "SafeDownCast"); vtkObjectBase *temp0 = nullptr; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetVTKObject(temp0, "vtkObjectBase")) { vtkGeoProjection *tempr = vtkGeoProjection::SafeDownCast(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); } } return result; } static PyObject * PyvtkGeoProjection_NewInstance(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "NewInstance"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { vtkGeoProjection *tempr = (ap.IsBound() ? op->NewInstance() : op->vtkGeoProjection::NewInstance()); if (!ap.ErrorOccurred()) { result = ap.BuildVTKObject(tempr); if (result && PyVTKObject_Check(result)) { PyVTKObject_GetObject(result)->UnRegister(0); PyVTKObject_SetFlag(result, VTK_PYTHON_IGNORE_UNREGISTER, 1); } } } return result; } static PyObject * PyvtkGeoProjection_GetNumberOfProjections(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "GetNumberOfProjections"); PyObject *result = nullptr; if (ap.CheckArgCount(0)) { int tempr = vtkGeoProjection::GetNumberOfProjections(); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_GetProjectionName(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "GetProjectionName"); int temp0; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { const char *tempr = vtkGeoProjection::GetProjectionName(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_GetProjectionDescription(PyObject *, PyObject *args) { vtkPythonArgs ap(args, "GetProjectionDescription"); int temp0; PyObject *result = nullptr; if (ap.CheckArgCount(1) && ap.GetValue(temp0)) { const char *tempr = vtkGeoProjection::GetProjectionDescription(temp0); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_SetName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetName(temp0); } else { op->vtkGeoProjection::SetName(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoProjection_GetName(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetName"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { char *tempr = (ap.IsBound() ? op->GetName() : op->vtkGeoProjection::GetName()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_GetIndex(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetIndex"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetIndex() : op->vtkGeoProjection::GetIndex()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_GetDescription(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetDescription"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { const char *tempr = (ap.IsBound() ? op->GetDescription() : op->vtkGeoProjection::GetDescription()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_SetCentralMeridian(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetCentralMeridian"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); double temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->SetCentralMeridian(temp0); } else { op->vtkGeoProjection::SetCentralMeridian(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoProjection_GetCentralMeridian(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetCentralMeridian"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { double tempr = (ap.IsBound() ? op->GetCentralMeridian() : op->vtkGeoProjection::GetCentralMeridian()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_SetOptionalParameter(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "SetOptionalParameter"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); char *temp0 = nullptr; char *temp1 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(2) && ap.GetValue(temp0) && ap.GetValue(temp1)) { if (ap.IsBound()) { op->SetOptionalParameter(temp0, temp1); } else { op->vtkGeoProjection::SetOptionalParameter(temp0, temp1); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoProjection_RemoveOptionalParameter(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "RemoveOptionalParameter"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); char *temp0 = nullptr; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { if (ap.IsBound()) { op->RemoveOptionalParameter(temp0); } else { op->vtkGeoProjection::RemoveOptionalParameter(temp0); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyObject * PyvtkGeoProjection_GetNumberOfOptionalParameters(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetNumberOfOptionalParameters"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { int tempr = (ap.IsBound() ? op->GetNumberOfOptionalParameters() : op->vtkGeoProjection::GetNumberOfOptionalParameters()); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_GetOptionalParameterKey(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOptionalParameterKey"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { const char *tempr = (ap.IsBound() ? op->GetOptionalParameterKey(temp0) : op->vtkGeoProjection::GetOptionalParameterKey(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_GetOptionalParameterValue(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "GetOptionalParameterValue"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); int temp0; PyObject *result = nullptr; if (op && ap.CheckArgCount(1) && ap.GetValue(temp0)) { const char *tempr = (ap.IsBound() ? op->GetOptionalParameterValue(temp0) : op->vtkGeoProjection::GetOptionalParameterValue(temp0)); if (!ap.ErrorOccurred()) { result = ap.BuildValue(tempr); } } return result; } static PyObject * PyvtkGeoProjection_ClearOptionalParameters(PyObject *self, PyObject *args) { vtkPythonArgs ap(self, args, "ClearOptionalParameters"); vtkObjectBase *vp = ap.GetSelfPointer(self, args); vtkGeoProjection *op = static_cast(vp); PyObject *result = nullptr; if (op && ap.CheckArgCount(0)) { if (ap.IsBound()) { op->ClearOptionalParameters(); } else { op->vtkGeoProjection::ClearOptionalParameters(); } if (!ap.ErrorOccurred()) { result = ap.BuildNone(); } } return result; } static PyMethodDef PyvtkGeoProjection_Methods[] = { {"IsTypeOf", PyvtkGeoProjection_IsTypeOf, METH_VARARGS, "V.IsTypeOf(string) -> int\nC++: static vtkTypeBool IsTypeOf(const char *type)\n\nReturn 1 if this class type is the same type of (or a subclass\nof) the named class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"IsA", PyvtkGeoProjection_IsA, METH_VARARGS, "V.IsA(string) -> int\nC++: vtkTypeBool IsA(const char *type) override;\n\nReturn 1 if this class is the same type of (or a subclass of) the\nnamed class. Returns 0 otherwise. This method works in\ncombination with vtkTypeMacro found in vtkSetGet.h.\n"}, {"SafeDownCast", PyvtkGeoProjection_SafeDownCast, METH_VARARGS, "V.SafeDownCast(vtkObjectBase) -> vtkGeoProjection\nC++: static vtkGeoProjection *SafeDownCast(vtkObjectBase *o)\n\n"}, {"NewInstance", PyvtkGeoProjection_NewInstance, METH_VARARGS, "V.NewInstance() -> vtkGeoProjection\nC++: vtkGeoProjection *NewInstance()\n\n"}, {"GetNumberOfProjections", PyvtkGeoProjection_GetNumberOfProjections, METH_VARARGS, "V.GetNumberOfProjections() -> int\nC++: static int GetNumberOfProjections()\n\nReturns the number of projections that this class offers.\n"}, {"GetProjectionName", PyvtkGeoProjection_GetProjectionName, METH_VARARGS, "V.GetProjectionName(int) -> string\nC++: static const char *GetProjectionName(int projection)\n\nReturns the name of one of the projections supported by this\nclass. You can pass these strings to SetName(char*).\n@param projection the index of a projection, must be in\n [0,GetNumberOfProjections()[.\n"}, {"GetProjectionDescription", PyvtkGeoProjection_GetProjectionDescription, METH_VARARGS, "V.GetProjectionDescription(int) -> string\nC++: static const char *GetProjectionDescription(int projection)\n\nReturns a description of one of the projections supported by this\nclass.\n@param projection the index of a projection, must be in\n [0,GetNumberOfProjections()[.\n"}, {"SetName", PyvtkGeoProjection_SetName, METH_VARARGS, "V.SetName(string)\nC++: virtual void SetName(const char *_arg)\n\nSet/get the short name describing the projection you wish to use.\nThis defaults to \"rpoly\" for no reason other than I like it. To\nget a list of valid values, use the GetNumberOfProjections() and\nGetProjectionName(int) static methods.\n"}, {"GetName", PyvtkGeoProjection_GetName, METH_VARARGS, "V.GetName() -> string\nC++: virtual char *GetName()\n\nSet/get the short name describing the projection you wish to use.\nThis defaults to \"rpoly\" for no reason other than I like it. To\nget a list of valid values, use the GetNumberOfProjections() and\nGetProjectionName(int) static methods.\n"}, {"GetIndex", PyvtkGeoProjection_GetIndex, METH_VARARGS, "V.GetIndex() -> int\nC++: int GetIndex()\n\nReturn the index of the current projection's type in the list of\nall projection types. On error, this will return -1. On success,\nit returns a number in [0,GetNumberOfProjections()[.\n"}, {"GetDescription", PyvtkGeoProjection_GetDescription, METH_VARARGS, "V.GetDescription() -> string\nC++: const char *GetDescription()\n\nGet the description of a projection. This will return nullptr if\nthe projection name is invalid.\n"}, {"SetCentralMeridian", PyvtkGeoProjection_SetCentralMeridian, METH_VARARGS, "V.SetCentralMeridian(float)\nC++: virtual void SetCentralMeridian(double _arg)\n\nSet/get the longitude which corresponds to the central meridian\nof the projection. This defaults to 0, the Greenwich Meridian.\n"}, {"GetCentralMeridian", PyvtkGeoProjection_GetCentralMeridian, METH_VARARGS, "V.GetCentralMeridian() -> float\nC++: virtual double GetCentralMeridian()\n\nSet/get the longitude which corresponds to the central meridian\nof the projection. This defaults to 0, the Greenwich Meridian.\n"}, {"SetOptionalParameter", PyvtkGeoProjection_SetOptionalParameter, METH_VARARGS, "V.SetOptionalParameter(string, string)\nC++: void SetOptionalParameter(const char *key, const char *value)\n\nAdd an optional parameter to the projection that will be computed\nor replace it if already present.\n"}, {"RemoveOptionalParameter", PyvtkGeoProjection_RemoveOptionalParameter, METH_VARARGS, "V.RemoveOptionalParameter(string)\nC++: void RemoveOptionalParameter(const char *)\n\nRemove an optional parameter to the projection that will be\ncomputed\n"}, {"GetNumberOfOptionalParameters", PyvtkGeoProjection_GetNumberOfOptionalParameters, METH_VARARGS, "V.GetNumberOfOptionalParameters() -> int\nC++: int GetNumberOfOptionalParameters()\n\nReturn the number of optional parameters\n"}, {"GetOptionalParameterKey", PyvtkGeoProjection_GetOptionalParameterKey, METH_VARARGS, "V.GetOptionalParameterKey(int) -> string\nC++: const char *GetOptionalParameterKey(int index)\n\nReturn the number of optional parameters\n"}, {"GetOptionalParameterValue", PyvtkGeoProjection_GetOptionalParameterValue, METH_VARARGS, "V.GetOptionalParameterValue(int) -> string\nC++: const char *GetOptionalParameterValue(int index)\n\nReturn the number of optional parameters\n"}, {"ClearOptionalParameters", PyvtkGeoProjection_ClearOptionalParameters, METH_VARARGS, "V.ClearOptionalParameters()\nC++: void ClearOptionalParameters()\n\nClear all optional parameters\n"}, {nullptr, nullptr, 0, nullptr} }; static PyTypeObject PyvtkGeoProjection_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "vtkGeovisCorePython.vtkGeoProjection", // tp_name sizeof(PyVTKObject), // tp_basicsize 0, // tp_itemsize PyVTKObject_Delete, // tp_dealloc 0, // tp_print nullptr, // tp_getattr nullptr, // tp_setattr nullptr, // tp_compare PyVTKObject_Repr, // tp_repr nullptr, // tp_as_number nullptr, // tp_as_sequence nullptr, // tp_as_mapping nullptr, // tp_hash nullptr, // tp_call PyVTKObject_String, // tp_str PyObject_GenericGetAttr, // tp_getattro PyObject_GenericSetAttr, // tp_setattro &PyVTKObject_AsBuffer, // tp_as_buffer Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, // tp_flags PyvtkGeoProjection_Doc, // tp_doc PyVTKObject_Traverse, // tp_traverse nullptr, // tp_clear nullptr, // tp_richcompare offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset nullptr, // tp_iter nullptr, // tp_iternext nullptr, // tp_methods nullptr, // tp_members PyVTKObject_GetSet, // tp_getset nullptr, // tp_base nullptr, // tp_dict nullptr, // tp_descr_get nullptr, // tp_descr_set offsetof(PyVTKObject, vtk_dict), // tp_dictoffset nullptr, // tp_init nullptr, // tp_alloc PyVTKObject_New, // tp_new PyObject_GC_Del, // tp_free nullptr, // tp_is_gc nullptr, // tp_bases nullptr, // tp_mro nullptr, // tp_cache nullptr, // tp_subclasses nullptr, // tp_weaklist VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED }; static vtkObjectBase *PyvtkGeoProjection_StaticNew() { return vtkGeoProjection::New(); } PyObject *PyvtkGeoProjection_ClassNew() { PyVTKClass_Add( &PyvtkGeoProjection_Type, PyvtkGeoProjection_Methods, "vtkGeoProjection", &PyvtkGeoProjection_StaticNew); PyTypeObject *pytype = &PyvtkGeoProjection_Type; if ((pytype->tp_flags & Py_TPFLAGS_READY) != 0) { return (PyObject *)pytype; } #if !defined(VTK_PY3K) && PY_VERSION_HEX >= 0x02060000 pytype->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #endif pytype->tp_base = (PyTypeObject *)PyvtkObject_ClassNew(); PyType_Ready(pytype); return (PyObject *)pytype; } void PyVTKAddFile_vtkGeoProjection( PyObject *dict) { PyObject *o; o = PyvtkGeoProjection_ClassNew(); if (o && PyDict_SetItemString(dict, "vtkGeoProjection", o) != 0) { Py_DECREF(o); } }