ext/gdal-ruby/ogr/ogr.cpp in gdal-0.0.7 vs ext/gdal-ruby/ogr/ogr.cpp in gdal-1.0.0

- old
+ new

@@ -1,13 +1,13 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.4 - * - * This file is not intended to be easily readable and contains a number of + * Version 3.0.5 + * + * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGRUBY @@ -63,32 +63,32 @@ /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN @@ -127,11 +127,11 @@ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE @@ -172,32 +172,32 @@ /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif /* internal SWIG method */ #ifndef SWIGINTERN @@ -236,11 +236,11 @@ #ifndef SWIGSTDCALL # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE @@ -274,11 +274,11 @@ /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. - + But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ #ifndef SWIGRUNTIME @@ -300,20 +300,20 @@ /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code } else { @@ -342,27 +342,27 @@ ... } } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if (<obj is ok>) { - if (<need new object>) { - *ptr = <ptr to new allocated object>; - return SWIG_NEWOBJ; - } else { - *ptr = <ptr to old object>; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the SWIG errors code. @@ -372,21 +372,21 @@ int food(double) int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) /* The NewMask denotes the object was created (using new/malloc) */ #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) @@ -413,18 +413,18 @@ # ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast +# define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include <string.h> @@ -464,11 +464,11 @@ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class<int>" == "Class<int >", etc. Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. @@ -484,47 +484,36 @@ return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like <name1>|<name2>|... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; - while (!equiv && *ne) { + while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like <name1>|<name2>|... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } - /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { @@ -548,11 +537,11 @@ } } return 0; } -/* +/* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { if (ty) { @@ -583,11 +572,11 @@ SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { swig_type_info *lastty = ty; @@ -627,59 +616,59 @@ } else return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { if (iter->size) { - register size_t l = 0; - register size_t r = iter->size - 1; + size_t l = 0; + size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { - register int compare = strcmp(name, iname); - if (compare == 0) { + int compare = strcmp(name, iname); + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { r = i - 1; } else { @@ -700,86 +689,86 @@ /* Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); if (ret) { return ret; } else { /* STEP 2: If the type hasn't been found, do a complete search of the str field (the human readable name) */ swig_module_info *iter = start; do { - register size_t i = 0; + size_t i = 0; for (; i < iter->size; ++i) { if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) return iter->types[i]; } iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { static const char hex[17] = "0123456789abcdef"; - register const unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; + const unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; for (; u != eu; ++u) { - register unsigned char uu = *u; + unsigned char uu = *u; *(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[uu & 0xf]; } return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - register unsigned char *u = (unsigned char *) ptr; - register const unsigned char *eu = u + sz; + unsigned char *u = (unsigned char *) ptr; + const unsigned char *eu = u + sz; for (; u != eu; ++u) { - register char d = *(c++); - register unsigned char uu; + char d = *(c++); + unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { char *r = buff; @@ -835,22 +824,22 @@ #ifdef __cplusplus } #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 #include <ruby.h> @@ -1396,11 +1385,11 @@ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* Runtime API */ -#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) /* Error manipulation */ @@ -1512,18 +1501,17 @@ /* Define Ruby class for C type */ SWIGRUNTIME void SWIG_Ruby_define_class(swig_type_info *type) { - VALUE klass; char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); sprintf(klass_name, "TYPE%s", type->name); if (NIL_P(_cSWIG_Pointer)) { _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); } - klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); + rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); free((void *) klass_name); } /* Create a new pointer object */ SWIGRUNTIME VALUE @@ -1550,11 +1538,11 @@ /* Check the object's type and make sure it has the correct type. It might not in cases where methods do things like downcast methods. */ if (obj != Qnil) { VALUE value = rb_iv_get(obj, "@__swigtype__"); - char* type_name = RSTRING_PTR(value); + const char* type_name = RSTRING_PTR(value); if (strcmp(type->name, type_name) == 0) { return obj; } } @@ -1732,11 +1720,11 @@ type_error: return SWIG_ERROR; } SWIGRUNTIME swig_module_info * -SWIG_Ruby_GetModule(void) +SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata)) { VALUE pointer; swig_module_info *ret = 0; VALUE verbose = rb_gv_get("VERBOSE"); @@ -1772,11 +1760,11 @@ } */ SWIGINTERN int SWIG_Ruby_isCallable( VALUE proc ) { - if ( rb_respond_to( proc, swig_call_id ) == Qtrue ) + if ( rb_respond_to( proc, swig_call_id ) ) return 1; return 0; } /* This function can be used to check the arity (number of arguments) @@ -1785,11 +1773,11 @@ which indicate a variable number of parameters at the end. */ SWIGINTERN int SWIG_Ruby_arity( VALUE proc, int minimal ) { - if ( rb_respond_to( proc, swig_arity_id ) == Qtrue ) + if ( rb_respond_to( proc, swig_arity_id ) ) { VALUE num = rb_funcall( proc, swig_arity_id, 0 ); int arity = NUM2INT(num); if ( arity < 0 && (arity+1) < -minimal ) return 1; if ( arity == minimal ) return 1; @@ -1814,29 +1802,31 @@ #define SWIG_exception(code, msg) do { SWIG_Error(code, msg);; } while(0) /* -------- TYPES TABLE (BEGIN) -------- */ -#define SWIGTYPE_p_GIntBig swig_types[0] -#define SWIGTYPE_p_OGRDataSourceShadow swig_types[1] -#define SWIGTYPE_p_OGRDriverShadow swig_types[2] -#define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[3] -#define SWIGTYPE_p_OGRFeatureShadow swig_types[4] -#define SWIGTYPE_p_OGRFieldDefnShadow swig_types[5] -#define SWIGTYPE_p_OGRGeometryShadow swig_types[6] -#define SWIGTYPE_p_OGRLayerShadow swig_types[7] -#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[8] -#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[9] -#define SWIGTYPE_p_char swig_types[10] -#define SWIGTYPE_p_double swig_types[11] -#define SWIGTYPE_p_int swig_types[12] -#define SWIGTYPE_p_p_char swig_types[13] -#define SWIGTYPE_p_p_double swig_types[14] -#define SWIGTYPE_p_p_int swig_types[15] -#define SWIGTYPE_p_p_p_char swig_types[16] -static swig_type_info *swig_types[18]; -static swig_module_info swig_module = {swig_types, 17, 0, 0, 0, 0}; +#define SWIGTYPE_p_GDALProgressFunc swig_types[0] +#define SWIGTYPE_p_GIntBig swig_types[1] +#define SWIGTYPE_p_OGRDataSourceShadow swig_types[2] +#define SWIGTYPE_p_OGRDriverShadow swig_types[3] +#define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[4] +#define SWIGTYPE_p_OGRFeatureShadow swig_types[5] +#define SWIGTYPE_p_OGRFieldDefnShadow swig_types[6] +#define SWIGTYPE_p_OGRGeometryShadow swig_types[7] +#define SWIGTYPE_p_OGRLayerShadow swig_types[8] +#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[9] +#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[10] +#define SWIGTYPE_p_char swig_types[11] +#define SWIGTYPE_p_double swig_types[12] +#define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[13] +#define SWIGTYPE_p_int swig_types[14] +#define SWIGTYPE_p_p_char swig_types[15] +#define SWIGTYPE_p_p_double swig_types[16] +#define SWIGTYPE_p_p_int swig_types[17] +#define SWIGTYPE_p_p_p_char swig_types[18] +static swig_type_info *swig_types[20]; +static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ @@ -1847,11 +1837,11 @@ #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK -#define SWIGVERSION 0x020004 +#define SWIGVERSION 0x030005 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) @@ -1956,11 +1946,11 @@ #ifdef __cplusplus extern "C" { #endif -// Ruby 1.9 changed the file name of this header +/* Ruby 1.9 changed the file name of this header */ #ifdef HAVE_RUBY_IO_H #include "ruby/io.h" #else #include "rubyio.h" #endif @@ -2032,15 +2022,11 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) { if (TYPE(obj) == T_STRING) { - #if defined(StringValuePtr) char *cstr = StringValuePtr(obj); - #else - char *cstr = STR2CSTR(obj); - #endif size_t size = RSTRING_LEN(obj) + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size))); @@ -2084,11 +2070,11 @@ { return Qnil; } -/*@SWIG:/usr/local/Cellar/swig/2.0.4/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long *res = (long *)(args[1]); @@ -2129,16 +2115,19 @@ } return res; } SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){ + CPLErrorReset(); OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update); if( CPLGetLastErrorType() == CE_Failure && ds != NULL ) { - CPLDebug( "SWIG", - "OGR_Dr_Open() succeeded, but an error is posted, so we destroy" - " the datasource and fail at swig level." ); + CPLDebug( + "SWIG", + "OGR_Dr_Open() succeeded, but an error is posted, so we destroy" + " the datasource and fail at swig level.\nError:%s", + CPLGetLastErrorMsg() ); OGRReleaseDataSource(ds); ds = NULL; } return ds; } @@ -2236,17 +2225,17 @@ } SWIGINTERN void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){ OGR_L_SetSpatialFilter (self, filter); } -/*@SWIG:/usr/local/Cellar/swig/2.0.4/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); double *res = (double *)(args[1]); - *res = NUM2DBL(obj); + *res = NUM2DBL(obj); (void)type; return obj; } /*@SWIG@*/ SWIGINTERN int @@ -2367,10 +2356,31 @@ return OGR_L_GetFeaturesRead(self); } SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){ return OGR_L_SetIgnoredFields( self, options ); } +SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data ); + } +SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data ); + } +SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data ); + } +SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data ); + } +SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data ); + } +SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data ); + } +SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){ + return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data ); + } SWIGINTERN void OGRLayerShadow_each(OGRLayerShadow *self){ OGRFeatureShadow* feature = NULL; while (feature = (OGRFeatureShadow*) OGR_L_GetNextFeature(self)) { @@ -2879,10 +2889,17 @@ return NULL; return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) ); } +OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) { + if (geom_in == NULL) + return NULL; + return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) ); +} + + OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) { if (geom_in == NULL) return NULL; return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) ); } @@ -3119,10 +3136,13 @@ SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){ OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint ); OGR_G_Centroid( self, pt ); return pt; } +SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){ + return (OGRGeometryShadow*) OGR_G_PointOnSurface( self ); + } SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){ return OGR_G_WkbSize(self); } SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){ return OGR_G_GetCoordinateDimension(self); @@ -3206,10 +3226,15 @@ else return papszArgv; } +int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) { + return GDALTermProgress( dfProgress, pszMessage, pData); +} + + /* Document-method: Gdal::Ogr.use_exceptions call-seq: use_exceptions @@ -3257,18 +3282,18 @@ Proxy of C++ Gdal::Ogr::Driver class */ -swig_class SwigClassDriver; +static swig_class SwigClassDriver; /* Document-method: Gdal::Ogr::Driver.name call-seq: - name -> char + name -> char const * Get value of attribute. */ SWIGINTERN VALUE @@ -3317,11 +3342,11 @@ /* Document-method: Gdal::Ogr::Driver.create_data_source call-seq: - create_data_source(char utf8_path, char options=0) -> DataSource + create_data_source(char const * utf8_path, char ** options=None) -> DataSource An instance method. */ SWIGINTERN VALUE @@ -3332,11 +3357,11 @@ void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","utf8_path","options", NULL }; OGRDataSourceShadow *result = 0 ; VALUE vresult = Qnil; @@ -3410,11 +3435,11 @@ /* Document-method: Gdal::Ogr::Driver.copy_data_source call-seq: - copy_data_source(DataSource copy_ds, char utf8_path, char options=0) -> DataSource + copy_data_source(DataSource copy_ds, char const * utf8_path, char ** options=None) -> DataSource An instance method. */ SWIGINTERN VALUE @@ -3428,11 +3453,11 @@ void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","copy_ds","utf8_path","options", NULL }; OGRDataSourceShadow *result = 0 ; VALUE vresult = Qnil; @@ -3511,11 +3536,11 @@ /* Document-method: Gdal::Ogr::Driver.open call-seq: - open(char utf8_path, int update=0) -> DataSource + open(char const * utf8_path, int update=0) -> DataSource An instance method. */ SWIGINTERN VALUE @@ -3528,11 +3553,11 @@ int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int val3 ; int ecode3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","utf8_path","update", NULL }; OGRDataSourceShadow *result = 0 ; VALUE vresult = Qnil; @@ -3588,11 +3613,11 @@ /* Document-method: Gdal::Ogr::Driver.delete_data_source call-seq: - delete_data_source(char utf8_path) -> int + delete_data_source(char const * utf8_path) -> int An instance method. */ SWIGINTERN VALUE @@ -3652,11 +3677,11 @@ /* Document-method: Gdal::Ogr::Driver.test_capability call-seq: - test_capability(char cap) -> bool + test_capability(char const * cap) -> bool An instance method. */ SWIGINTERN VALUE @@ -3721,11 +3746,11 @@ /* Document-method: Gdal::Ogr::Driver.get_name call-seq: - get_name -> char + get_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -3877,18 +3902,18 @@ Proxy of C++ Gdal::Ogr::DataSource class */ -swig_class SwigClassDataSource; +static swig_class SwigClassDataSource; /* Document-method: Gdal::Ogr::DataSource.name call-seq: - name -> char + name -> char const * Get value of attribute. */ SWIGINTERN VALUE @@ -4157,11 +4182,11 @@ /* Document-method: Gdal::Ogr::DataSource.get_name call-seq: - get_name -> char + get_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -4344,12 +4369,12 @@ /* Document-method: Gdal::Ogr::DataSource.create_layer call-seq: - create_layer(char name, SpatialReference srs=nil, OGRwkbGeometryType geom_type=WKBUNKNOWN, - char options=0) -> Layer + create_layer(char const * name, SpatialReference srs=nil, OGRwkbGeometryType geom_type=WKBUNKNOWN, + char ** options=None) -> Layer An instance method. */ SWIGINTERN VALUE @@ -4364,11 +4389,11 @@ int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; void *argp3 = 0 ; int res3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","name","srs","geom_type","options", NULL }; OGRLayerShadow *result = 0 ; VALUE vresult = Qnil; @@ -4460,11 +4485,11 @@ /* Document-method: Gdal::Ogr::DataSource.copy_layer call-seq: - copy_layer(Layer src_layer, char new_name, char options=0) -> Layer + copy_layer(Layer src_layer, char const * new_name, char ** options=None) -> Layer An instance method. */ SWIGINTERN VALUE @@ -4478,11 +4503,11 @@ void *argp2 = 0 ; int res2 = 0 ; int res3 ; char *buf3 = 0 ; int alloc3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","src_layer","new_name","options", NULL }; OGRLayerShadow *result = 0 ; VALUE vresult = Qnil; @@ -4566,11 +4591,11 @@ /* Document-method: Gdal::Ogr::DataSource.test_capability call-seq: - test_capability(char cap) -> bool + test_capability(char const * cap) -> bool An instance method. */ SWIGINTERN VALUE @@ -4635,11 +4660,11 @@ /* Document-method: Gdal::Ogr::DataSource.execute_sql call-seq: - execute_sql(char statement, Geometry spatialFilter=nil, char dialect="") -> Layer + execute_sql(char const * statement, Geometry spatialFilter=nil, char const * dialect="") -> Layer An instance method. */ SWIGINTERN VALUE @@ -4656,11 +4681,11 @@ void *argp3 = 0 ; int res3 = 0 ; int res4 ; char *buf4 = 0 ; int alloc4 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","statement","spatialFilter","dialect", NULL }; OGRLayerShadow *result = 0 ; VALUE vresult = Qnil; @@ -4844,11 +4869,11 @@ Proxy of C++ Gdal::Ogr::Layer class */ -swig_class SwigClassLayer; +static swig_class SwigClassLayer; /* Document-method: Gdal::Ogr::Layer.get_ref_count @@ -5097,11 +5122,11 @@ /* Document-method: Gdal::Ogr::Layer.set_attribute_filter call-seq: - set_attribute_filter(char filter_string) -> OGRErr + set_attribute_filter(char * filter_string) -> OGRErr An instance method. */ SWIGINTERN VALUE @@ -5221,11 +5246,11 @@ /* Document-method: Gdal::Ogr::Layer.get_name call-seq: - get_name -> char + get_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -5327,11 +5352,11 @@ /* Document-method: Gdal::Ogr::Layer.get_geometry_column call-seq: - get_geometry_column -> char + get_geometry_column -> char const * An instance method. */ SWIGINTERN VALUE @@ -5380,11 +5405,11 @@ /* Document-method: Gdal::Ogr::Layer.get_fidcolumn call-seq: - get_fidcolumn -> char + get_fidcolumn -> char const * An instance method. */ SWIGINTERN VALUE @@ -5970,11 +5995,11 @@ int arg2 = (int) 1 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","force", NULL }; int result; VALUE vresult = Qnil; @@ -6038,11 +6063,11 @@ void *argp1 = 0 ; int res1 = 0 ; double argout2[4] ; int val3 ; int ecode3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","force", NULL }; OGRErr result; VALUE vresult = Qnil; @@ -6118,11 +6143,11 @@ /* Document-method: Gdal::Ogr::Layer.test_capability call-seq: - test_capability(char cap) -> bool + test_capability(char const * cap) -> bool An instance method. */ SWIGINTERN VALUE @@ -6203,11 +6228,11 @@ int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","field_def","approx_ok", NULL }; OGRErr result; VALUE vresult = Qnil; @@ -6909,11 +6934,11 @@ /* Document-method: Gdal::Ogr::Layer.set_ignored_fields call-seq: - set_ignored_fields(char options) -> OGRErr + set_ignored_fields(char const ** options) -> OGRErr An instance method. */ SWIGINTERN VALUE @@ -6993,10 +7018,941 @@ } /* + Document-method: Gdal::Ogr::Layer.intersection + + call-seq: + intersection(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_intersection(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","Intersection", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","Intersection", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","Intersection", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","Intersection", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","Intersection", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","Intersection", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* + Document-method: Gdal::Ogr::Layer.union + + call-seq: + union(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_union(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","Union", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","Union", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","Union", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","Union", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","Union", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","Union", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* + Document-method: Gdal::Ogr::Layer.sym_difference + + call-seq: + sym_difference(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_sym_difference(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","SymDifference", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","SymDifference", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","SymDifference", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","SymDifference", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","SymDifference", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","SymDifference", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* + Document-method: Gdal::Ogr::Layer.identity + + call-seq: + identity(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_identity(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","Identity", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","Identity", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","Identity", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","Identity", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","Identity", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","Identity", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* + Document-method: Gdal::Ogr::Layer.update + + call-seq: + update(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_update(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","Update", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","Update", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","Update", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","Update", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","Update", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","Update", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* + Document-method: Gdal::Ogr::Layer.clip + + call-seq: + clip(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_clip(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","Clip", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","Clip", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","Clip", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","Clip", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","Clip", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","Clip", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* + Document-method: Gdal::Ogr::Layer.erase + + call-seq: + erase(Layer method_layer, Layer result_layer, char ** options=nil, GDALProgressFunc callback=0, + void * callback_data=nil) -> OGRErr + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Layer_erase(int argc, VALUE *argv, VALUE self) { + OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ; + OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ; + char **arg4 = (char **) NULL ; + GDALProgressFunc arg5 = (GDALProgressFunc) NULL ; + void *arg6 = (void *) NULL ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp5 ; + int res5 = 0 ; + int res6 ; + const char *kwnames[] = { + "self","method_layer","result_layer","options","callback","callback_data", NULL + }; + OGRErr result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 5)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRLayerShadow *","Erase", 1, self )); + } + arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OGRLayerShadow *","Erase", 2, argv[0] )); + } + arg2 = reinterpret_cast< OGRLayerShadow * >(argp2); + res3 = SWIG_ConvertPtr(argv[1], &argp3,SWIGTYPE_p_OGRLayerShadow, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "OGRLayerShadow *","Erase", 3, argv[1] )); + } + arg3 = reinterpret_cast< OGRLayerShadow * >(argp3); + if (argc > 2) { + { + /* %typemap(in) char **options */ + + /* Check if is a list */ + Check_Type(argv[2], T_ARRAY); + + int size = RARRAY_LEN(argv[2]); + for (int i = 0; i < size; i++) { + VALUE item = rb_ary_entry(argv[2], i); + char *pszItem = StringValuePtr(item); + arg4 = CSLAddString( arg4, pszItem ); + } + } + } + if (argc > 3) { + { + res5 = SWIG_ConvertPtr(argv[3], &argp5, SWIGTYPE_p_GDALProgressFunc, 0 ); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), Ruby_Format_TypeError( "", "GDALProgressFunc","Erase", 5, argv[3] )); + } + if (!argp5) { + SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "GDALProgressFunc","Erase", 5, argv[3])); + } else { + arg5 = *(reinterpret_cast< GDALProgressFunc * >(argp5)); + } + } + } + if (argc > 4) { + res6 = SWIG_ConvertPtr(argv[4],SWIG_as_voidptrptr(&arg6), 0, 0); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), Ruby_Format_TypeError( "", "void *","Erase", 6, argv[4] )); + } + } + { + CPLErrorReset(); + result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + { + /* %typemap(out) OGRErr */ + if (result != 0) { + rb_raise(rb_eRuntimeError, OGRErrMessages(result)); + } + } + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + { + /* %typemap(ret) OGRErr */ + if (vresult == Qnil) { + vresult = INT2NUM(0); + } + } return vresult; +fail: + { + /* %typemap(freearg) char **options */ + + CSLDestroy( arg4 ); + } + return Qnil; +} + + + +/* Document-method: Gdal::Ogr::Layer.each call-seq: each @@ -7048,11 +8004,11 @@ Proxy of C++ Gdal::Ogr::Feature class */ -swig_class SwigClassFeature; +static swig_class SwigClassFeature; SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){ OGR_F_Destroy(self); } SWIGINTERN void @@ -7090,11 +8046,11 @@ SWIGINTERN VALUE _wrap_new_Feature(int argc, VALUE *argv, VALUE self) { OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ; void *argp1 = 0 ; int res1 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "feature_def", NULL }; OGRFeatureShadow *result = 0 ; if ((argc < 1) || (argc > 1)) { @@ -7559,11 +8515,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_defn_ref call-seq: get_field_defn_ref(int id) -> FieldDefn - get_field_defn_ref(char name) -> FieldDefn + get_field_defn_ref(char const * name) -> FieldDefn An instance method. */ SWIGINTERN VALUE @@ -7728,12 +8684,12 @@ /* Document-method: Gdal::Ogr::Feature.get_field_as_string call-seq: - get_field_as_string(int id) -> char - get_field_as_string(char name) -> char + get_field_as_string(int id) -> char const * + get_field_as_string(char const * name) -> char const An instance method. */ SWIGINTERN VALUE @@ -7899,11 +8855,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_as_integer call-seq: get_field_as_integer(int id) -> int - get_field_as_integer(char name) -> int + get_field_as_integer(char const * name) -> int An instance method. */ SWIGINTERN VALUE @@ -8069,11 +9025,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_as_double call-seq: get_field_as_double(int id) -> double - get_field_as_double(char name) -> double + get_field_as_double(char const * name) -> double An instance method. */ SWIGINTERN VALUE @@ -8368,11 +9324,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_as_integer_list call-seq: - get_field_as_integer_list(int id, int nLen, int pList) + get_field_as_integer_list(int id, int * nLen, int const ** pList) An instance method. */ SWIGINTERN VALUE @@ -8442,11 +9398,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_as_double_list call-seq: - get_field_as_double_list(int id, int nLen, double pList) + get_field_as_double_list(int id, int * nLen, double const ** pList) An instance method. */ SWIGINTERN VALUE @@ -8516,11 +9472,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_as_string_list call-seq: - get_field_as_string_list(int id, char pList) + get_field_as_string_list(int id, char *** pList) An instance method. */ SWIGINTERN VALUE @@ -8583,11 +9539,11 @@ /* Document-method: Gdal::Ogr::Feature.is_field_set call-seq: is_field_set(int id) -> bool - is_field_set(char name) -> bool + is_field_set(char const * name) -> bool An instance method. */ SWIGINTERN VALUE @@ -8752,11 +9708,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_index call-seq: - get_field_index(char name) -> int + get_field_index(char const * name) -> int An instance method. */ SWIGINTERN VALUE @@ -8996,11 +9952,11 @@ /* Document-method: Gdal::Ogr::Feature.unset_field call-seq: unset_field(int id) - unset_field(char name) + unset_field(char const * name) An instance method. */ SWIGINTERN VALUE @@ -9159,20 +10115,19 @@ /* Document-method: Gdal::Ogr::Feature.set_field call-seq: - set_field(int id, char value) - set_field(char name, char value) + set_field(int id, char const * value) + set_field(char const * name, char const * value) set_field(int id, int value) - set_field(char name, int value) + set_field(char const * name, int value) set_field(int id, double value) - set_field(char name, double value) - set_field(int id, int year, int month, int day, int hour, int minute, - int second, int tzflag) - set_field(char name, int year, int month, int day, int hour, - int minute, int second, int tzflag) + set_field(char const * name, double value) + set_field(int id, int year, int month, int day, int hour, int minute, int second, int tzflag) + set_field(char const * name, int year, int month, int day, int hour, int minute, int second, + int tzflag) An instance method. */ SWIGINTERN VALUE @@ -10106,11 +11061,11 @@ /* Document-method: Gdal::Ogr::Feature.set_field_double_list call-seq: - set_field_double_list(int id, int nList, double pList) + set_field_double_list(int id, int nList, double * pList) An instance method. */ SWIGINTERN VALUE @@ -10180,11 +11135,11 @@ /* Document-method: Gdal::Ogr::Feature.set_field_string_list call-seq: - set_field_string_list(int id, char pList) + set_field_string_list(int id, char ** pList) An instance method. */ SWIGINTERN VALUE @@ -10278,11 +11233,11 @@ int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int val3 ; int ecode3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","other","forgiving", NULL }; OGRErr result; VALUE vresult = Qnil; @@ -10468,11 +11423,11 @@ /* Document-method: Gdal::Ogr::Feature.get_style_string call-seq: - get_style_string -> char + get_style_string -> char const * An instance method. */ SWIGINTERN VALUE @@ -10521,11 +11476,11 @@ /* Document-method: Gdal::Ogr::Feature.set_style_string call-seq: - set_style_string(char the_string) + set_style_string(char const * the_string) An instance method. */ SWIGINTERN VALUE @@ -10583,11 +11538,11 @@ /* Document-method: Gdal::Ogr::Feature.get_field_type call-seq: get_field_type(int id) -> OGRFieldType - get_field_type(char name) -> OGRFieldType + get_field_type(char const * name) -> OGRFieldType An instance method. */ SWIGINTERN VALUE @@ -10810,11 +11765,11 @@ Proxy of C++ Gdal::Ogr::FeatureDefn class */ -swig_class SwigClassFeatureDefn; +static swig_class SwigClassFeatureDefn; SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){ /*OGR_FD_Destroy(self);*/ OGR_FD_Release( OGRFeatureDefnH(self) ); } @@ -10843,22 +11798,22 @@ /* Document-method: Gdal::Ogr::FeatureDefn.new call-seq: - FeatureDefn.new(char name_null_ok=nil) + FeatureDefn.new(char const * name_null_ok=nil) Class constructor. */ SWIGINTERN VALUE _wrap_new_FeatureDefn(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) NULL ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "name_null_ok", NULL }; OGRFeatureDefnShadow *result = 0 ; if ((argc < 0) || (argc > 1)) { @@ -10903,11 +11858,11 @@ /* Document-method: Gdal::Ogr::FeatureDefn.get_name call-seq: - get_name -> char + get_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -11070,11 +12025,11 @@ /* Document-method: Gdal::Ogr::FeatureDefn.get_field_index call-seq: - get_field_index(char name) -> int + get_field_index(char const * name) -> int An instance method. */ SWIGINTERN VALUE @@ -11588,11 +12543,11 @@ Proxy of C++ Gdal::Ogr::FieldDefn class */ -swig_class SwigClassFieldDefn; +static swig_class SwigClassFieldDefn; SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){ OGR_Fld_Destroy(self); } SWIGINTERN void @@ -11620,11 +12575,11 @@ /* Document-method: Gdal::Ogr::FieldDefn.new call-seq: - FieldDefn.new(char name_null_ok="unnamed", OGRFieldType field_type=OFTSTRING) + FieldDefn.new(char const * name_null_ok="unnamed", OGRFieldType field_type=OFTSTRING) Class constructor. */ SWIGINTERN VALUE @@ -11632,11 +12587,11 @@ char *arg1 = (char *) "unnamed" ; OGRFieldType arg2 = (OGRFieldType) OFTString ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "name_null_ok","field_type", NULL }; OGRFieldDefnShadow *result = 0 ; if ((argc < 0) || (argc > 2)) { @@ -11687,11 +12642,11 @@ /* Document-method: Gdal::Ogr::FieldDefn.get_name call-seq: - get_name -> char + get_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -11740,11 +12695,11 @@ /* Document-method: Gdal::Ogr::FieldDefn.get_name_ref call-seq: - get_name_ref -> char + get_name_ref -> char const * An instance method. */ SWIGINTERN VALUE @@ -11793,11 +12748,11 @@ /* Document-method: Gdal::Ogr::FieldDefn.set_name call-seq: - set_name(char name) + set_name(char const * name) An instance method. */ SWIGINTERN VALUE @@ -12297,11 +13252,11 @@ /* Document-method: Gdal::Ogr::FieldDefn.get_type_name call-seq: - get_type_name -> char + get_type_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -12350,11 +13305,11 @@ /* Document-method: Gdal::Ogr::FieldDefn.get_field_type_name call-seq: - get_field_type_name(OGRFieldType type) -> char + get_field_type_name(OGRFieldType type) -> char const * An instance method. */ SWIGINTERN VALUE @@ -12535,11 +13490,11 @@ char *buf1 = 0 ; size_t size1 = 0 ; int alloc1 = 0 ; void *argp3 = 0 ; int res3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "len","reference", NULL }; OGRGeometryShadow *result = 0 ; VALUE vresult = Qnil; @@ -12589,11 +13544,11 @@ /* Document-method: Gdal::Ogr.create_geometry_from_wkt call-seq: - create_geometry_from_wkt(char val, SpatialReference reference=nil) -> Geometry + create_geometry_from_wkt(char ** val, SpatialReference reference=nil) -> Geometry A module function. */ SWIGINTERN VALUE @@ -12601,11 +13556,11 @@ char **arg1 = (char **) 0 ; OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ; char *val1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "val","reference", NULL }; OGRGeometryShadow *result = 0 ; VALUE vresult = Qnil; @@ -12655,11 +13610,11 @@ /* Document-method: Gdal::Ogr.create_geometry_from_gml call-seq: - create_geometry_from_gml(char input_string) -> Geometry + create_geometry_from_gml(char const * input_string) -> Geometry A module function. */ SWIGINTERN VALUE @@ -12711,11 +13666,11 @@ /* Document-method: Gdal::Ogr.create_geometry_from_json call-seq: - create_geometry_from_json(char input_string) -> Geometry + create_geometry_from_json(char const * input_string) -> Geometry A module function. */ SWIGINTERN VALUE @@ -12767,12 +13722,11 @@ /* Document-method: Gdal::Ogr.build_polygon_from_edges call-seq: - build_polygon_from_edges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, - double dfTolerance=0) -> Geometry + build_polygon_from_edges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry A module function. */ SWIGINTERN VALUE @@ -12787,11 +13741,11 @@ int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "hLineCollection","bBestEffort","bAutoClose","dfTolerance", NULL }; OGRGeometryShadow *result = 0 ; VALUE vresult = Qnil; @@ -12854,14 +13808,12 @@ /* Document-method: Gdal::Ogr.approximate_arc_angles call-seq: - approximate_arc_angles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, - double dfSecondaryAxis, - double dfRotation, double dfStartAngle, double dfEndAngle, - double dfMaxAngleStepSizeDegrees) -> Geometry + approximate_arc_angles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, + double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) -> Geometry A module function. */ SWIGINTERN VALUE @@ -12891,11 +13843,11 @@ int ecode7 = 0 ; double val8 ; int ecode8 = 0 ; double val9 ; int ecode9 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "dfCenterX","dfCenterY","dfZ","dfPrimaryRadius","dfSecondaryAxis","dfRotation","dfStartAngle","dfEndAngle","dfMaxAngleStepSizeDegrees", NULL }; OGRGeometryShadow *result = 0 ; VALUE vresult = Qnil; @@ -13027,10 +13979,63 @@ } /* + Document-method: Gdal::Ogr.force_to_line_string + + call-seq: + force_to_line_string(Geometry geom_in) -> Geometry + +A module function. + +*/ +SWIGINTERN VALUE +_wrap_force_to_line_string(int argc, VALUE *argv, VALUE self) { + OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + OGRGeometryShadow *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRGeometryShadow *","ForceToLineString", 1, argv[0] )); + } + arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1); + { + CPLErrorReset(); + result = (OGRGeometryShadow *)ForceToLineString(arg1); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + + +/* Document-method: Gdal::Ogr.force_to_multi_polygon call-seq: force_to_multi_polygon(Geometry geom_in) -> Geometry @@ -13192,11 +14197,11 @@ Proxy of C++ Gdal::Ogr::Geometry class */ -swig_class SwigClassGeometry; +static swig_class SwigClassGeometry; SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){ OGR_G_DestroyGeometry( self ); } SWIGINTERN void @@ -13224,12 +14229,11 @@ /* Document-method: Gdal::Ogr::Geometry.new call-seq: - Geometry.new(OGRwkbGeometryType type=WKBUNKNOWN, char wkt=0, int wkb=0, - char gml=0) + Geometry.new(OGRwkbGeometryType type=WKBUNKNOWN, char * wkt=None, int wkb=0, char * gml=None) Class constructor. */ SWIGINTERN VALUE @@ -13247,11 +14251,11 @@ size_t size3 = 0 ; int alloc3 = 0 ; int res5 ; char *buf5 = 0 ; int alloc5 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "type","wkt","wkb","gml", NULL }; OGRGeometryShadow *result = 0 ; if ((argc < 0) || (argc > 4)) { @@ -13427,11 +14431,11 @@ OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ; void *argp1 = 0 ; int res1 = 0 ; int nLen2 = 0 ; char *pBuf2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","byte_order", NULL }; OGRErr result; VALUE vresult = Qnil; @@ -13510,11 +14514,11 @@ /* Document-method: Gdal::Ogr::Geometry.export_to_gml call-seq: - export_to_gml -> char + export_to_gml -> char const * An instance method. */ SWIGINTERN VALUE @@ -13563,11 +14567,11 @@ /* Document-method: Gdal::Ogr::Geometry.export_to_kml call-seq: - export_to_kml(char altitude_mode=nil) -> char + export_to_kml(char const * altitude_mode=nil) -> char const * An instance method. */ SWIGINTERN VALUE @@ -13629,11 +14633,11 @@ /* Document-method: Gdal::Ogr::Geometry.export_to_json call-seq: - export_to_json -> char + export_to_json -> char const * An instance method. */ SWIGINTERN VALUE @@ -13701,11 +14705,11 @@ int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","x","y","z", NULL }; if ((argc < 2) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; @@ -14083,11 +15087,11 @@ /* Document-method: Gdal::Ogr::Geometry.get_geometry_name call-seq: - get_geometry_name -> char + get_geometry_name -> char const * An instance method. */ SWIGINTERN VALUE @@ -14361,11 +15365,11 @@ int arg2 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","point", NULL }; double result; VALUE vresult = Qnil; @@ -14427,11 +15431,11 @@ int arg2 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","point", NULL }; double result; VALUE vresult = Qnil; @@ -14493,11 +15497,11 @@ int arg2 = (int) 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","point", NULL }; double result; VALUE vresult = Qnil; @@ -14781,11 +15785,11 @@ int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; double val5 ; int ecode5 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","point","x","y","z", NULL }; if ((argc < 3) || (argc > 4)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; @@ -14865,11 +15869,11 @@ int ecode2 = 0 ; double val3 ; int ecode3 = 0 ; double val4 ; int ecode4 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","point","x","y", NULL }; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; @@ -15281,11 +16285,11 @@ int res1 = 0 ; double val2 ; int ecode2 = 0 ; int val3 ; int ecode3 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "self","distance","quadsecs", NULL }; OGRGeometryShadow *result = 0 ; VALUE vresult = Qnil; @@ -17321,10 +18325,63 @@ } /* + Document-method: Gdal::Ogr::Geometry.point_on_surface + + call-seq: + point_on_surface -> Geometry + +An instance method. + +*/ +SWIGINTERN VALUE +_wrap_Geometry_point_on_surface(int argc, VALUE *argv, VALUE self) { + OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + OGRGeometryShadow *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OGRGeometryShadow *","PointOnSurface", 1, self )); + } + arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1); + { + CPLErrorReset(); + result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN | 0 ); + return vresult; +fail: + return Qnil; +} + + + +/* Document-method: Gdal::Ogr::Geometry.wkb_size call-seq: wkb_size -> int @@ -17735,11 +18792,11 @@ /* Document-method: Gdal::Ogr.GeometryTypeToName call-seq: - GeometryTypeToName(OGRwkbGeometryType eType) -> char + GeometryTypeToName(OGRwkbGeometryType eType) -> char const * A module function. */ SWIGINTERN VALUE @@ -17785,11 +18842,11 @@ /* Document-method: Gdal::Ogr.GetFieldTypeName call-seq: - GetFieldTypeName(OGRFieldType type) -> char + GetFieldTypeName(OGRFieldType type) -> char const * A module function. */ SWIGINTERN VALUE @@ -17888,11 +18945,11 @@ /* Document-method: Gdal::Ogr.open call-seq: - open(char utf8_path, int update=0) -> DataSource + open(char const * utf8_path, int update=0) -> DataSource A module function. */ SWIGINTERN VALUE @@ -17902,11 +18959,11 @@ int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "utf8_path","update", NULL }; OGRDataSourceShadow *result = 0 ; VALUE vresult = Qnil; @@ -17957,11 +19014,11 @@ /* Document-method: Gdal::Ogr.open_shared call-seq: - open_shared(char utf8_path, int update=0) -> DataSource + open_shared(char const * utf8_path, int update=0) -> DataSource A module function. */ SWIGINTERN VALUE @@ -17971,11 +19028,11 @@ int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; int val2 ; int ecode2 = 0 ; - char *kwnames[] = { + const char *kwnames[] = { "utf8_path","update", NULL }; OGRDataSourceShadow *result = 0 ; VALUE vresult = Qnil; @@ -18026,11 +19083,11 @@ /* Document-method: Gdal::Ogr.get_driver_by_name call-seq: - get_driver_by_name(char name) -> Driver + get_driver_by_name(char const * name) -> Driver A module function. */ SWIGINTERN VALUE @@ -18140,11 +19197,11 @@ /* Document-method: Gdal::Ogr.general_cmd_line_processor call-seq: - general_cmd_line_processor(char papszArgv, int nOptions=0) -> char + general_cmd_line_processor(char ** papszArgv, int nOptions=0) -> char ** A module function. */ SWIGINTERN VALUE @@ -18230,12 +19287,90 @@ return Qnil; } +/* + Document-method: Gdal::Ogr.TermProgress_nocb + + call-seq: + TermProgress_nocb(double dfProgress, char const * pszMessage=nil, void * pData=nil) -> int + +A module function. + +*/ +SWIGINTERN VALUE +_wrap_TermProgress_nocb(int argc, VALUE *argv, VALUE self) { + double arg1 ; + char *arg2 = (char *) NULL ; + void *arg3 = (void *) NULL ; + double val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + const char *kwnames[] = { + "dfProgress","pszMessage","pData", NULL + }; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_double(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "double","GDALTermProgress_nocb", 1, argv[0] )); + } + arg1 = static_cast< double >(val1); + if (argc > 1) { + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","GDALTermProgress_nocb", 2, argv[1] )); + } + arg2 = reinterpret_cast< char * >(buf2); + } + if (argc > 2) { + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","GDALTermProgress_nocb", 3, argv[2] )); + } + } + { + CPLErrorReset(); + result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3); + CPLErr eclass = CPLGetLastErrorType(); + if ( eclass == CE_Failure || eclass == CE_Fatal ) { + SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() ); + + } + + + + + + + + + + + + } + vresult = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return Qnil; +} + + + /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ +static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0}; @@ -18244,17 +19379,19 @@ static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { + &_swigt__p_GDALProgressFunc, &_swigt__p_GIntBig, &_swigt__p_OGRDataSourceShadow, &_swigt__p_OGRDriverShadow, &_swigt__p_OGRFeatureDefnShadow, &_swigt__p_OGRFeatureShadow, @@ -18263,17 +19400,19 @@ &_swigt__p_OGRLayerShadow, &_swigt__p_OSRCoordinateTransformationShadow, &_swigt__p_OSRSpatialReferenceShadow, &_swigt__p_char, &_swigt__p_double, + &_swigt__p_f_double_p_q_const__char_p_void__int, &_swigt__p_int, &_swigt__p_p_char, &_swigt__p_p_double, &_swigt__p_p_int, &_swigt__p_p_p_char, }; +static swig_cast_info _swigc__p_GDALProgressFunc[] = { {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_GIntBig[] = { {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OGRDataSourceShadow[] = { {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OGRDriverShadow[] = { {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = { {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OGRFeatureShadow[] = { {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}}; @@ -18282,17 +19421,19 @@ static swig_cast_info _swigc__p_OGRLayerShadow[] = { {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = { {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_p_p_char[] = { {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { + _swigc__p_GDALProgressFunc, _swigc__p_GIntBig, _swigc__p_OGRDataSourceShadow, _swigc__p_OGRDriverShadow, _swigc__p_OGRFeatureDefnShadow, _swigc__p_OGRFeatureShadow, @@ -18301,10 +19442,11 @@ _swigc__p_OGRLayerShadow, _swigc__p_OSRCoordinateTransformationShadow, _swigc__p_OSRSpatialReferenceShadow, _swigc__p_char, _swigc__p_double, + _swigc__p_f_double_p_q_const__char_p_void__int, _swigc__p_int, _swigc__p_p_char, _swigc__p_p_double, _swigc__p_p_int, _swigc__p_p_p_char, @@ -18313,42 +19455,42 @@ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned statically to an initial * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a * two-dimensional array. Each row corresponds to a type (there are the same * number of rows as there are in the swig_type_initial array). Each entry in * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that * swig_cast_info to the linked list (because the cast->type) pointer will * be correct. @@ -18368,14 +19510,12 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; - int found, init; + int init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; @@ -18389,31 +19529,27 @@ module_head = SWIG_GetModule(clientdata); if (!module_head) { /* This is the first module loaded for this interpreter */ /* so set the swig module into the interpreter */ SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; } else { /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found=0; iter=module_head; do { if (iter==&swig_module) { - found=1; - break; + /* Our module is already in the list, so there's nothing more to do. */ + return; } iter=iter->next; } while (iter!= module_head); - /* if the is found in the list, then all is done and we may leave */ - if (found) return; - /* otherwise we must add out module into the list */ + /* otherwise we must add our module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in + /* When multiple interpreters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return; @@ -18423,11 +19559,11 @@ #endif for (i = 0; i < swig_module.size; ++i) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; - + #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif /* if there is another module already loaded */ @@ -18450,11 +19586,11 @@ } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { - + /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif @@ -18712,10 +19848,17 @@ rb_define_method(SwigClassLayer.klass, "commit_transaction", VALUEFUNC(_wrap_Layer_commit_transaction), -1); rb_define_method(SwigClassLayer.klass, "rollback_transaction", VALUEFUNC(_wrap_Layer_rollback_transaction), -1); rb_define_method(SwigClassLayer.klass, "get_spatial_ref", VALUEFUNC(_wrap_Layer_get_spatial_ref), -1); rb_define_method(SwigClassLayer.klass, "get_features_read", VALUEFUNC(_wrap_Layer_get_features_read), -1); rb_define_method(SwigClassLayer.klass, "set_ignored_fields", VALUEFUNC(_wrap_Layer_set_ignored_fields), -1); + rb_define_method(SwigClassLayer.klass, "intersection", VALUEFUNC(_wrap_Layer_intersection), -1); + rb_define_method(SwigClassLayer.klass, "union", VALUEFUNC(_wrap_Layer_union), -1); + rb_define_method(SwigClassLayer.klass, "sym_difference", VALUEFUNC(_wrap_Layer_sym_difference), -1); + rb_define_method(SwigClassLayer.klass, "identity", VALUEFUNC(_wrap_Layer_identity), -1); + rb_define_method(SwigClassLayer.klass, "update", VALUEFUNC(_wrap_Layer_update), -1); + rb_define_method(SwigClassLayer.klass, "clip", VALUEFUNC(_wrap_Layer_clip), -1); + rb_define_method(SwigClassLayer.klass, "erase", VALUEFUNC(_wrap_Layer_erase), -1); rb_define_method(SwigClassLayer.klass, "each", VALUEFUNC(_wrap_Layer_each), -1); SwigClassLayer.mark = 0; SwigClassLayer.trackObjects = 0; SwigClassFeature.klass = rb_define_class_under(mOgr, "Feature", rb_cObject); @@ -18804,10 +19947,11 @@ rb_define_module_function(mOgr, "create_geometry_from_gml", VALUEFUNC(_wrap_create_geometry_from_gml), -1); rb_define_module_function(mOgr, "create_geometry_from_json", VALUEFUNC(_wrap_create_geometry_from_json), -1); rb_define_module_function(mOgr, "build_polygon_from_edges", VALUEFUNC(_wrap_build_polygon_from_edges), -1); rb_define_module_function(mOgr, "approximate_arc_angles", VALUEFUNC(_wrap_approximate_arc_angles), -1); rb_define_module_function(mOgr, "force_to_polygon", VALUEFUNC(_wrap_force_to_polygon), -1); + rb_define_module_function(mOgr, "force_to_line_string", VALUEFUNC(_wrap_force_to_line_string), -1); rb_define_module_function(mOgr, "force_to_multi_polygon", VALUEFUNC(_wrap_force_to_multi_polygon), -1); rb_define_module_function(mOgr, "force_to_multi_point", VALUEFUNC(_wrap_force_to_multi_point), -1); rb_define_module_function(mOgr, "force_to_multi_line_string", VALUEFUNC(_wrap_force_to_multi_line_string), -1); SwigClassGeometry.klass = rb_define_class_under(mOgr, "Geometry", rb_cObject); @@ -18875,10 +20019,11 @@ rb_define_method(SwigClassGeometry.klass, "flatten_to_2d", VALUEFUNC(_wrap_Geometry_flatten_to_2d), -1); rb_define_method(SwigClassGeometry.klass, "segmentize", VALUEFUNC(_wrap_Geometry_segmentize), -1); rb_define_method(SwigClassGeometry.klass, "get_envelope", VALUEFUNC(_wrap_Geometry_get_envelope), -1); rb_define_method(SwigClassGeometry.klass, "get_envelope_3d", VALUEFUNC(_wrap_Geometry_get_envelope_3d), -1); rb_define_method(SwigClassGeometry.klass, "centroid", VALUEFUNC(_wrap_Geometry_centroid), -1); + rb_define_method(SwigClassGeometry.klass, "point_on_surface", VALUEFUNC(_wrap_Geometry_point_on_surface), -1); rb_define_method(SwigClassGeometry.klass, "wkb_size", VALUEFUNC(_wrap_Geometry_wkb_size), -1); rb_define_method(SwigClassGeometry.klass, "get_coordinate_dimension", VALUEFUNC(_wrap_Geometry_get_coordinate_dimension), -1); rb_define_method(SwigClassGeometry.klass, "set_coordinate_dimension", VALUEFUNC(_wrap_Geometry_set_coordinate_dimension), -1); rb_define_method(SwigClassGeometry.klass, "get_dimension", VALUEFUNC(_wrap_Geometry_get_dimension), -1); SwigClassGeometry.mark = 0; @@ -18894,7 +20039,9 @@ rb_define_module_function(mOgr, "open", VALUEFUNC(_wrap_open), -1); rb_define_module_function(mOgr, "open_shared", VALUEFUNC(_wrap_open_shared), -1); rb_define_module_function(mOgr, "get_driver_by_name", VALUEFUNC(_wrap_get_driver_by_name), -1); rb_define_module_function(mOgr, "get_driver", VALUEFUNC(_wrap_get_driver), -1); rb_define_module_function(mOgr, "general_cmd_line_processor", VALUEFUNC(_wrap_general_cmd_line_processor), -1); + rb_define_module_function(mOgr, "TermProgress_nocb", VALUEFUNC(_wrap_TermProgress_nocb), -1); + rb_define_const(mOgr, "TermProgress", SWIG_NewFunctionPtrObj((void *)(int (*)(double,char const *,void *))(GDALTermProgress), SWIGTYPE_p_f_double_p_q_const__char_p_void__int)); }