1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGPERL
13 #define SWIGPERL
14 #endif
15 
16 #define SWIG_CASTRANK_MODE
17 
18 
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22   struct SwigMovePointer {
23     T *ptr;
SwigMovePointerSwigValueWrapper::SwigMovePointer24     SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointerSwigValueWrapper::SwigMovePointer25     ~SwigMovePointer() { delete ptr; }
operator =SwigValueWrapper::SwigMovePointer26     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
27   } pointer;
28   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
SwigValueWrapper()31   SwigValueWrapper() : pointer(0) { }
operator =(const T & t)32   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const33   operator T&() const { return *pointer.ptr; }
operator &()34   T *operator&() { return pointer.ptr; }
35 };
36 
SwigValueInit()37 template <typename T> T SwigValueInit() {
38   return T();
39 }
40 #endif
41 
42 /* -----------------------------------------------------------------------------
43  *  This section contains generic SWIG labels for method/variable
44  *  declarations/attributes, and other compiler dependent labels.
45  * ----------------------------------------------------------------------------- */
46 
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 #  define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 #  define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 #  define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59 
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 #   define SWIGINLINE inline
64 # else
65 #   define SWIGINLINE
66 # endif
67 #endif
68 
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 #     define SWIGUNUSED __attribute__ ((__unused__))
74 #   else
75 #     define SWIGUNUSED
76 #   endif
77 # elif defined(__ICC)
78 #   define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 #   define SWIGUNUSED
81 # endif
82 #endif
83 
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89 
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 #   define SWIGUNUSEDPARM(p)
93 # else
94 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97 
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102 
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107 
108 /* exporting methods */
109 #if defined(__GNUC__)
110 #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 #    ifndef GCC_HASCLASSVISIBILITY
112 #      define GCC_HASCLASSVISIBILITY
113 #    endif
114 #  endif
115 #endif
116 
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 #   if defined(STATIC_LINKED)
120 #     define SWIGEXPORT
121 #   else
122 #     define SWIGEXPORT __declspec(dllexport)
123 #   endif
124 # else
125 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 #     define SWIGEXPORT __attribute__ ((visibility("default")))
127 #   else
128 #     define SWIGEXPORT
129 #   endif
130 # endif
131 #endif
132 
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 #   define SWIGSTDCALL __stdcall
137 # else
138 #   define SWIGSTDCALL
139 # endif
140 #endif
141 
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146 
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151 
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156 
157 /* Intel's compiler complains if a variable which was never initialised is
158  * cast to void, which is a common idiom which we use to indicate that we
159  * are aware a variable isn't used.  So we just silence that warning.
160  * See: https://github.com/swig/swig/issues/192 for more discussion.
161  */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165 
166 /* -----------------------------------------------------------------------------
167  * swigrun.swg
168  *
169  * This file contains generic C API SWIG runtime support for pointer
170  * type checking.
171  * ----------------------------------------------------------------------------- */
172 
173 /* This should only be incremented when either the layout of swig_type_info changes,
174    or for whatever reason, the runtime changes incompatibly */
175 #define SWIG_RUNTIME_VERSION "4"
176 
177 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
178 #ifdef SWIG_TYPE_TABLE
179 # define SWIG_QUOTE_STRING(x) #x
180 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
181 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
182 #else
183 # define SWIG_TYPE_TABLE_NAME
184 #endif
185 
186 /*
187   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
188   creating a static or dynamic library from the SWIG runtime code.
189   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
190 
191   But only do this if strictly necessary, ie, if you have problems
192   with your compiler or suchlike.
193 */
194 
195 #ifndef SWIGRUNTIME
196 # define SWIGRUNTIME SWIGINTERN
197 #endif
198 
199 #ifndef SWIGRUNTIMEINLINE
200 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
201 #endif
202 
203 /*  Generic buffer size */
204 #ifndef SWIG_BUFFER_SIZE
205 # define SWIG_BUFFER_SIZE 1024
206 #endif
207 
208 /* Flags for pointer conversions */
209 #define SWIG_POINTER_DISOWN        0x1
210 #define SWIG_CAST_NEW_MEMORY       0x2
211 
212 /* Flags for new pointer objects */
213 #define SWIG_POINTER_OWN           0x1
214 
215 
216 /*
217    Flags/methods for returning states.
218 
219    The SWIG conversion methods, as ConvertPtr, return an integer
220    that tells if the conversion was successful or not. And if not,
221    an error code can be returned (see swigerrors.swg for the codes).
222 
223    Use the following macros/flags to set or process the returning
224    states.
225 
226    In old versions of SWIG, code such as the following was usually written:
227 
228      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
229        // success code
230      } else {
231        //fail code
232      }
233 
234    Now you can be more explicit:
235 
236     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
237     if (SWIG_IsOK(res)) {
238       // success code
239     } else {
240       // fail code
241     }
242 
243    which is the same really, but now you can also do
244 
245     Type *ptr;
246     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
247     if (SWIG_IsOK(res)) {
248       // success code
249       if (SWIG_IsNewObj(res) {
250         ...
251 	delete *ptr;
252       } else {
253         ...
254       }
255     } else {
256       // fail code
257     }
258 
259    I.e., now SWIG_ConvertPtr can return new objects and you can
260    identify the case and take care of the deallocation. Of course that
261    also requires SWIG_ConvertPtr to return new result values, such as
262 
263       int SWIG_ConvertPtr(obj, ptr,...) {
264         if (<obj is ok>) {
265           if (<need new object>) {
266             *ptr = <ptr to new allocated object>;
267             return SWIG_NEWOBJ;
268           } else {
269             *ptr = <ptr to old object>;
270             return SWIG_OLDOBJ;
271           }
272         } else {
273           return SWIG_BADOBJ;
274         }
275       }
276 
277    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
278    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
279    SWIG errors code.
280 
281    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
282    allows to return the 'cast rank', for example, if you have this
283 
284        int food(double)
285        int fooi(int);
286 
287    and you call
288 
289       food(1)   // cast rank '1'  (1 -> 1.0)
290       fooi(1)   // cast rank '0'
291 
292    just use the SWIG_AddCast()/SWIG_CheckState()
293 */
294 
295 #define SWIG_OK                    (0)
296 #define SWIG_ERROR                 (-1)
297 #define SWIG_IsOK(r)               (r >= 0)
298 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
299 
300 /* The CastRankLimit says how many bits are used for the cast rank */
301 #define SWIG_CASTRANKLIMIT         (1 << 8)
302 /* The NewMask denotes the object was created (using new/malloc) */
303 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
304 /* The TmpMask is for in/out typemaps that use temporal objects */
305 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
306 /* Simple returning values */
307 #define SWIG_BADOBJ                (SWIG_ERROR)
308 #define SWIG_OLDOBJ                (SWIG_OK)
309 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
310 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
311 /* Check, add and del mask methods */
312 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
313 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
314 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
315 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
316 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
317 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
318 
319 /* Cast-Rank Mode */
320 #if defined(SWIG_CASTRANK_MODE)
321 #  ifndef SWIG_TypeRank
322 #    define SWIG_TypeRank             unsigned long
323 #  endif
324 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
325 #    define SWIG_MAXCASTRANK          (2)
326 #  endif
327 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
328 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)329 SWIGINTERNINLINE int SWIG_AddCast(int r) {
330   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
331 }
SWIG_CheckState(int r)332 SWIGINTERNINLINE int SWIG_CheckState(int r) {
333   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
334 }
335 #else /* no cast-rank mode */
336 #  define SWIG_AddCast(r) (r)
337 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
338 #endif
339 
340 
341 #include <string.h>
342 
343 #ifdef __cplusplus
344 extern "C" {
345 #endif
346 
347 typedef void *(*swig_converter_func)(void *, int *);
348 typedef struct swig_type_info *(*swig_dycast_func)(void **);
349 
350 /* Structure to store information on one type */
351 typedef struct swig_type_info {
352   const char             *name;			/* mangled name of this type */
353   const char             *str;			/* human readable name of this type */
354   swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
355   struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
356   void                   *clientdata;		/* language specific type data */
357   int                    owndata;		/* flag if the structure owns the clientdata */
358 } swig_type_info;
359 
360 /* Structure to store a type and conversion function used for casting */
361 typedef struct swig_cast_info {
362   swig_type_info         *type;			/* pointer to type that is equivalent to this type */
363   swig_converter_func     converter;		/* function to cast the void pointers */
364   struct swig_cast_info  *next;			/* pointer to next cast in linked list */
365   struct swig_cast_info  *prev;			/* pointer to the previous cast */
366 } swig_cast_info;
367 
368 /* Structure used to store module information
369  * Each module generates one structure like this, and the runtime collects
370  * all of these structures and stores them in a circularly linked list.*/
371 typedef struct swig_module_info {
372   swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
373   size_t                 size;		        /* Number of types in this module */
374   struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
375   swig_type_info         **type_initial;	/* Array of initially generated type structures */
376   swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
377   void                    *clientdata;		/* Language specific module data */
378 } swig_module_info;
379 
380 /*
381   Compare two type names skipping the space characters, therefore
382   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
383 
384   Return 0 when the two name types are equivalent, as in
385   strncmp, but skipping ' '.
386 */
387 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)388 SWIG_TypeNameComp(const char *f1, const char *l1,
389 		  const char *f2, const char *l2) {
390   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
391     while ((*f1 == ' ') && (f1 != l1)) ++f1;
392     while ((*f2 == ' ') && (f2 != l2)) ++f2;
393     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
394   }
395   return (int)((l1 - f1) - (l2 - f2));
396 }
397 
398 /*
399   Check type equivalence in a name list like <name1>|<name2>|...
400   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
401 */
402 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)403 SWIG_TypeCmp(const char *nb, const char *tb) {
404   int equiv = 1;
405   const char* te = tb + strlen(tb);
406   const char* ne = nb;
407   while (equiv != 0 && *ne) {
408     for (nb = ne; *ne; ++ne) {
409       if (*ne == '|') break;
410     }
411     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
412     if (*ne) ++ne;
413   }
414   return equiv;
415 }
416 
417 /*
418   Check type equivalence in a name list like <name1>|<name2>|...
419   Return 0 if not equal, 1 if equal
420 */
421 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)422 SWIG_TypeEquiv(const char *nb, const char *tb) {
423   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
424 }
425 
426 /*
427   Check the typename
428 */
429 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)430 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
431   if (ty) {
432     swig_cast_info *iter = ty->cast;
433     while (iter) {
434       if (strcmp(iter->type->name, c) == 0) {
435         if (iter == ty->cast)
436           return iter;
437         /* Move iter to the top of the linked list */
438         iter->prev->next = iter->next;
439         if (iter->next)
440           iter->next->prev = iter->prev;
441         iter->next = ty->cast;
442         iter->prev = 0;
443         if (ty->cast) ty->cast->prev = iter;
444         ty->cast = iter;
445         return iter;
446       }
447       iter = iter->next;
448     }
449   }
450   return 0;
451 }
452 
453 /*
454   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
455 */
456 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)457 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
458   if (ty) {
459     swig_cast_info *iter = ty->cast;
460     while (iter) {
461       if (iter->type == from) {
462         if (iter == ty->cast)
463           return iter;
464         /* Move iter to the top of the linked list */
465         iter->prev->next = iter->next;
466         if (iter->next)
467           iter->next->prev = iter->prev;
468         iter->next = ty->cast;
469         iter->prev = 0;
470         if (ty->cast) ty->cast->prev = iter;
471         ty->cast = iter;
472         return iter;
473       }
474       iter = iter->next;
475     }
476   }
477   return 0;
478 }
479 
480 /*
481   Cast a pointer up an inheritance hierarchy
482 */
483 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)484 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
485   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
486 }
487 
488 /*
489    Dynamic pointer casting. Down an inheritance hierarchy
490 */
491 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)492 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
493   swig_type_info *lastty = ty;
494   if (!ty || !ty->dcast) return ty;
495   while (ty && (ty->dcast)) {
496     ty = (*ty->dcast)(ptr);
497     if (ty) lastty = ty;
498   }
499   return lastty;
500 }
501 
502 /*
503   Return the name associated with this type
504 */
505 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)506 SWIG_TypeName(const swig_type_info *ty) {
507   return ty->name;
508 }
509 
510 /*
511   Return the pretty name associated with this type,
512   that is an unmangled type name in a form presentable to the user.
513 */
514 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)515 SWIG_TypePrettyName(const swig_type_info *type) {
516   /* The "str" field contains the equivalent pretty names of the
517      type, separated by vertical-bar characters.  We choose
518      to print the last name, as it is often (?) the most
519      specific. */
520   if (!type) return NULL;
521   if (type->str != NULL) {
522     const char *last_name = type->str;
523     const char *s;
524     for (s = type->str; *s; s++)
525       if (*s == '|') last_name = s+1;
526     return last_name;
527   }
528   else
529     return type->name;
530 }
531 
532 /*
533    Set the clientdata field for a type
534 */
535 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)536 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
537   swig_cast_info *cast = ti->cast;
538   /* if (ti->clientdata == clientdata) return; */
539   ti->clientdata = clientdata;
540 
541   while (cast) {
542     if (!cast->converter) {
543       swig_type_info *tc = cast->type;
544       if (!tc->clientdata) {
545 	SWIG_TypeClientData(tc, clientdata);
546       }
547     }
548     cast = cast->next;
549   }
550 }
551 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)552 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
553   SWIG_TypeClientData(ti, clientdata);
554   ti->owndata = 1;
555 }
556 
557 /*
558   Search for a swig_type_info structure only by mangled name
559   Search is a O(log #types)
560 
561   We start searching at module start, and finish searching when start == end.
562   Note: if start == end at the beginning of the function, we go all the way around
563   the circular list.
564 */
565 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)566 SWIG_MangledTypeQueryModule(swig_module_info *start,
567                             swig_module_info *end,
568 		            const char *name) {
569   swig_module_info *iter = start;
570   do {
571     if (iter->size) {
572       size_t l = 0;
573       size_t r = iter->size - 1;
574       do {
575 	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
576 	size_t i = (l + r) >> 1;
577 	const char *iname = iter->types[i]->name;
578 	if (iname) {
579 	  int compare = strcmp(name, iname);
580 	  if (compare == 0) {
581 	    return iter->types[i];
582 	  } else if (compare < 0) {
583 	    if (i) {
584 	      r = i - 1;
585 	    } else {
586 	      break;
587 	    }
588 	  } else if (compare > 0) {
589 	    l = i + 1;
590 	  }
591 	} else {
592 	  break; /* should never happen */
593 	}
594       } while (l <= r);
595     }
596     iter = iter->next;
597   } while (iter != end);
598   return 0;
599 }
600 
601 /*
602   Search for a swig_type_info structure for either a mangled name or a human readable name.
603   It first searches the mangled names of the types, which is a O(log #types)
604   If a type is not found it then searches the human readable names, which is O(#types).
605 
606   We start searching at module start, and finish searching when start == end.
607   Note: if start == end at the beginning of the function, we go all the way around
608   the circular list.
609 */
610 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)611 SWIG_TypeQueryModule(swig_module_info *start,
612                      swig_module_info *end,
613 		     const char *name) {
614   /* STEP 1: Search the name field using binary search */
615   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
616   if (ret) {
617     return ret;
618   } else {
619     /* STEP 2: If the type hasn't been found, do a complete search
620        of the str field (the human readable name) */
621     swig_module_info *iter = start;
622     do {
623       size_t i = 0;
624       for (; i < iter->size; ++i) {
625 	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
626 	  return iter->types[i];
627       }
628       iter = iter->next;
629     } while (iter != end);
630   }
631 
632   /* neither found a match */
633   return 0;
634 }
635 
636 /*
637    Pack binary data into a string
638 */
639 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)640 SWIG_PackData(char *c, void *ptr, size_t sz) {
641   static const char hex[17] = "0123456789abcdef";
642   const unsigned char *u = (unsigned char *) ptr;
643   const unsigned char *eu =  u + sz;
644   for (; u != eu; ++u) {
645     unsigned char uu = *u;
646     *(c++) = hex[(uu & 0xf0) >> 4];
647     *(c++) = hex[uu & 0xf];
648   }
649   return c;
650 }
651 
652 /*
653    Unpack binary data from a string
654 */
655 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)656 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
657   unsigned char *u = (unsigned char *) ptr;
658   const unsigned char *eu = u + sz;
659   for (; u != eu; ++u) {
660     char d = *(c++);
661     unsigned char uu;
662     if ((d >= '0') && (d <= '9'))
663       uu = (unsigned char)((d - '0') << 4);
664     else if ((d >= 'a') && (d <= 'f'))
665       uu = (unsigned char)((d - ('a'-10)) << 4);
666     else
667       return (char *) 0;
668     d = *(c++);
669     if ((d >= '0') && (d <= '9'))
670       uu |= (unsigned char)(d - '0');
671     else if ((d >= 'a') && (d <= 'f'))
672       uu |= (unsigned char)(d - ('a'-10));
673     else
674       return (char *) 0;
675     *u = uu;
676   }
677   return c;
678 }
679 
680 /*
681    Pack 'void *' into a string buffer.
682 */
683 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)684 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
685   char *r = buff;
686   if ((2*sizeof(void *) + 2) > bsz) return 0;
687   *(r++) = '_';
688   r = SWIG_PackData(r,&ptr,sizeof(void *));
689   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
690   strcpy(r,name);
691   return buff;
692 }
693 
694 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)695 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
696   if (*c != '_') {
697     if (strcmp(c,"NULL") == 0) {
698       *ptr = (void *) 0;
699       return name;
700     } else {
701       return 0;
702     }
703   }
704   return SWIG_UnpackData(++c,ptr,sizeof(void *));
705 }
706 
707 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)708 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
709   char *r = buff;
710   size_t lname = (name ? strlen(name) : 0);
711   if ((2*sz + 2 + lname) > bsz) return 0;
712   *(r++) = '_';
713   r = SWIG_PackData(r,ptr,sz);
714   if (lname) {
715     strncpy(r,name,lname+1);
716   } else {
717     *r = 0;
718   }
719   return buff;
720 }
721 
722 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)723 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
724   if (*c != '_') {
725     if (strcmp(c,"NULL") == 0) {
726       memset(ptr,0,sz);
727       return name;
728     } else {
729       return 0;
730     }
731   }
732   return SWIG_UnpackData(++c,ptr,sz);
733 }
734 
735 #ifdef __cplusplus
736 }
737 #endif
738 
739 /*  Errors in SWIG */
740 #define  SWIG_UnknownError    	   -1
741 #define  SWIG_IOError        	   -2
742 #define  SWIG_RuntimeError   	   -3
743 #define  SWIG_IndexError     	   -4
744 #define  SWIG_TypeError      	   -5
745 #define  SWIG_DivisionByZero 	   -6
746 #define  SWIG_OverflowError  	   -7
747 #define  SWIG_SyntaxError    	   -8
748 #define  SWIG_ValueError     	   -9
749 #define  SWIG_SystemError    	   -10
750 #define  SWIG_AttributeError 	   -11
751 #define  SWIG_MemoryError    	   -12
752 #define  SWIG_NullReferenceError   -13
753 
754 
755 
756 #ifdef __cplusplus
757 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
758 #include <math.h>
759 #include <stdlib.h>
760 extern "C" {
761 #endif
762 #include "EXTERN.h"
763 #include "perl.h"
764 #include "XSUB.h"
765 
766 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
767 
768 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
769 #ifndef PERL_REVISION
770 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
771 #    define PERL_PATCHLEVEL_H_IMPLICIT
772 #    include <patchlevel.h>
773 #  endif
774 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
775 #    include <could_not_find_Perl_patchlevel.h>
776 #  endif
777 #  ifndef PERL_REVISION
778 #    define PERL_REVISION       (5)
779 #    define PERL_VERSION        PATCHLEVEL
780 #    define PERL_SUBVERSION     SUBVERSION
781 #  endif
782 #endif
783 
784 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
785 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
786 #endif
787 
788 #ifndef SvIOK_UV
789 # define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
790 #endif
791 
792 #ifndef SvUOK
793 # define SvUOK(sv)           SvIOK_UV(sv)
794 #endif
795 
796 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
797 #  define PL_sv_undef               sv_undef
798 #  define PL_na	                    na
799 #  define PL_errgv                  errgv
800 #  define PL_sv_no                  sv_no
801 #  define PL_sv_yes                 sv_yes
802 #  define PL_markstack_ptr          markstack_ptr
803 #endif
804 
805 #ifndef IVSIZE
806 #  ifdef LONGSIZE
807 #    define IVSIZE LONGSIZE
808 #  else
809 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
810 #  endif
811 #endif
812 
813 #ifndef INT2PTR
814 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
815 #    define PTRV                  UV
816 #    define INT2PTR(any,d)        (any)(d)
817 #  else
818 #    if PTRSIZE == LONGSIZE
819 #      define PTRV                unsigned long
820 #    else
821 #      define PTRV                unsigned
822 #    endif
823 #    define INT2PTR(any,d)        (any)(PTRV)(d)
824 #  endif
825 
826 #  define NUM2PTR(any,d)  (any)(PTRV)(d)
827 #  define PTR2IV(p)       INT2PTR(IV,p)
828 #  define PTR2UV(p)       INT2PTR(UV,p)
829 #  define PTR2NV(p)       NUM2PTR(NV,p)
830 
831 #  if PTRSIZE == LONGSIZE
832 #    define PTR2ul(p)     (unsigned long)(p)
833 #  else
834 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
835 #  endif
836 #endif /* !INT2PTR */
837 
838 #ifndef SvPV_nolen
839 # define SvPV_nolen(x) SvPV(x,PL_na)
840 #endif
841 
842 #ifndef get_sv
843 #  define get_sv perl_get_sv
844 #endif
845 
846 #ifndef ERRSV
847 #  define ERRSV get_sv("@",FALSE)
848 #endif
849 
850 #ifndef pTHX_
851 #define pTHX_
852 #endif
853 
854 #include <string.h>
855 #ifdef __cplusplus
856 }
857 #endif
858 
859 /* -----------------------------------------------------------------------------
860  * error manipulation
861  * ----------------------------------------------------------------------------- */
862 
863 SWIGINTERN const char*
SWIG_Perl_ErrorType(int code)864 SWIG_Perl_ErrorType(int code) {
865   switch(code) {
866   case SWIG_MemoryError:
867     return "MemoryError";
868   case SWIG_IOError:
869     return "IOError";
870   case SWIG_RuntimeError:
871     return "RuntimeError";
872   case SWIG_IndexError:
873     return "IndexError";
874   case SWIG_TypeError:
875     return "TypeError";
876   case SWIG_DivisionByZero:
877     return "ZeroDivisionError";
878   case SWIG_OverflowError:
879     return "OverflowError";
880   case SWIG_SyntaxError:
881     return "SyntaxError";
882   case SWIG_ValueError:
883     return "ValueError";
884   case SWIG_SystemError:
885     return "SystemError";
886   case SWIG_AttributeError:
887     return "AttributeError";
888   default:
889     return "RuntimeError";
890   }
891 }
892 
893 
894 /* -----------------------------------------------------------------------------
895  * perlrun.swg
896  *
897  * This file contains the runtime support for Perl modules
898  * and includes code for managing global variables and pointer
899  * type checking.
900  * ----------------------------------------------------------------------------- */
901 
902 #ifdef PERL_OBJECT
903 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
904 #define SWIG_PERL_OBJECT_CALL pPerl,
905 #else
906 #define SWIG_PERL_OBJECT_DECL
907 #define SWIG_PERL_OBJECT_CALL
908 #endif
909 
910 /* Common SWIG API */
911 
912 /* for raw pointers */
913 #define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
914 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
915 #define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
916 #define swig_owntype                                    int
917 
918 /* for raw packed data */
919 #define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
920 #define SWIG_NewPackedObj(p, s, type)	                SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
921 
922 /* for class or struct pointers */
923 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
924 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
925 
926 /* for C or C++ function pointers */
927 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
928 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
929 
930 /* for C++ member pointers, ie, member methods */
931 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_ConvertPacked(obj, ptr, sz, ty)
932 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_NewPackedObj(ptr, sz, type)
933 
934 
935 /* Runtime API */
936 
937 #define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule(clientdata)
938 #define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)
939 
940 
941 /* Error manipulation */
942 
943 #define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)
944 #define SWIG_Error(code, msg)            		sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg)
945 #define SWIG_fail                        		goto fail
946 
947 /* Perl-specific SWIG API */
948 
949 #define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
950 #define SWIG_MakePackedObj(sv, p, s, type)	        SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
951 #define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)
952 
953 
954 #define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
955 #define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
956 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
957 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)
958 
959 /* -----------------------------------------------------------------------------
960  * pointers/data manipulation
961  * ----------------------------------------------------------------------------- */
962 
963 /* For backward compatibility only */
964 #define SWIG_POINTER_EXCEPTION  0
965 
966 #ifdef __cplusplus
967 extern "C" {
968 #endif
969 
970 #define SWIG_OWNER   SWIG_POINTER_OWN
971 #define SWIG_SHADOW  SWIG_OWNER << 1
972 
973 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
974 
975 /* SWIG Perl macros */
976 
977 /* Macro to declare an XS function */
978 #ifndef XSPROTO
979 #   define XSPROTO(name) void name(pTHX_ CV* cv)
980 #endif
981 
982 /* Macro to call an XS function */
983 #ifdef PERL_OBJECT
984 #  define SWIG_CALLXS(_name) _name(cv,pPerl)
985 #else
986 #  ifndef MULTIPLICITY
987 #    define SWIG_CALLXS(_name) _name(cv)
988 #  else
989 #    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
990 #  endif
991 #endif
992 
993 #ifdef PERL_OBJECT
994 #define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;
995 
996 #ifdef __cplusplus
997 extern "C" {
998 #endif
999 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
1000 #ifdef __cplusplus
1001 }
1002 #endif
1003 
1004 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
1005 #define SWIGCLASS_STATIC
1006 
1007 #else /* PERL_OBJECT */
1008 
1009 #define MAGIC_PPERL
1010 #define SWIGCLASS_STATIC static SWIGUNUSED
1011 
1012 #ifndef MULTIPLICITY
1013 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
1014 
1015 #ifdef __cplusplus
1016 extern "C" {
1017 #endif
1018 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
1019 #ifdef __cplusplus
1020 }
1021 #endif
1022 
1023 #else /* MULTIPLICITY */
1024 
1025 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
1026 
1027 #ifdef __cplusplus
1028 extern "C" {
1029 #endif
1030 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
1031 #ifdef __cplusplus
1032 }
1033 #endif
1034 
1035 #endif /* MULTIPLICITY */
1036 #endif /* PERL_OBJECT */
1037 
1038 #  ifdef PERL_OBJECT
1039 #    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
SWIG_Perl_croak_null(CPerlObj * pPerl)1040 static void SWIGUNUSED SWIG_Perl_croak_null(CPerlObj *pPerl)
1041 #  else
1042 static void SWIGUNUSED SWIG_croak_null()
1043 #  endif
1044 {
1045   SV *err = get_sv("@", GV_ADD);
1046 #  if (PERL_VERSION < 6)
1047   croak("%_", err);
1048 #  else
1049   if (sv_isobject(err))
1050     croak(0);
1051   else
1052     croak("%s", SvPV_nolen(err));
1053 #  endif
1054 }
1055 
1056 
1057 /*
1058    Define how strict is the cast between strings and integers/doubles
1059    when overloading between these types occurs.
1060 
1061    The default is making it as strict as possible by using SWIG_AddCast
1062    when needed.
1063 
1064    You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1065    disable the SWIG_AddCast, making the casting between string and
1066    numbers less strict.
1067 
1068    In the end, we try to solve the overloading between strings and
1069    numerical types in the more natural way, but if you can avoid it,
1070    well, avoid it using %rename, for example.
1071 */
1072 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1073 # ifndef SWIG_PERL_STRICT_STR2NUM
1074 #  define SWIG_PERL_STRICT_STR2NUM
1075 # endif
1076 #endif
1077 #ifdef SWIG_PERL_STRICT_STR2NUM
1078 /* string takes precedence */
1079 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1080 #else
1081 /* number takes precedence */
1082 #define SWIG_Str2NumCast(x) x
1083 #endif
1084 
1085 
1086 
1087 #include <stdlib.h>
1088 
1089 SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info * type)1090 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1091   if (!type) return NULL;
1092   if (type->clientdata != NULL) {
1093     return (const char*) type->clientdata;
1094   }
1095   else {
1096     return type->name;
1097   }
1098 }
1099 
1100 /* Identical to SWIG_TypeCheck, except for strcmp comparison */
1101 SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char * c,swig_type_info * ty)1102 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1103   if (ty) {
1104     swig_cast_info *iter = ty->cast;
1105     while (iter) {
1106       if (strcmp(SWIG_Perl_TypeProxyName(iter->type), c) == 0) {
1107         if (iter == ty->cast)
1108           return iter;
1109         /* Move iter to the top of the linked list */
1110         iter->prev->next = iter->next;
1111         if (iter->next)
1112           iter->next->prev = iter->prev;
1113         iter->next = ty->cast;
1114         iter->prev = 0;
1115         if (ty->cast) ty->cast->prev = iter;
1116         ty->cast = iter;
1117         return iter;
1118       }
1119       iter = iter->next;
1120     }
1121   }
1122   return 0;
1123 }
1124 
1125 /* Function for getting a pointer value */
1126 
1127 SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV * sv,void ** ptr,swig_type_info * _t,int flags,int * own)1128 SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
1129   swig_cast_info *tc;
1130   void *voidptr = (void *)0;
1131   SV *tsv = 0;
1132 
1133   if (own)
1134     *own = 0;
1135 
1136   /* If magical, apply more magic */
1137   if (SvGMAGICAL(sv))
1138     mg_get(sv);
1139 
1140   /* Check to see if this is an object */
1141   if (sv_isobject(sv)) {
1142     IV tmp = 0;
1143     tsv = (SV*) SvRV(sv);
1144     if ((SvTYPE(tsv) == SVt_PVHV)) {
1145       MAGIC *mg;
1146       if (SvMAGICAL(tsv)) {
1147         mg = mg_find(tsv,'P');
1148         if (mg) {
1149           sv = mg->mg_obj;
1150           if (sv_isobject(sv)) {
1151 	    tsv = (SV*)SvRV(sv);
1152             tmp = SvIV(tsv);
1153           }
1154         }
1155       } else {
1156         return SWIG_ERROR;
1157       }
1158     } else {
1159       tmp = SvIV(tsv);
1160     }
1161     voidptr = INT2PTR(void *,tmp);
1162   } else if (! SvOK(sv)) {            /* Check for undef */
1163     *(ptr) = (void *) 0;
1164     return SWIG_OK;
1165   } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
1166     if (!SvROK(sv)) {
1167       /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value.  */
1168       if (SvIOK(sv)) {
1169         return SWIG_ERROR;
1170       } else {
1171         /* NULL pointer (reference to undef). */
1172         *(ptr) = (void *) 0;
1173         return SWIG_OK;
1174       }
1175     } else {
1176       return SWIG_ERROR;
1177     }
1178   } else {                            /* Don't know what it is */
1179     return SWIG_ERROR;
1180   }
1181   if (_t) {
1182     /* Now see if the types match */
1183     char *_c = HvNAME(SvSTASH(SvRV(sv)));
1184     tc = SWIG_TypeProxyCheck(_c,_t);
1185 #ifdef SWIG_DIRECTORS
1186     if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
1187 #else
1188     if (!tc) {
1189 #endif
1190       return SWIG_ERROR;
1191     }
1192     {
1193       int newmemory = 0;
1194       *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
1195       if (newmemory == SWIG_CAST_NEW_MEMORY) {
1196         assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1197         if (own)
1198           *own = *own | SWIG_CAST_NEW_MEMORY;
1199       }
1200     }
1201   } else {
1202     *ptr = voidptr;
1203   }
1204 
1205   /*
1206    *  DISOWN implementation: we need a perl guru to check this one.
1207    */
1208   if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1209     /*
1210      *  almost copy paste code from below SWIG_POINTER_OWN setting
1211      */
1212     SV *obj = sv;
1213     HV *stash = SvSTASH(SvRV(obj));
1214     GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1215     if (isGV(gv)) {
1216       HV *hv = GvHVn(gv);
1217       /*
1218        * To set ownership (see below), a newSViv(1) entry is added.
1219        * Hence, to remove ownership, we delete the entry.
1220        */
1221       if (hv_exists_ent(hv, obj, 0)) {
1222 	hv_delete_ent(hv, obj, 0, 0);
1223       }
1224     }
1225   }
1226   return SWIG_OK;
1227 }
1228 
1229 SWIGRUNTIME int
1230 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1231   return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
1232 }
1233 
1234 SWIGRUNTIME void
1235 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1236   if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
1237     SV *self;
1238     SV *obj=newSV(0);
1239     HV *hash=newHV();
1240     HV *stash;
1241     sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr);
1242     stash=SvSTASH(SvRV(obj));
1243     if (flags & SWIG_POINTER_OWN) {
1244       HV *hv;
1245       GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1246       if (!isGV(gv))
1247         gv_init(gv, stash, "OWNER", 5, FALSE);
1248       hv=GvHVn(gv);
1249       hv_store_ent(hv, obj, newSViv(1), 0);
1250     }
1251     sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1252     SvREFCNT_dec(obj);
1253     self=newRV_noinc((SV *)hash);
1254     sv_setsv(sv, self);
1255     SvREFCNT_dec((SV *)self);
1256     sv_bless(sv, stash);
1257   }
1258   else {
1259     sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr);
1260   }
1261 }
1262 
1263 SWIGRUNTIMEINLINE SV *
1264 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1265   SV *result = sv_newmortal();
1266   SWIG_MakePtr(result, ptr, t, flags);
1267   return result;
1268 }
1269 
1270 SWIGRUNTIME void
1271 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1272   char result[1024];
1273   char *r = result;
1274   if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1275   *(r++) = '_';
1276   r = SWIG_PackData(r,ptr,sz);
1277   strcpy(r,SWIG_Perl_TypeProxyName(type));
1278   sv_setpv(sv, result);
1279 }
1280 
1281 SWIGRUNTIME SV *
1282 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1283   SV *result = sv_newmortal();
1284   SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1285   return result;
1286 }
1287 
1288 /* Convert a packed value value */
1289 SWIGRUNTIME int
1290 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1291   swig_cast_info *tc;
1292   const char  *c = 0;
1293 
1294   if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1295   c = SvPV_nolen(obj);
1296   /* Pointer values must start with leading underscore */
1297   if (*c != '_') return SWIG_ERROR;
1298   c++;
1299   c = SWIG_UnpackData(c,ptr,sz);
1300   if (ty) {
1301     tc = SWIG_TypeCheck(c,ty);
1302     if (!tc) return SWIG_ERROR;
1303   }
1304   return SWIG_OK;
1305 }
1306 
1307 
1308 /* Macros for low-level exception handling */
1309 #define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1310 
1311 
1312 typedef XSPROTO(SwigPerlWrapper);
1313 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1314 
1315 /* Structure for command table */
1316 typedef struct {
1317   const char         *name;
1318   SwigPerlWrapperPtr  wrapper;
1319 } swig_command_info;
1320 
1321 /* Information for constant table */
1322 
1323 #define SWIG_INT     1
1324 #define SWIG_FLOAT   2
1325 #define SWIG_STRING  3
1326 #define SWIG_POINTER 4
1327 #define SWIG_BINARY  5
1328 
1329 /* Constant information structure */
1330 typedef struct swig_constant_info {
1331     int              type;
1332     const char      *name;
1333     long             lvalue;
1334     double           dvalue;
1335     void            *pvalue;
1336     swig_type_info **ptype;
1337 } swig_constant_info;
1338 
1339 
1340 /* Structure for variable table */
1341 typedef struct {
1342   const char   *name;
1343   SwigMagicFunc   set;
1344   SwigMagicFunc   get;
1345   swig_type_info  **type;
1346 } swig_variable_info;
1347 
1348 /* Magic variable code */
1349 #ifndef PERL_OBJECT
1350 # ifdef __cplusplus
1351 #  define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
1352 # else
1353 #  define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
1354 # endif
1355 # ifndef MULTIPLICITY
1356 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
1357 # else
1358 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
1359 # endif
1360 #else
1361 #  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1362 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
1363 #endif
1364 {
1365   MAGIC *mg;
1366   sv_magic(sv,sv,'U',name,strlen(name));
1367   mg = mg_find(sv,'U');
1368   mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1369   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1370   mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1371   mg->mg_virtual->svt_len = 0;
1372   mg->mg_virtual->svt_clear = 0;
1373   mg->mg_virtual->svt_free = 0;
1374 }
1375 
1376 
1377 SWIGRUNTIME swig_module_info *
1378 SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
1379   static void *type_pointer = (void *)0;
1380   SV *pointer;
1381 
1382   /* first check if pointer already created */
1383   if (!type_pointer) {
1384     pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
1385     if (pointer && SvOK(pointer)) {
1386       type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1387     }
1388   }
1389 
1390   return (swig_module_info *) type_pointer;
1391 }
1392 
1393 SWIGRUNTIME void
1394 SWIG_Perl_SetModule(swig_module_info *module) {
1395   SV *pointer;
1396 
1397   /* create a new pointer */
1398   pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
1399   sv_setiv(pointer, PTR2IV(module));
1400 }
1401 
1402 #ifdef __cplusplus
1403 }
1404 #endif
1405 
1406 /* Workaround perl5 global namespace pollution. Note that undefining library
1407  * functions like fopen will not solve the problem on all platforms as fopen
1408  * might be a macro on Windows but not necessarily on other operating systems. */
1409 #ifdef do_open
1410   #undef do_open
1411 #endif
1412 #ifdef do_close
1413   #undef do_close
1414 #endif
1415 #ifdef do_exec
1416   #undef do_exec
1417 #endif
1418 #ifdef scalar
1419   #undef scalar
1420 #endif
1421 #ifdef list
1422   #undef list
1423 #endif
1424 #ifdef apply
1425   #undef apply
1426 #endif
1427 #ifdef convert
1428   #undef convert
1429 #endif
1430 #ifdef Error
1431   #undef Error
1432 #endif
1433 #ifdef form
1434   #undef form
1435 #endif
1436 #ifdef vform
1437   #undef vform
1438 #endif
1439 #ifdef LABEL
1440   #undef LABEL
1441 #endif
1442 #ifdef METHOD
1443   #undef METHOD
1444 #endif
1445 #ifdef Move
1446   #undef Move
1447 #endif
1448 #ifdef yylex
1449   #undef yylex
1450 #endif
1451 #ifdef yyparse
1452   #undef yyparse
1453 #endif
1454 #ifdef yyerror
1455   #undef yyerror
1456 #endif
1457 #ifdef invert
1458   #undef invert
1459 #endif
1460 #ifdef ref
1461   #undef ref
1462 #endif
1463 #ifdef read
1464   #undef read
1465 #endif
1466 #ifdef write
1467   #undef write
1468 #endif
1469 #ifdef eof
1470   #undef eof
1471 #endif
1472 #ifdef close
1473   #undef close
1474 #endif
1475 #ifdef rewind
1476   #undef rewind
1477 #endif
1478 #ifdef free
1479   #undef free
1480 #endif
1481 #ifdef malloc
1482   #undef malloc
1483 #endif
1484 #ifdef calloc
1485   #undef calloc
1486 #endif
1487 #ifdef Stat
1488   #undef Stat
1489 #endif
1490 #ifdef check
1491   #undef check
1492 #endif
1493 #ifdef seekdir
1494   #undef seekdir
1495 #endif
1496 #ifdef open
1497   #undef open
1498 #endif
1499 #ifdef readdir
1500   #undef readdir
1501 #endif
1502 #ifdef bind
1503   #undef bind
1504 #endif
1505 #ifdef access
1506   #undef access
1507 #endif
1508 #ifdef stat
1509   #undef stat
1510 #endif
1511 #ifdef seed
1512   #undef seed
1513 #endif
1514 
1515 #ifdef bool
1516   /* Leave if macro is from C99 stdbool.h */
1517   #ifndef __bool_true_false_are_defined
1518     #undef bool
1519   #endif
1520 #endif
1521 
1522 
1523 
1524 
1525 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1526 
1527 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1528 
1529 
1530 
1531   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
1532 
1533 
1534 /* -------- TYPES TABLE (BEGIN) -------- */
1535 
1536 #define SWIGTYPE_p_OGRCoordinateTransformationOptions swig_types[0]
1537 #define SWIGTYPE_p_OSRAreaOfUse swig_types[1]
1538 #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[2]
1539 #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[3]
1540 #define SWIGTYPE_p_char swig_types[4]
1541 #define SWIGTYPE_p_double swig_types[5]
1542 #define SWIGTYPE_p_int swig_types[6]
1543 #define SWIGTYPE_p_long swig_types[7]
1544 #define SWIGTYPE_p_p_char swig_types[8]
1545 #define SWIGTYPE_p_p_double swig_types[9]
1546 #define SWIGTYPE_p_p_int swig_types[10]
1547 static swig_type_info *swig_types[12];
1548 static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0};
1549 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1550 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1551 
1552 /* -------- TYPES TABLE (END) -------- */
1553 
1554 #define SWIG_init    boot_Geo__OSR
1555 
1556 #define SWIG_name   "Geo::OSRc::boot_Geo__OSR"
1557 #define SWIG_prefix "Geo::OSRc::"
1558 
1559 #define SWIGVERSION 0x030012
1560 #define SWIG_VERSION SWIGVERSION
1561 
1562 
1563 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1564 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1565 
1566 
1567 #include <stdexcept>
1568 
1569 
1570 #ifdef __cplusplus
1571 extern "C"
1572 #endif
1573 #ifndef PERL_OBJECT
1574 #ifndef MULTIPLICITY
1575 SWIGEXPORT void SWIG_init (CV* cv);
1576 #else
1577 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1578 #endif
1579 #else
1580 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1581 #endif
1582 
1583 
1584 SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1585 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1586 {
1587   SV *obj = sv_newmortal();
1588   if (carray) {
1589     sv_setpvn(obj, carray, size);
1590   } else {
1591     sv_setsv(obj, &PL_sv_undef);
1592   }
1593   return obj;
1594 }
1595 
1596 
1597 SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char * cptr)1598 SWIG_FromCharPtr(const char *cptr)
1599 {
1600   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1601 }
1602 
1603 
1604 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(double value)1605 SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
1606 {
1607   return sv_2mortal(newSVnv(value));
1608 }
1609 
1610 
1611 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(long value)1612 SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
1613 {
1614   SV *sv;
1615   if (IVSIZE >= sizeof(value) || (value >= IV_MIN && value <= IV_MAX))
1616     sv = newSViv(value);
1617   else
1618     sv = newSVpvf("%ld", value);
1619   return sv_2mortal(sv);
1620 }
1621 
1622 
1623 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(int value)1624 SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
1625 {
1626   return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
1627 }
1628 
1629 
1630 typedef char retStringAndCPLFree;
1631 
1632 
1633 #include <iostream>
1634 using namespace std;
1635 
1636 #define CPL_SUPRESS_CPLUSPLUS
1637 
1638 #include "cpl_string.h"
1639 #include "cpl_conv.h"
1640 
1641 #include "ogr_srs_api.h"
1642 
1643 #ifdef DEBUG
1644 typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
1645 typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
1646 typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
1647 #else
1648 typedef void OSRSpatialReferenceShadow;
1649 typedef void OSRCoordinateTransformationShadow;
1650 #endif
1651 
1652 
do_confess(const char * error,int push_to_error_stack)1653     void do_confess(const char *error, int push_to_error_stack) {
1654         SV *sv = newSVpv("", 0);
1655         sv_setpvf(sv, "%s\n", error);
1656         if (push_to_error_stack) {
1657             AV* error_stack = get_av("Geo::GDAL::error", 0);
1658             av_push(error_stack, sv);
1659         } else {
1660             sv = sv_2mortal(sv);
1661         }
1662         dSP;
1663         ENTER;
1664         SAVETMPS;
1665         PUSHMARK(SP);
1666         XPUSHs( sv );
1667         PUTBACK;
1668         call_pv("Carp::confess", G_DISCARD);
1669         /*
1670         confess never returns, so these will not get executed:
1671         FREETMPS;
1672         LEAVE;
1673         */
1674     }
1675     #define OUT_OF_MEMORY "Out of memory."
1676     #define CALL_FAILED "Call failed. Possible reason is an index out of range, mathematical problem, or something else."
1677     #define NEED_DEF "A parameter which must be defined or not empty, is not."
1678     #define WRONG_CLASS "Object has a wrong class."
1679     #define NEED_REF "A parameter which must be a reference, is not."
1680     #define NEED_HASH_REF "A parameter/item which must be a hash reference, is not."
1681     #define NEED_ARRAY_REF "A parameter/item which must be an array reference, is not."
1682     #define NEED_BINARY_DATA "A parameter which must be binary data, is not."
1683     #define NEED_CODE_REF "A parameter which must be an anonymous subroutine, is not."
1684     #define WRONG_ITEM_IN_ARRAY "An item in an array parameter has wrong type."
1685     #define ARRAY_TO_XML_FAILED "An array parameter cannot be converted to an XMLTree."
1686     #define NOT_ENOUGH_ELEMENTS "The supplied array does not have enough elements."
1687 
1688 
VeryQuietErrorHandler(CPLErr eclass,int code,const char * msg)1689 void VeryQuietErrorHandler(CPLErr eclass, int code, const char *msg ) {
1690   /* If the error class is CE_Fatal, we want to have a message issued
1691      because the CPL support code does an abort() before any exception
1692      can be generated */
1693 #if defined(SWIGPERL)
1694     AV* error_stack = get_av("Geo::GDAL::error", 0);
1695     SV *error = newSVpv(msg, 0);
1696     av_push(error_stack, error);
1697 #endif
1698   if (eclass == CE_Fatal ) {
1699     CPLDefaultErrorHandler(eclass, code, msg );
1700   }
1701 }
1702 
1703 
UseExceptions()1704 void UseExceptions() {
1705   CPLSetErrorHandler( (CPLErrorHandler) VeryQuietErrorHandler );
1706 }
1707 
DontUseExceptions()1708 void DontUseExceptions() {
1709   CPLSetErrorHandler( CPLDefaultErrorHandler );
1710 }
1711 
1712 
GetWellKnownGeogCSAsWKT(const char * name,char ** argout)1713 OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
1714   OGRSpatialReferenceH srs = OSRNewSpatialReference("");
1715   OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
1716   if( rcode == OGRERR_NONE )
1717       rcode = OSRExportToWkt ( srs, argout );
1718   OSRDestroySpatialReference( srs );
1719   return rcode;
1720 }
1721 
1722 
sv_to_utf8_string(SV * sv,U8 ** tmpbuf,bool * safefree=NULL)1723     char *sv_to_utf8_string(SV *sv, U8 **tmpbuf, bool *safefree = NULL) {
1724         /* if tmpbuf is given, only tmpbuf needs to be freed, use Safefree!
1725            if not, ret needs to be freed, if safefree use Safefree else use free! */
1726         char *ret;
1727         if (safefree) *safefree = false;
1728         if (SvOK(sv)) {
1729             STRLEN len;
1730             ret = SvPV(sv, len);
1731             if (!SvUTF8(sv)) {
1732                 if (tmpbuf) {
1733                     *tmpbuf = bytes_to_utf8((const U8*)ret, &len);
1734                     ret = (char *)(*tmpbuf);
1735                 } else {
1736                     ret = (char *)bytes_to_utf8((const U8*)ret, &len);
1737                 }
1738                 if (safefree) *safefree = true;
1739             } else {
1740                 if (!tmpbuf)
1741                     ret = strdup(ret);
1742             }
1743         } else {
1744             ret = (char*)""; /* avoid "Use of uninitialized value in subroutine entry" errors */
1745             if (!tmpbuf)
1746                 ret = strdup(ret);
1747         }
1748         return ret;
1749     }
1750 
1751 
1752 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1753 SWIG_pchar_descriptor(void)
1754 {
1755   static int init = 0;
1756   static swig_type_info* info = 0;
1757   if (!init) {
1758     info = SWIG_TypeQuery("_p_char");
1759     init = 1;
1760   }
1761   return info;
1762 }
1763 
1764 
1765 SWIGINTERN int
SWIG_AsCharPtrAndSize(SV * obj,char ** cptr,size_t * psize,int * alloc)1766 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1767 {
1768   if (SvMAGICAL(obj)) {
1769      SV *tmp = sv_newmortal();
1770      SvSetSV(tmp, obj);
1771      obj = tmp;
1772   }
1773   if (SvPOK(obj)) {
1774     STRLEN len = 0;
1775     char *cstr = SvPV(obj, len);
1776     size_t size = len + 1;
1777     if (cptr)  {
1778       if (alloc) {
1779 	if (*alloc == SWIG_NEWOBJ) {
1780 	  *cptr = reinterpret_cast< char* >(memcpy(new char[size], cstr, sizeof(char)*(size)));
1781 	} else {
1782 	  *cptr = cstr;
1783 	  *alloc = SWIG_OLDOBJ;
1784 	}
1785       }
1786     }
1787     if (psize) *psize = size;
1788     return SWIG_OK;
1789   } else {
1790     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1791     if (pchar_descriptor) {
1792       char* vptr = 0;
1793       if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1794 	if (cptr) *cptr = vptr;
1795 	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1796 	if (alloc) *alloc = SWIG_OLDOBJ;
1797 	return SWIG_OK;
1798       }
1799     }
1800   }
1801   return SWIG_TypeError;
1802 }
1803 
1804 
1805 
1806 
1807 
1808 
1809 #include "ogr_core.h"
1810 static char const *
OGRErrMessages(int rc)1811 OGRErrMessages( int rc ) {
1812   switch( rc ) {
1813   case OGRERR_NONE:
1814     return "OGR Error: None";
1815   case OGRERR_NOT_ENOUGH_DATA:
1816     return "OGR Error: Not enough data to deserialize";
1817   case OGRERR_NOT_ENOUGH_MEMORY:
1818     return "OGR Error: Not enough memory";
1819   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
1820     return "OGR Error: Unsupported geometry type";
1821   case OGRERR_UNSUPPORTED_OPERATION:
1822     return "OGR Error: Unsupported operation";
1823   case OGRERR_CORRUPT_DATA:
1824     return "OGR Error: Corrupt data";
1825   case OGRERR_FAILURE:
1826     return "OGR Error: General Error";
1827   case OGRERR_UNSUPPORTED_SRS:
1828     return "OGR Error: Unsupported SRS";
1829   case OGRERR_INVALID_HANDLE:
1830     return "OGR Error: Invalid handle";
1831   case OGRERR_NON_EXISTING_FEATURE:
1832     return "OGR Error: Non existing feature";
1833   default:
1834     return "OGR Error: Unknown";
1835   }
1836 }
1837 
1838 
GetUserInputAsWKT(const char * name,char ** argout)1839 OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
1840   OGRSpatialReferenceH srs = OSRNewSpatialReference("");
1841   OGRErr rcode = OSRSetFromUserInput( srs, name );
1842   if( rcode == OGRERR_NONE )
1843       rcode = OSRExportToWkt ( srs, argout );
1844   OSRDestroySpatialReference( srs );
1845   return rcode;
1846 }
1847 
1848 
1849 typedef struct
1850 {
1851   double west_lon_degree;
1852   double south_lat_degree;
1853   double east_lon_degree;
1854   double north_lat_degree;
1855   char* name;
1856 } OSRAreaOfUse;
1857 
1858 
1859 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,double * val)1860 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1861 {
1862   if (SvNIOK(obj)) {
1863     if (val) *val = SvNV(obj);
1864     return SWIG_OK;
1865   } else if (SvIOK(obj)) {
1866     if (val) *val = (double) SvIV(obj);
1867     return SWIG_AddCast(SWIG_OK);
1868   } else {
1869     const char *nptr = SvPV_nolen(obj);
1870     if (nptr) {
1871       char *endptr;
1872       double v;
1873       errno = 0;
1874       v = strtod(nptr, &endptr);
1875       if (errno == ERANGE) {
1876 	errno = 0;
1877 	return SWIG_OverflowError;
1878       } else {
1879 	if (*endptr == '\0') {
1880 	  if (val) *val = v;
1881 	  return SWIG_Str2NumCast(SWIG_OK);
1882 	}
1883       }
1884     }
1885   }
1886   return SWIG_TypeError;
1887 }
1888 
new_OSRAreaOfUse(double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char * name)1889 SWIGINTERN OSRAreaOfUse *new_OSRAreaOfUse(double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char *name){
1890     OSRAreaOfUse *self = (OSRAreaOfUse*) CPLMalloc( sizeof( OSRAreaOfUse ) );
1891     self->west_lon_degree = west_lon_degree;
1892     self->south_lat_degree = south_lat_degree;
1893     self->east_lon_degree = east_lon_degree;
1894     self->north_lat_degree = north_lat_degree;
1895     self->name = name ? CPLStrdup(name) : NULL;
1896     return self;
1897   }
delete_OSRAreaOfUse(OSRAreaOfUse * self)1898 SWIGINTERN void delete_OSRAreaOfUse(OSRAreaOfUse *self){
1899     CPLFree( self->name );
1900     CPLFree( self );
1901   }
1902 
1903 
OSRAreaOfUse_west_lon_degree_get(OSRAreaOfUse * area)1904 double OSRAreaOfUse_west_lon_degree_get( OSRAreaOfUse *area ) {
1905   return area->west_lon_degree;
1906 }
1907 
OSRAreaOfUse_south_lat_degree_get(OSRAreaOfUse * area)1908 double OSRAreaOfUse_south_lat_degree_get( OSRAreaOfUse *area ) {
1909   return area->south_lat_degree;
1910 }
1911 
OSRAreaOfUse_east_lon_degree_get(OSRAreaOfUse * area)1912 double OSRAreaOfUse_east_lon_degree_get( OSRAreaOfUse *area ) {
1913   return area->east_lon_degree;
1914 }
1915 
OSRAreaOfUse_north_lat_degree_get(OSRAreaOfUse * area)1916 double OSRAreaOfUse_north_lat_degree_get( OSRAreaOfUse *area ) {
1917   return area->north_lat_degree;
1918 }
1919 
OSRAreaOfUse_name_get(OSRAreaOfUse * area)1920 const char* OSRAreaOfUse_name_get( OSRAreaOfUse *area ) {
1921   return area->name;
1922 }
1923 
1924 
new_OSRSpatialReferenceShadow(char const * wkt="")1925 SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
1926     return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
1927   }
delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow * self)1928 SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
1929     if (OSRDereference( self ) == 0 ) {
1930       OSRDestroySpatialReference( self );
1931     }
1932   }
OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow * self)1933 SWIGINTERN char const *OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow *self){
1934     return OSRGetName( self );
1935   }
OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow * self,OSRSpatialReferenceShadow * rhs,char ** options=NULL)1936 SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
1937     return OSRIsSameEx( self, rhs, options );
1938   }
OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow * self,OSRSpatialReferenceShadow * rhs)1939 SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
1940     return OSRIsSameGeogCS( self, rhs );
1941   }
OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow * self,OSRSpatialReferenceShadow * rhs)1942 SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
1943     return OSRIsSameVertCS( self, rhs );
1944   }
OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow * self)1945 SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
1946     return OSRIsGeographic(self);
1947   }
OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow * self)1948 SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow *self){
1949     return OSRIsDerivedGeographic(self);
1950   }
OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow * self)1951 SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
1952     return OSRIsProjected(self);
1953   }
OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow * self)1954 SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
1955     return OSRIsCompound(self);
1956   }
OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow * self)1957 SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
1958     return OSRIsGeocentric(self);
1959   }
OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow * self)1960 SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
1961     return OSRIsLocal(self);
1962   }
OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow * self)1963 SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
1964     return OSRIsVertical(self);
1965   }
OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow * self)1966 SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
1967     return OSREPSGTreatsAsLatLong(self);
1968   }
OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow * self)1969 SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow *self){
1970     return OSREPSGTreatsAsNorthingEasting(self);
1971   }
1972 
1973 #include <limits.h>
1974 #if !defined(SWIG_NO_LLONG_MAX)
1975 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1976 #   define LLONG_MAX __LONG_LONG_MAX__
1977 #   define LLONG_MIN (-LLONG_MAX - 1LL)
1978 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1979 # endif
1980 #endif
1981 
1982 
1983 #include <stdlib.h>
1984 #ifdef _MSC_VER
1985 # ifndef strtoull
1986 #  define strtoull _strtoui64
1987 # endif
1988 # ifndef strtoll
1989 #  define strtoll _strtoi64
1990 # endif
1991 #endif
1992 
1993 
1994 #include <float.h>
1995 
1996 
1997 #include <math.h>
1998 
1999 
2000 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)2001 SWIG_CanCastAsInteger(double *d, double min, double max) {
2002   double x = *d;
2003   if ((min <= x && x <= max)) {
2004    double fx = floor(x);
2005    double cx = ceil(x);
2006    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
2007    if ((errno == EDOM) || (errno == ERANGE)) {
2008      errno = 0;
2009    } else {
2010      double summ, reps, diff;
2011      if (rd < x) {
2012        diff = x - rd;
2013      } else if (rd > x) {
2014        diff = rd - x;
2015      } else {
2016        return 1;
2017      }
2018      summ = rd + x;
2019      reps = diff/summ;
2020      if (reps < 8*DBL_EPSILON) {
2021        *d = rd;
2022        return 1;
2023      }
2024    }
2025   }
2026   return 0;
2027 }
2028 
2029 
2030 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,long * val)2031 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
2032 {
2033   if (SvUOK(obj)) {
2034     UV v = SvUV(obj);
2035     if (UVSIZE < sizeof(*val) || v <= LONG_MAX) {
2036       if (val) *val = v;
2037       return SWIG_OK;
2038     }
2039     return SWIG_OverflowError;
2040   } else if (SvIOK(obj)) {
2041     IV v = SvIV(obj);
2042     if (IVSIZE <= sizeof(*val) || (v >= LONG_MIN && v <= LONG_MAX)) {
2043       if(val) *val = v;
2044       return SWIG_OK;
2045     }
2046     return SWIG_OverflowError;
2047   } else {
2048     int dispatch = 0;
2049     const char *nptr = SvPV_nolen(obj);
2050     if (nptr) {
2051       char *endptr;
2052       long v;
2053       errno = 0;
2054       v = strtol(nptr, &endptr,0);
2055       if (errno == ERANGE) {
2056 	errno = 0;
2057 	return SWIG_OverflowError;
2058       } else {
2059 	if (*endptr == '\0') {
2060 	  if (val) *val = v;
2061 	  return SWIG_Str2NumCast(SWIG_OK);
2062 	}
2063       }
2064     }
2065     if (!dispatch) {
2066       double d;
2067       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2068       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
2069 	if (val) *val = (long)(d);
2070 	return res;
2071       }
2072     }
2073   }
2074   return SWIG_TypeError;
2075 }
2076 
2077 
2078 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,int * val)2079 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
2080 {
2081   long v;
2082   int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
2083   if (SWIG_IsOK(res)) {
2084     if ((v < INT_MIN || v > INT_MAX)) {
2085       return SWIG_OverflowError;
2086     } else {
2087       if (val) *val = static_cast< int >(v);
2088     }
2089   }
2090   return res;
2091 }
2092 
OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow * self,char const * pszTargetKey,char const * pszAuthority,int nCode)2093 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
2094     return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
2095   }
OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow * self,char const * name,int child=0)2096 SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
2097     return OSRGetAttrValue( self, name, child );
2098   }
OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow * self,char const * name,char const * value)2099 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
2100     return OSRSetAttrValue( self, name, value );
2101   }
OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow * self,char const * name,double to_radians)2102 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
2103     return OSRSetAngularUnits( self, name, to_radians );
2104   }
OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow * self)2105 SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
2106     // Return code ignored.
2107     return OSRGetAngularUnits( self, 0 );
2108   }
OSRSpatialReferenceShadow_GetAngularUnitsName(OSRSpatialReferenceShadow * self)2109 SWIGINTERN char const *OSRSpatialReferenceShadow_GetAngularUnitsName(OSRSpatialReferenceShadow *self){
2110     char *name = 0;
2111     OSRGetAngularUnits( self, &name );
2112     // This is really a const char* that is returned and shouldn't be freed
2113     return (const char*)name;
2114   }
OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow * self,char const * target,char const * name,double to_meters)2115 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
2116     return OSRSetTargetLinearUnits( self, target, name, to_meters );
2117   }
OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow * self,char const * name,double to_meters)2118 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
2119     return OSRSetLinearUnits( self, name, to_meters );
2120   }
OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow * self,char const * name,double to_meters)2121 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
2122     return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
2123   }
OSRSpatialReferenceShadow_GetTargetLinearUnits(OSRSpatialReferenceShadow * self,char const * target_key)2124 SWIGINTERN double OSRSpatialReferenceShadow_GetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target_key){
2125     // Return code ignored.
2126     return OSRGetTargetLinearUnits( self, target_key, 0 );
2127   }
OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow * self)2128 SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
2129     // Return code ignored.
2130     return OSRGetLinearUnits( self, 0 );
2131   }
OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow * self)2132 SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
2133     const char *name = 0;
2134     if ( OSRIsProjected( self ) ) {
2135       name = OSRGetAttrValue( self, "PROJCS|UNIT", 0 );
2136     }
2137     else if ( OSRIsLocal( self ) ) {
2138       name = OSRGetAttrValue( self, "LOCAL_CS|UNIT", 0 );
2139     }
2140 
2141     if (name != 0)
2142       return name;
2143 
2144     return "Meter";
2145   }
OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow * self,char const * target_key)2146 SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
2147     return OSRGetAuthorityCode( self, target_key );
2148   }
OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow * self,char const * target_key)2149 SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
2150     return OSRGetAuthorityName( self, target_key );
2151   }
OSRSpatialReferenceShadow_GetAreaOfUse(OSRSpatialReferenceShadow * self)2152 SWIGINTERN OSRAreaOfUse *OSRSpatialReferenceShadow_GetAreaOfUse(OSRSpatialReferenceShadow *self){
2153     OSRAreaOfUse* pArea = new_OSRAreaOfUse(0,0,0,0,NULL);
2154     const char* name = NULL;
2155     if( !OSRGetAreaOfUse(self,
2156                     &pArea->west_lon_degree,
2157                     &pArea->south_lat_degree,
2158                     &pArea->east_lon_degree,
2159                     &pArea->north_lat_degree,
2160                     &name) )
2161     {
2162         delete_OSRAreaOfUse(pArea);
2163         return NULL;
2164     }
2165     pArea->name = name ? CPLStrdup(name) : NULL;
2166     return pArea;
2167   }
OSRSpatialReferenceShadow_GetAxisName(OSRSpatialReferenceShadow * self,char const * target_key,int iAxis)2168 SWIGINTERN char const *OSRSpatialReferenceShadow_GetAxisName(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
2169     return OSRGetAxis( self, target_key, iAxis, NULL );
2170   }
OSRSpatialReferenceShadow_GetAxesCount(OSRSpatialReferenceShadow * self)2171 SWIGINTERN int OSRSpatialReferenceShadow_GetAxesCount(OSRSpatialReferenceShadow *self){
2172     return OSRGetAxesCount(self);
2173   }
OSRSpatialReferenceShadow_GetAxisOrientation(OSRSpatialReferenceShadow * self,char const * target_key,int iAxis)2174 SWIGINTERN OGRAxisOrientation OSRSpatialReferenceShadow_GetAxisOrientation(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
2175     OGRAxisOrientation orientation = OAO_Other;
2176     OSRGetAxis( self, target_key, iAxis, &orientation );
2177     return orientation;
2178   }
OSRSpatialReferenceShadow_GetAxisMappingStrategy(OSRSpatialReferenceShadow * self)2179 SWIGINTERN OSRAxisMappingStrategy OSRSpatialReferenceShadow_GetAxisMappingStrategy(OSRSpatialReferenceShadow *self){
2180     return OSRGetAxisMappingStrategy(self);
2181   }
OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow * self,OSRAxisMappingStrategy strategy)2182 SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
2183     OSRSetAxisMappingStrategy(self, strategy);
2184   }
2185 
2186     static SV *
CreateArrayFromIntArray(int * first,unsigned int size)2187         CreateArrayFromIntArray( int *first, unsigned int size ) {
2188         AV *av = (AV*)sv_2mortal((SV*)newAV());
2189         for( unsigned int i=0; i<size; i++ ) {
2190             av_store(av,i,newSViv(*first));
2191             ++first;
2192         }
2193         return sv_2mortal(newRV((SV*)av));
2194     }
2195 
OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow * self,int * nLen,int const ** pList)2196 SWIGINTERN void OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int *nLen,int const **pList){
2197       *pList = OSRGetDataAxisToSRSAxisMapping(self, nLen);
2198   }
OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow * self,int nList,int * pList)2199 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int nList,int *pList){
2200     return OSRSetDataAxisToSRSAxisMapping(self, nList, pList);
2201   }
OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow * self,int zone,int north=1)2202 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
2203     return OSRSetUTM( self, zone, north );
2204   }
OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow * self)2205 SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
2206     // Note: we will return south zones as negative since it is
2207     // hard to return two values as the C API does.
2208     int bNorth = FALSE;
2209     int nZone = OSRGetUTMZone( self, &bNorth );
2210     if( !bNorth )
2211         nZone = -1 * ABS(nZone);
2212     return nZone;
2213   }
OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow * self,int zone,int is_nad83=1,char const * unitsname="",double units=0.0)2214 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
2215     return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
2216   }
OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow * self)2217 SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
2218     return OSRAutoIdentifyEPSG( self );
2219   }
OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow * self,char const * arg)2220 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
2221     return OSRSetProjection( self, arg );
2222   }
OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow * self,char const * name,double val)2223 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
2224     return OSRSetProjParm( self, name, val );
2225   }
OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow * self,char const * name,double default_val=0.0)2226 SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
2227     // Return code ignored.
2228     return OSRGetProjParm( self, name, default_val, 0 );
2229   }
OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow * self,char const * name,double val)2230 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
2231     return OSRSetNormProjParm( self, name, val );
2232   }
OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow * self,char const * name,double default_val=0.0)2233 SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
2234     // Return code ignored.
2235     return OSRGetNormProjParm( self, name, default_val, 0 );
2236   }
OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow * self)2237 SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
2238     // Return code ignored.
2239     return OSRGetSemiMajor( self, 0 );
2240   }
OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow * self)2241 SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
2242     // Return code ignored.
2243     return OSRGetSemiMinor( self, 0 );
2244   }
OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow * self)2245 SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
2246     // Return code ignored.
2247     return OSRGetInvFlattening( self, 0 );
2248   }
OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow * self,double stdp1,double stdp2,double clat,double clong,double fe,double fn)2249 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
2250     return OSRSetACEA( self, stdp1, stdp2, clat, clong,
2251                        fe, fn );
2252   }
OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2253 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2254     return OSRSetAE( self, clat, clong,
2255                      fe, fn );
2256   }
OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow * self,double stdp,double cm,double fe,double fn)2257 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
2258     return OSRSetBonne( self, stdp, cm, fe, fn );
2259   }
OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow * self,double stdp1,double cm,double fe,double fn)2260 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
2261     return OSRSetCEA( self, stdp1, cm,
2262                       fe, fn );
2263   }
OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2264 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2265     return OSRSetCS( self, clat, clong,
2266                      fe, fn );
2267   }
OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow * self,double stdp1,double stdp2,double clat,double clong,double fe,double fn)2268 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
2269     return OSRSetEC( self, stdp1, stdp2, clat, clong,
2270                      fe, fn );
2271   }
OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow * self,double cm,double fe,double fn)2272 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
2273     return OSRSetEckertIV( self, cm, fe, fn);
2274   }
OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow * self,double cm,double fe,double fn)2275 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
2276     return OSRSetEckertVI( self, cm, fe, fn);
2277   }
OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2278 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2279     return OSRSetEquirectangular( self, clat, clong,
2280                                   fe, fn );
2281   }
OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow * self,double clat,double clong,double pseudostdparallellat,double fe,double fn)2282 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
2283     return OSRSetEquirectangular2( self, clat, clong,
2284                                    pseudostdparallellat,
2285                                    fe, fn );
2286   }
OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow * self,double clat,double clong,double sc,double fe,double fn)2287 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
2288     return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
2289   }
OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow * self,double cm,double fe,double fn)2290 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
2291     return OSRSetGS( self, cm, fe, fn );
2292   }
OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow * self,double cm,double fe,double fn)2293 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
2294     return OSRSetGH( self, cm, fe, fn );
2295   }
OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow * self)2296 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
2297     return OSRSetIGH( self );
2298   }
OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow * self,double cm,double satelliteheight,double fe,double fn)2299 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
2300     return OSRSetGEOS( self, cm, satelliteheight,
2301                        fe, fn );
2302   }
OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2303 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2304     return OSRSetGnomonic( self, clat, clong,
2305                            fe, fn );
2306   }
OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow * self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn)2307 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
2308     return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
2309                       scale, fe, fn );
2310   }
OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow * self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn)2311 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
2312     return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
2313                           scale, fe, fn );
2314   }
OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow * self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn)2315 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
2316     return OSRSetKrovak( self, clat, clong,
2317                          azimuth, pseudostdparallellat,
2318                          scale, fe, fn );
2319   }
OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2320 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2321     return OSRSetLAEA( self, clat, clong,
2322                        fe, fn );
2323   }
OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow * self,double stdp1,double stdp2,double clat,double clong,double fe,double fn)2324 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
2325     return OSRSetLCC( self, stdp1, stdp2, clat, clong,
2326                       fe, fn );
2327   }
OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow * self,double clat,double clong,double scale,double fe,double fn)2328 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
2329     return OSRSetLCC1SP( self, clat, clong, scale,
2330                          fe, fn );
2331   }
OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow * self,double stdp1,double stdp2,double clat,double clong,double fe,double fn)2332 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
2333     return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
2334                        fe, fn );
2335   }
OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2336 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2337     return OSRSetMC( self, clat, clong,
2338                      fe, fn );
2339   }
OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow * self,double clat,double clong,double scale,double fe,double fn)2340 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
2341     return OSRSetMercator( self, clat, clong,
2342                            scale, fe, fn );
2343   }
OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow * self,double stdp1,double clat,double clong,double fe,double fn)2344 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow *self,double stdp1,double clat,double clong,double fe,double fn){
2345     return OSRSetMercator2SP( self, stdp1, clat, clong, fe, fn );
2346   }
OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow * self,double cm,double fe,double fn)2347 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
2348     return OSRSetMollweide( self, cm,
2349                             fe, fn );
2350   }
OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2351 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2352     return OSRSetNZMG( self, clat, clong,
2353                        fe, fn );
2354   }
OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow * self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn)2355 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
2356     return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
2357                      fe, fn );
2358   }
OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2359 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2360     return OSRSetOrthographic( self, clat, clong,
2361                                fe, fn );
2362   }
OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2363 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2364     return OSRSetPolyconic( self, clat, clong,
2365                             fe, fn );
2366   }
OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow * self,double clat,double clong,double scale,double fe,double fn)2367 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
2368     return OSRSetPS( self, clat, clong, scale,
2369                      fe, fn );
2370   }
OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow * self,double clong,double fe,double fn)2371 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
2372     return OSRSetRobinson( self, clong, fe, fn );
2373   }
OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow * self,double clong,double fe,double fn)2374 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
2375     return OSRSetSinusoidal( self, clong, fe, fn );
2376   }
OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow * self,double clat,double clong,double scale,double fe,double fn)2377 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
2378     return OSRSetStereographic( self, clat, clong, scale,
2379                                 fe, fn );
2380   }
OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow * self,double latitudeoforigin,double cm,double fe,double fn)2381 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
2382     return OSRSetSOC( self, latitudeoforigin, cm,
2383 	              fe, fn );
2384   }
OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow * self,double clat,double clong,double scale,double fe,double fn)2385 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
2386     return OSRSetTM( self, clat, clong, scale,
2387                      fe, fn );
2388   }
OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow * self,char const * pszVariantName,double clat,double clong,double scale,double fe,double fn)2389 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
2390     return OSRSetTMVariant( self, pszVariantName, clat, clong,
2391                             scale, fe, fn );
2392   }
OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow * self,double clat,double clong,double fe,double fn)2393 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
2394     return OSRSetTMG( self, clat, clong,
2395                       fe, fn );
2396   }
OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow * self,double clat,double clong,double scale,double fe,double fn)2397 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
2398     return OSRSetTMSO( self, clat, clong, scale,
2399                        fe, fn );
2400   }
OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow * self,double clong,double fe,double fn)2401 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
2402     return OSRSetVDG( self, clong, fe, fn );
2403   }
OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow * self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn)2404 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow *self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn){
2405     return OSRSetVerticalPerspective( self,
2406         topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn );
2407   }
OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow * self,char const * name)2408 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
2409     return OSRSetWellKnownGeogCS( self, name );
2410   }
OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow * self,char const * name)2411 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name){
2412     return OSRSetFromUserInput( self, name );
2413   }
OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow * self,OSRSpatialReferenceShadow * rhs)2414 SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
2415     return OSRCopyGeogCSFrom( self, rhs );
2416   }
OSRSpatialReferenceShadow_SetTOWGS84(OSRSpatialReferenceShadow * self,double p1,double p2,double p3,double p4=0.0,double p5=0.0,double p6=0.0,double p7=0.0)2417 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTOWGS84(OSRSpatialReferenceShadow *self,double p1,double p2,double p3,double p4=0.0,double p5=0.0,double p6=0.0,double p7=0.0){
2418 
2419     return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
2420   }
OSRSpatialReferenceShadow_HasTOWGS84(OSRSpatialReferenceShadow * self)2421 SWIGINTERN bool OSRSpatialReferenceShadow_HasTOWGS84(OSRSpatialReferenceShadow *self){
2422     double ignored[7];
2423     return OSRGetTOWGS84( self, ignored, 7 ) == OGRERR_NONE;
2424   }
2425 
2426 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(bool value)2427 SWIG_From_bool  SWIG_PERL_DECL_ARGS_1(bool value)
2428 {
2429   return boolSV(value);
2430 }
2431 
2432 
2433     static SV *
CreateArrayFromDoubleArray(double * first,unsigned int size)2434         CreateArrayFromDoubleArray( double *first, unsigned int size ) {
2435         AV *av = (AV*)sv_2mortal((SV*)newAV());
2436         for( unsigned int i=0; i<size; i++ ) {
2437             av_store(av,i,newSVnv(*first));
2438             ++first;
2439         }
2440         return sv_2mortal(newRV((SV*)av));
2441     }
2442 
OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow * self,double argout[7])2443 SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
2444     return OSRGetTOWGS84( self, argout, 7 );
2445   }
OSRSpatialReferenceShadow_AddGuessedTOWGS84(OSRSpatialReferenceShadow * self)2446 SWIGINTERN OGRErr OSRSpatialReferenceShadow_AddGuessedTOWGS84(OSRSpatialReferenceShadow *self){
2447     return OSRAddGuessedTOWGS84( self );
2448   }
OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow * self,char const * pszName)2449 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
2450     return OSRSetLocalCS( self, pszName );
2451   }
OSRSpatialReferenceShadow_SetGeogCS(OSRSpatialReferenceShadow * self,char const * pszGeogName,char const * pszDatumName,char const * pszEllipsoidName,double dfSemiMajor,double dfInvFlattening,char const * pszPMName="Greenwich",double dfPMOffset=0.0,char const * pszUnits="degree",double dfConvertToRadians=0.0174532925199433)2452 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeogCS(OSRSpatialReferenceShadow *self,char const *pszGeogName,char const *pszDatumName,char const *pszEllipsoidName,double dfSemiMajor,double dfInvFlattening,char const *pszPMName="Greenwich",double dfPMOffset=0.0,char const *pszUnits="degree",double dfConvertToRadians=0.0174532925199433){
2453     return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
2454                          dfSemiMajor, dfInvFlattening,
2455                          pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
2456   }
OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow * self,char const * name="unnamed")2457 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
2458     return OSRSetProjCS( self, name );
2459   }
OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow * self,char const * name="unnamed")2460 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
2461     return OSRSetGeocCS( self, name );
2462   }
OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow * self,char const * VertCSName="unnamed",char const * VertDatumName="unnamed",int VertDatumType=0)2463 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
2464     return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
2465   }
OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow * self,char const * name,OSRSpatialReferenceShadow * horizcs,OSRSpatialReferenceShadow * vertcs)2466 SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
2467     return OSRSetCompoundCS( self, name, horizcs, vertcs );
2468   }
OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow * self,char ** ppszInput)2469 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
2470     return OSRImportFromWkt( self, ppszInput );
2471   }
OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow * self,char * ppszInput)2472 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
2473     return OSRImportFromProj4( self, ppszInput );
2474   }
OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow * self,char * url)2475 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
2476     return OSRImportFromUrl( self, url );
2477   }
OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow * self,char ** ppszInput)2478 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
2479     return OSRImportFromESRI( self, ppszInput );
2480   }
OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow * self,int arg)2481 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
2482     return OSRImportFromEPSG(self, arg);
2483   }
OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow * self,int arg)2484 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
2485     return OSRImportFromEPSGA(self, arg);
2486   }
OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow * self,char const * proj,char const * units="METRE",double argin[17]=0)2487 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
2488     return OSRImportFromPCI( self, proj, units, argin );
2489   }
OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow * self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0)2490 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
2491     return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
2492   }
OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow * self,char const * xmlString)2493 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
2494     return OSRImportFromXML( self, xmlString );
2495   }
OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow * self,char const * proj,char const * datum,char const * units)2496 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
2497     return OSRImportFromERM( self, proj, datum, units );
2498   }
OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow * self,char const * pszCoordSys)2499 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
2500     return OSRImportFromMICoordSys( self, pszCoordSys );
2501   }
OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow * self,char const * const * papszLines)2502 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
2503     return OSRImportFromOzi( self, papszLines );
2504   }
OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow * self,char ** argout,char ** options=NULL)2505 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
2506     return OSRExportToWktEx( self, argout, options );
2507   }
OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow * self,char ** argout,int simplify=0)2508 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
2509     return OSRExportToPrettyWkt( self, argout, simplify );
2510   }
OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow * self,char ** argout,char ** options=NULL)2511 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
2512     return OSRExportToPROJJSON( self, argout, options );
2513   }
OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow * self,char ** argout)2514 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
2515     return OSRExportToProj4( self, argout );
2516   }
OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow * self,char ** proj,char ** units,double * params[17])2517 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
2518     return OSRExportToPCI( self, proj, units, params );
2519   }
OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow * self,long * code,long * zone,double * params[15],long * datum)2520 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
2521     return OSRExportToUSGS( self, code, zone, params, datum );
2522   }
OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow * self,char ** argout,char const * dialect="")2523 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
2524     return OSRExportToXML( self, argout, dialect );
2525   }
OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow * self,char ** argout)2526 SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
2527     return OSRExportToMICoordSys( self, argout );
2528   }
OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow * self)2529 SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
2530     return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
2531   }
OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow * self)2532 SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
2533     return (OSRSpatialReferenceShadow*) OSRClone(self);
2534   }
OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow * self)2535 SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
2536     return OSRValidate(self);
2537   }
OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow * self)2538 SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
2539     return OSRMorphToESRI(self);
2540   }
OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow * self)2541 SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
2542     return OSRMorphFromESRI(self);
2543   }
OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow * self,char const * other_projection,char ** options=NULL)2544 SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
2545     return OSRConvertToOtherProjection(self, other_projection, options);
2546   }
OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow * self,char const * name=NULL)2547 SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow *self,char const *name=NULL){
2548     return OSRPromoteTo3D(self, name);
2549   }
OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow * self,char const * name=NULL)2550 SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow *self,char const *name=NULL){
2551     return OSRDemoteTo2D(self, name);
2552   }
new_OGRCoordinateTransformationOptions()2553 SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
2554     return OCTNewCoordinateTransformationOptions();
2555   }
delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions * self)2556 SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
2557     OCTDestroyCoordinateTransformationOptions( self );
2558   }
OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions * self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg)2559 SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
2560     return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
2561         westLongitudeDeg, southLatitudeDeg,
2562         eastLongitudeDeg, northLatitudeDeg);
2563   }
OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions * self,char const * operation)2564 SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions *self,char const *operation){
2565     return OCTCoordinateTransformationOptionsSetOperation(self, operation, false);
2566   }
OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions * self,double accuracy)2567 SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
2568     return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
2569   }
2570 
2571 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,bool * val)2572 SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val)
2573 {
2574   if (obj == &PL_sv_yes) {
2575     if (val) *val = true;
2576     return SWIG_OK;
2577   } else if (obj == &PL_sv_no) {
2578     if (val) *val = false;
2579     return SWIG_OK;
2580   } else {
2581     if (val) *val = SvTRUE(obj) ? true : false;
2582     return SWIG_AddCast(SWIG_OK);
2583   }
2584 }
2585 
OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions * self,bool allowBallpark)2586 SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
2587     return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
2588   }
new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow * src,OSRSpatialReferenceShadow * dst)2589 SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
2590     return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
2591   }
new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow * src,OSRSpatialReferenceShadow * dst,OGRCoordinateTransformationOptions * options)2592 SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
2593     return (OSRCoordinateTransformationShadow*)
2594         options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst);
2595   }
delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow * self)2596 SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
2597     OCTDestroyCoordinateTransformation( self );
2598   }
OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow * self,double inout[3])2599 SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
2600     if (self == NULL)
2601         return;
2602     OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
2603   }
OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow * self,double inout[4])2604 SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double inout[4]){
2605     if (self == NULL)
2606         return;
2607     OCTTransform4D( self, 1, &inout[0], &inout[1], &inout[2], &inout[3], NULL );
2608   }
OSRCoordinateTransformationShadow_TransformPoint__SWIG_2(OSRCoordinateTransformationShadow * self,double argout[3],double x,double y,double z=0.0)2609 SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_2(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
2610     if (self == NULL)
2611         return;
2612     argout[0] = x;
2613     argout[1] = y;
2614     argout[2] = z;
2615     OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
2616   }
OSRCoordinateTransformationShadow_TransformPoint__SWIG_3(OSRCoordinateTransformationShadow * self,double argout[4],double x,double y,double z,double t)2617 SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_3(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
2618     if (self == NULL)
2619         return;
2620     argout[0] = x;
2621     argout[1] = y;
2622     argout[2] = z;
2623     argout[3] = t;
2624     OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
2625   }
OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow * self,double argout[4],double x,double y,double z,double t)2626 SWIGINTERN int OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
2627     if (self == NULL)
2628         return -1;
2629     argout[0] = x;
2630     argout[1] = y;
2631     argout[2] = z;
2632     argout[3] = t;
2633     int errorCode = 0;
2634     OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], &errorCode );
2635     return errorCode;
2636   }
OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow * self,int nCount,double * x,double * y,double * z)2637 SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z){
2638     if (self == NULL)
2639         return;
2640     OCTTransform( self, nCount, x, y, z );
2641   }
2642 
CreateCoordinateTransformation(OSRSpatialReferenceShadow * src,OSRSpatialReferenceShadow * dst,OGRCoordinateTransformationOptions * options=NULL)2643   OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
2644     return (OSRCoordinateTransformationShadow*)
2645         options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst);
2646 }
2647 
2648 
SetPROJSearchPath(const char * utf8_path)2649 void SetPROJSearchPath( const char *utf8_path )
2650 {
2651     const char* const apszPaths[2] = { utf8_path, NULL };
2652     OSRSetPROJSearchPaths(apszPaths);
2653 }
2654 
2655 
SetPROJSearchPaths(char ** paths)2656 void SetPROJSearchPaths( char** paths )
2657 {
2658     OSRSetPROJSearchPaths(paths);
2659 }
2660 
2661 
GetPROJSearchPaths()2662 char** GetPROJSearchPaths()
2663 {
2664     return OSRGetPROJSearchPaths();
2665 }
2666 
2667 
GetPROJVersionMajor()2668 int GetPROJVersionMajor()
2669 {
2670     int num;
2671     OSRGetPROJVersion(&num, NULL, NULL);
2672     return num;
2673 }
2674 
GetPROJVersionMinor()2675 int GetPROJVersionMinor()
2676 {
2677     int num;
2678     OSRGetPROJVersion(NULL, &num, NULL);
2679     return num;
2680 }
2681 
GetPROJVersionMicro()2682 int GetPROJVersionMicro()
2683 {
2684     int num;
2685     OSRGetPROJVersion(NULL, NULL, &num);
2686     return num;
2687 }
2688 
2689 
SetPROJAuxDbPath(const char * utf8_path)2690 void SetPROJAuxDbPath( const char *utf8_path )
2691 {
2692     const char* const apszPaths[2] = { utf8_path, NULL };
2693     OSRSetPROJAuxDbPaths(apszPaths);
2694 }
2695 
2696 
SetPROJAuxDbPaths(char ** paths)2697 void SetPROJAuxDbPaths( char** paths )
2698 {
2699     OSRSetPROJAuxDbPaths(paths);
2700 }
2701 
2702 
GetPROJAuxDbPaths()2703 char** GetPROJAuxDbPaths()
2704 {
2705     return OSRGetPROJAuxDbPaths();
2706 }
2707 
2708 #ifdef __cplusplus
2709 extern "C" {
2710 #endif
2711 
2712 #ifdef PERL_OBJECT
2713 #define MAGIC_CLASS _wrap_Geo__OSR_var::
2714 class _wrap_Geo__OSR_var : public CPerlObj {
2715 public:
2716 #else
2717 #define MAGIC_CLASS
2718 #endif
swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM (sv),MAGIC * SWIGUNUSEDPARM (mg))2719 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
2720     MAGIC_PPERL
2721     croak("Value is read-only.");
2722     return 0;
2723 }
2724 
2725 
2726 #ifdef PERL_OBJECT
2727 };
2728 #endif
2729 
2730 #ifdef __cplusplus
2731 }
2732 #endif
2733 
2734 #ifdef __cplusplus
2735 extern "C" {
2736 #endif
XS(_wrap_UseExceptions)2737 XS(_wrap_UseExceptions) {
2738   {
2739     int argvi = 0;
2740     dXSARGS;
2741 
2742     if ((items < 0) || (items > 0)) {
2743       SWIG_croak("Usage: UseExceptions();");
2744     }
2745     UseExceptions();
2746     ST(argvi) = sv_newmortal();
2747     XSRETURN(argvi);
2748   fail:
2749     SWIG_croak_null();
2750   }
2751 }
2752 
2753 
XS(_wrap_DontUseExceptions)2754 XS(_wrap_DontUseExceptions) {
2755   {
2756     int argvi = 0;
2757     dXSARGS;
2758 
2759     if ((items < 0) || (items > 0)) {
2760       SWIG_croak("Usage: DontUseExceptions();");
2761     }
2762     DontUseExceptions();
2763     ST(argvi) = sv_newmortal();
2764     XSRETURN(argvi);
2765   fail:
2766     SWIG_croak_null();
2767   }
2768 }
2769 
2770 
XS(_wrap_GetWellKnownGeogCSAsWKT)2771 XS(_wrap_GetWellKnownGeogCSAsWKT) {
2772   {
2773     char *arg1 = (char *) 0 ;
2774     char **arg2 = (char **) 0 ;
2775     U8 *tmpbuf1 = NULL ;
2776     char *argout2 = 0 ;
2777     int argvi = 0;
2778     OGRErr result;
2779     dXSARGS;
2780 
2781     {
2782       /* %typemap(in,numinputs=0) (char **argout2) */
2783       arg2 = &argout2;
2784     }
2785     if ((items < 1) || (items > 1)) {
2786       SWIG_croak("Usage: GetWellKnownGeogCSAsWKT(name);");
2787     }
2788     {
2789       /* %typemap(in,numinputs=1) (const char* name) */
2790       arg1 = sv_to_utf8_string(ST(0), &tmpbuf1);
2791     }
2792     {
2793       if (!arg1) {
2794         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
2795       }
2796     }
2797     {
2798       CPLErrorReset();
2799       result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
2800       CPLErr eclass = CPLGetLastErrorType();
2801       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
2802         do_confess( CPLGetLastErrorMsg(), 0 );
2803 
2804 
2805 
2806 
2807 
2808       }
2809 
2810 
2811       /*
2812           Make warnings regular Perl warnings. This duplicates the warning
2813           message if DontUseExceptions() is in effect (it is not by default).
2814           */
2815       if ( eclass == CE_Warning ) {
2816         warn( CPLGetLastErrorMsg(), "%s" );
2817       }
2818 
2819 
2820     }
2821     {
2822       /* %typemap(out) OGRErr */
2823       if ( result != 0 ) {
2824         const char *err = CPLGetLastErrorMsg();
2825         if (err and *err) do_confess(err, 0); /* this is usually better */
2826         do_confess( OGRErrMessages(result), 1 );
2827       }
2828     }
2829     {
2830       /* %typemap(argout) (char **argout) */
2831       ST(argvi) = sv_newmortal();
2832       if ( arg2 ) {
2833         sv_setpv(ST(argvi), *arg2);
2834         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
2835       }
2836       argvi++;
2837     }
2838     {
2839       /* %typemap(freearg) (const char* name) */
2840       if (tmpbuf1) Safefree(tmpbuf1);
2841     }
2842     {
2843       /* %typemap(freearg) (char **argout) */
2844       if ( *arg2 )
2845       CPLFree( *arg2 );
2846     }
2847     XSRETURN(argvi);
2848   fail:
2849     {
2850       /* %typemap(freearg) (const char* name) */
2851       if (tmpbuf1) Safefree(tmpbuf1);
2852     }
2853     {
2854       /* %typemap(freearg) (char **argout) */
2855       if ( *arg2 )
2856       CPLFree( *arg2 );
2857     }
2858     SWIG_croak_null();
2859   }
2860 }
2861 
2862 
XS(_wrap_GetUserInputAsWKT)2863 XS(_wrap_GetUserInputAsWKT) {
2864   {
2865     char *arg1 = (char *) 0 ;
2866     char **arg2 = (char **) 0 ;
2867     U8 *tmpbuf1 = NULL ;
2868     char *argout2 = 0 ;
2869     int argvi = 0;
2870     OGRErr result;
2871     dXSARGS;
2872 
2873     {
2874       /* %typemap(in,numinputs=0) (char **argout2) */
2875       arg2 = &argout2;
2876     }
2877     if ((items < 1) || (items > 1)) {
2878       SWIG_croak("Usage: GetUserInputAsWKT(name);");
2879     }
2880     {
2881       /* %typemap(in,numinputs=1) (const char* name) */
2882       arg1 = sv_to_utf8_string(ST(0), &tmpbuf1);
2883     }
2884     {
2885       if (!arg1) {
2886         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
2887       }
2888     }
2889     {
2890       CPLErrorReset();
2891       result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
2892       CPLErr eclass = CPLGetLastErrorType();
2893       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
2894         do_confess( CPLGetLastErrorMsg(), 0 );
2895 
2896 
2897 
2898 
2899 
2900       }
2901 
2902 
2903       /*
2904           Make warnings regular Perl warnings. This duplicates the warning
2905           message if DontUseExceptions() is in effect (it is not by default).
2906           */
2907       if ( eclass == CE_Warning ) {
2908         warn( CPLGetLastErrorMsg(), "%s" );
2909       }
2910 
2911 
2912     }
2913     {
2914       /* %typemap(out) OGRErr */
2915       if ( result != 0 ) {
2916         const char *err = CPLGetLastErrorMsg();
2917         if (err and *err) do_confess(err, 0); /* this is usually better */
2918         do_confess( OGRErrMessages(result), 1 );
2919       }
2920     }
2921     {
2922       /* %typemap(argout) (char **argout) */
2923       ST(argvi) = sv_newmortal();
2924       if ( arg2 ) {
2925         sv_setpv(ST(argvi), *arg2);
2926         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
2927       }
2928       argvi++;
2929     }
2930     {
2931       /* %typemap(freearg) (const char* name) */
2932       if (tmpbuf1) Safefree(tmpbuf1);
2933     }
2934     {
2935       /* %typemap(freearg) (char **argout) */
2936       if ( *arg2 )
2937       CPLFree( *arg2 );
2938     }
2939     XSRETURN(argvi);
2940   fail:
2941     {
2942       /* %typemap(freearg) (const char* name) */
2943       if (tmpbuf1) Safefree(tmpbuf1);
2944     }
2945     {
2946       /* %typemap(freearg) (char **argout) */
2947       if ( *arg2 )
2948       CPLFree( *arg2 );
2949     }
2950     SWIG_croak_null();
2951   }
2952 }
2953 
2954 
XS(_wrap_AreaOfUse_west_lon_degree_get)2955 XS(_wrap_AreaOfUse_west_lon_degree_get) {
2956   {
2957     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
2958     void *argp1 = 0 ;
2959     int res1 = 0 ;
2960     int argvi = 0;
2961     double result;
2962     dXSARGS;
2963 
2964     if ((items < 1) || (items > 1)) {
2965       SWIG_croak("Usage: AreaOfUse_west_lon_degree_get(self);");
2966     }
2967     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
2968     if (!SWIG_IsOK(res1)) {
2969       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
2970     }
2971     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
2972     {
2973       CPLErrorReset();
2974       result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
2975       CPLErr eclass = CPLGetLastErrorType();
2976       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
2977         do_confess( CPLGetLastErrorMsg(), 0 );
2978 
2979 
2980 
2981 
2982 
2983       }
2984 
2985 
2986       /*
2987           Make warnings regular Perl warnings. This duplicates the warning
2988           message if DontUseExceptions() is in effect (it is not by default).
2989           */
2990       if ( eclass == CE_Warning ) {
2991         warn( CPLGetLastErrorMsg(), "%s" );
2992       }
2993 
2994 
2995     }
2996     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
2997 
2998     XSRETURN(argvi);
2999   fail:
3000 
3001     SWIG_croak_null();
3002   }
3003 }
3004 
3005 
XS(_wrap_AreaOfUse_south_lat_degree_get)3006 XS(_wrap_AreaOfUse_south_lat_degree_get) {
3007   {
3008     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3009     void *argp1 = 0 ;
3010     int res1 = 0 ;
3011     int argvi = 0;
3012     double result;
3013     dXSARGS;
3014 
3015     if ((items < 1) || (items > 1)) {
3016       SWIG_croak("Usage: AreaOfUse_south_lat_degree_get(self);");
3017     }
3018     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3019     if (!SWIG_IsOK(res1)) {
3020       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3021     }
3022     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3023     {
3024       CPLErrorReset();
3025       result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
3026       CPLErr eclass = CPLGetLastErrorType();
3027       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3028         do_confess( CPLGetLastErrorMsg(), 0 );
3029 
3030 
3031 
3032 
3033 
3034       }
3035 
3036 
3037       /*
3038           Make warnings regular Perl warnings. This duplicates the warning
3039           message if DontUseExceptions() is in effect (it is not by default).
3040           */
3041       if ( eclass == CE_Warning ) {
3042         warn( CPLGetLastErrorMsg(), "%s" );
3043       }
3044 
3045 
3046     }
3047     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3048 
3049     XSRETURN(argvi);
3050   fail:
3051 
3052     SWIG_croak_null();
3053   }
3054 }
3055 
3056 
XS(_wrap_AreaOfUse_east_lon_degree_get)3057 XS(_wrap_AreaOfUse_east_lon_degree_get) {
3058   {
3059     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3060     void *argp1 = 0 ;
3061     int res1 = 0 ;
3062     int argvi = 0;
3063     double result;
3064     dXSARGS;
3065 
3066     if ((items < 1) || (items > 1)) {
3067       SWIG_croak("Usage: AreaOfUse_east_lon_degree_get(self);");
3068     }
3069     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3070     if (!SWIG_IsOK(res1)) {
3071       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3072     }
3073     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3074     {
3075       CPLErrorReset();
3076       result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
3077       CPLErr eclass = CPLGetLastErrorType();
3078       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3079         do_confess( CPLGetLastErrorMsg(), 0 );
3080 
3081 
3082 
3083 
3084 
3085       }
3086 
3087 
3088       /*
3089           Make warnings regular Perl warnings. This duplicates the warning
3090           message if DontUseExceptions() is in effect (it is not by default).
3091           */
3092       if ( eclass == CE_Warning ) {
3093         warn( CPLGetLastErrorMsg(), "%s" );
3094       }
3095 
3096 
3097     }
3098     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3099 
3100     XSRETURN(argvi);
3101   fail:
3102 
3103     SWIG_croak_null();
3104   }
3105 }
3106 
3107 
XS(_wrap_AreaOfUse_north_lat_degree_get)3108 XS(_wrap_AreaOfUse_north_lat_degree_get) {
3109   {
3110     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3111     void *argp1 = 0 ;
3112     int res1 = 0 ;
3113     int argvi = 0;
3114     double result;
3115     dXSARGS;
3116 
3117     if ((items < 1) || (items > 1)) {
3118       SWIG_croak("Usage: AreaOfUse_north_lat_degree_get(self);");
3119     }
3120     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3121     if (!SWIG_IsOK(res1)) {
3122       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3123     }
3124     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3125     {
3126       CPLErrorReset();
3127       result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
3128       CPLErr eclass = CPLGetLastErrorType();
3129       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3130         do_confess( CPLGetLastErrorMsg(), 0 );
3131 
3132 
3133 
3134 
3135 
3136       }
3137 
3138 
3139       /*
3140           Make warnings regular Perl warnings. This duplicates the warning
3141           message if DontUseExceptions() is in effect (it is not by default).
3142           */
3143       if ( eclass == CE_Warning ) {
3144         warn( CPLGetLastErrorMsg(), "%s" );
3145       }
3146 
3147 
3148     }
3149     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3150 
3151     XSRETURN(argvi);
3152   fail:
3153 
3154     SWIG_croak_null();
3155   }
3156 }
3157 
3158 
XS(_wrap_AreaOfUse_name_get)3159 XS(_wrap_AreaOfUse_name_get) {
3160   {
3161     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3162     void *argp1 = 0 ;
3163     int res1 = 0 ;
3164     int argvi = 0;
3165     char *result = 0 ;
3166     dXSARGS;
3167 
3168     if ((items < 1) || (items > 1)) {
3169       SWIG_croak("Usage: AreaOfUse_name_get(self);");
3170     }
3171     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3172     if (!SWIG_IsOK(res1)) {
3173       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3174     }
3175     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3176     {
3177       CPLErrorReset();
3178       result = (char *)OSRAreaOfUse_name_get(arg1);
3179       CPLErr eclass = CPLGetLastErrorType();
3180       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3181         do_confess( CPLGetLastErrorMsg(), 0 );
3182 
3183 
3184 
3185 
3186 
3187       }
3188 
3189 
3190       /*
3191           Make warnings regular Perl warnings. This duplicates the warning
3192           message if DontUseExceptions() is in effect (it is not by default).
3193           */
3194       if ( eclass == CE_Warning ) {
3195         warn( CPLGetLastErrorMsg(), "%s" );
3196       }
3197 
3198 
3199     }
3200     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
3201 
3202     XSRETURN(argvi);
3203   fail:
3204 
3205     SWIG_croak_null();
3206   }
3207 }
3208 
3209 
XS(_wrap_new_AreaOfUse)3210 XS(_wrap_new_AreaOfUse) {
3211   {
3212     double arg1 ;
3213     double arg2 ;
3214     double arg3 ;
3215     double arg4 ;
3216     char *arg5 = (char *) 0 ;
3217     double val1 ;
3218     int ecode1 = 0 ;
3219     double val2 ;
3220     int ecode2 = 0 ;
3221     double val3 ;
3222     int ecode3 = 0 ;
3223     double val4 ;
3224     int ecode4 = 0 ;
3225     int res5 ;
3226     char *buf5 = 0 ;
3227     int alloc5 = 0 ;
3228     int argvi = 0;
3229     OSRAreaOfUse *result = 0 ;
3230     dXSARGS;
3231 
3232     if ((items < 5) || (items > 5)) {
3233       SWIG_croak("Usage: new_AreaOfUse(west_lon_degree,south_lat_degree,east_lon_degree,north_lat_degree,name);");
3234     }
3235     ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
3236     if (!SWIG_IsOK(ecode1)) {
3237       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AreaOfUse" "', argument " "1"" of type '" "double""'");
3238     }
3239     arg1 = static_cast< double >(val1);
3240     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3241     if (!SWIG_IsOK(ecode2)) {
3242       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AreaOfUse" "', argument " "2"" of type '" "double""'");
3243     }
3244     arg2 = static_cast< double >(val2);
3245     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3246     if (!SWIG_IsOK(ecode3)) {
3247       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AreaOfUse" "', argument " "3"" of type '" "double""'");
3248     }
3249     arg3 = static_cast< double >(val3);
3250     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3251     if (!SWIG_IsOK(ecode4)) {
3252       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_AreaOfUse" "', argument " "4"" of type '" "double""'");
3253     }
3254     arg4 = static_cast< double >(val4);
3255     res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5);
3256     if (!SWIG_IsOK(res5)) {
3257       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_AreaOfUse" "', argument " "5"" of type '" "char *""'");
3258     }
3259     arg5 = reinterpret_cast< char * >(buf5);
3260     {
3261       CPLErrorReset();
3262       result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
3263       CPLErr eclass = CPLGetLastErrorType();
3264       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3265         do_confess( CPLGetLastErrorMsg(), 0 );
3266 
3267 
3268 
3269 
3270 
3271       }
3272 
3273 
3274       /*
3275           Make warnings regular Perl warnings. This duplicates the warning
3276           message if DontUseExceptions() is in effect (it is not by default).
3277           */
3278       if ( eclass == CE_Warning ) {
3279         warn( CPLGetLastErrorMsg(), "%s" );
3280       }
3281 
3282 
3283     }
3284     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
3285 
3286 
3287 
3288 
3289     if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
3290     XSRETURN(argvi);
3291   fail:
3292 
3293 
3294 
3295 
3296     if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
3297     SWIG_croak_null();
3298   }
3299 }
3300 
3301 
XS(_wrap_delete_AreaOfUse)3302 XS(_wrap_delete_AreaOfUse) {
3303   {
3304     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3305     void *argp1 = 0 ;
3306     int res1 = 0 ;
3307     int argvi = 0;
3308     dXSARGS;
3309 
3310     if ((items < 1) || (items > 1)) {
3311       SWIG_croak("Usage: delete_AreaOfUse(self);");
3312     }
3313     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_DISOWN |  0 );
3314     if (!SWIG_IsOK(res1)) {
3315       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AreaOfUse" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3316     }
3317     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3318     {
3319       CPLErrorReset();
3320       delete_OSRAreaOfUse(arg1);
3321       CPLErr eclass = CPLGetLastErrorType();
3322       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3323         do_confess( CPLGetLastErrorMsg(), 0 );
3324 
3325 
3326 
3327 
3328 
3329       }
3330 
3331 
3332       /*
3333           Make warnings regular Perl warnings. This duplicates the warning
3334           message if DontUseExceptions() is in effect (it is not by default).
3335           */
3336       if ( eclass == CE_Warning ) {
3337         warn( CPLGetLastErrorMsg(), "%s" );
3338       }
3339 
3340 
3341     }
3342     {
3343       /* %typemap(out) void */
3344     }
3345 
3346     XSRETURN(argvi);
3347   fail:
3348 
3349     SWIG_croak_null();
3350   }
3351 }
3352 
3353 
XS(_wrap_OSRAreaOfUse_west_lon_degree_get)3354 XS(_wrap_OSRAreaOfUse_west_lon_degree_get) {
3355   {
3356     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3357     void *argp1 = 0 ;
3358     int res1 = 0 ;
3359     int argvi = 0;
3360     double result;
3361     dXSARGS;
3362 
3363     if ((items < 1) || (items > 1)) {
3364       SWIG_croak("Usage: OSRAreaOfUse_west_lon_degree_get(area);");
3365     }
3366     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3367     if (!SWIG_IsOK(res1)) {
3368       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3369     }
3370     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3371     {
3372       if (!arg1) {
3373         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3374       }
3375     }
3376     {
3377       CPLErrorReset();
3378       result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
3379       CPLErr eclass = CPLGetLastErrorType();
3380       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3381         do_confess( CPLGetLastErrorMsg(), 0 );
3382 
3383 
3384 
3385 
3386 
3387       }
3388 
3389 
3390       /*
3391           Make warnings regular Perl warnings. This duplicates the warning
3392           message if DontUseExceptions() is in effect (it is not by default).
3393           */
3394       if ( eclass == CE_Warning ) {
3395         warn( CPLGetLastErrorMsg(), "%s" );
3396       }
3397 
3398 
3399     }
3400     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3401 
3402     XSRETURN(argvi);
3403   fail:
3404 
3405     SWIG_croak_null();
3406   }
3407 }
3408 
3409 
XS(_wrap_OSRAreaOfUse_south_lat_degree_get)3410 XS(_wrap_OSRAreaOfUse_south_lat_degree_get) {
3411   {
3412     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3413     void *argp1 = 0 ;
3414     int res1 = 0 ;
3415     int argvi = 0;
3416     double result;
3417     dXSARGS;
3418 
3419     if ((items < 1) || (items > 1)) {
3420       SWIG_croak("Usage: OSRAreaOfUse_south_lat_degree_get(area);");
3421     }
3422     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3423     if (!SWIG_IsOK(res1)) {
3424       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3425     }
3426     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3427     {
3428       if (!arg1) {
3429         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3430       }
3431     }
3432     {
3433       CPLErrorReset();
3434       result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
3435       CPLErr eclass = CPLGetLastErrorType();
3436       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3437         do_confess( CPLGetLastErrorMsg(), 0 );
3438 
3439 
3440 
3441 
3442 
3443       }
3444 
3445 
3446       /*
3447           Make warnings regular Perl warnings. This duplicates the warning
3448           message if DontUseExceptions() is in effect (it is not by default).
3449           */
3450       if ( eclass == CE_Warning ) {
3451         warn( CPLGetLastErrorMsg(), "%s" );
3452       }
3453 
3454 
3455     }
3456     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3457 
3458     XSRETURN(argvi);
3459   fail:
3460 
3461     SWIG_croak_null();
3462   }
3463 }
3464 
3465 
XS(_wrap_OSRAreaOfUse_east_lon_degree_get)3466 XS(_wrap_OSRAreaOfUse_east_lon_degree_get) {
3467   {
3468     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3469     void *argp1 = 0 ;
3470     int res1 = 0 ;
3471     int argvi = 0;
3472     double result;
3473     dXSARGS;
3474 
3475     if ((items < 1) || (items > 1)) {
3476       SWIG_croak("Usage: OSRAreaOfUse_east_lon_degree_get(area);");
3477     }
3478     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3479     if (!SWIG_IsOK(res1)) {
3480       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3481     }
3482     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3483     {
3484       if (!arg1) {
3485         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3486       }
3487     }
3488     {
3489       CPLErrorReset();
3490       result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
3491       CPLErr eclass = CPLGetLastErrorType();
3492       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3493         do_confess( CPLGetLastErrorMsg(), 0 );
3494 
3495 
3496 
3497 
3498 
3499       }
3500 
3501 
3502       /*
3503           Make warnings regular Perl warnings. This duplicates the warning
3504           message if DontUseExceptions() is in effect (it is not by default).
3505           */
3506       if ( eclass == CE_Warning ) {
3507         warn( CPLGetLastErrorMsg(), "%s" );
3508       }
3509 
3510 
3511     }
3512     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3513 
3514     XSRETURN(argvi);
3515   fail:
3516 
3517     SWIG_croak_null();
3518   }
3519 }
3520 
3521 
XS(_wrap_OSRAreaOfUse_north_lat_degree_get)3522 XS(_wrap_OSRAreaOfUse_north_lat_degree_get) {
3523   {
3524     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3525     void *argp1 = 0 ;
3526     int res1 = 0 ;
3527     int argvi = 0;
3528     double result;
3529     dXSARGS;
3530 
3531     if ((items < 1) || (items > 1)) {
3532       SWIG_croak("Usage: OSRAreaOfUse_north_lat_degree_get(area);");
3533     }
3534     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3535     if (!SWIG_IsOK(res1)) {
3536       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3537     }
3538     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3539     {
3540       if (!arg1) {
3541         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3542       }
3543     }
3544     {
3545       CPLErrorReset();
3546       result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
3547       CPLErr eclass = CPLGetLastErrorType();
3548       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3549         do_confess( CPLGetLastErrorMsg(), 0 );
3550 
3551 
3552 
3553 
3554 
3555       }
3556 
3557 
3558       /*
3559           Make warnings regular Perl warnings. This duplicates the warning
3560           message if DontUseExceptions() is in effect (it is not by default).
3561           */
3562       if ( eclass == CE_Warning ) {
3563         warn( CPLGetLastErrorMsg(), "%s" );
3564       }
3565 
3566 
3567     }
3568     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
3569 
3570     XSRETURN(argvi);
3571   fail:
3572 
3573     SWIG_croak_null();
3574   }
3575 }
3576 
3577 
XS(_wrap_OSRAreaOfUse_name_get)3578 XS(_wrap_OSRAreaOfUse_name_get) {
3579   {
3580     OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
3581     void *argp1 = 0 ;
3582     int res1 = 0 ;
3583     int argvi = 0;
3584     char *result = 0 ;
3585     dXSARGS;
3586 
3587     if ((items < 1) || (items > 1)) {
3588       SWIG_croak("Usage: OSRAreaOfUse_name_get(area);");
3589     }
3590     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 |  0 );
3591     if (!SWIG_IsOK(res1)) {
3592       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
3593     }
3594     arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
3595     {
3596       if (!arg1) {
3597         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3598       }
3599     }
3600     {
3601       CPLErrorReset();
3602       result = (char *)OSRAreaOfUse_name_get(arg1);
3603       CPLErr eclass = CPLGetLastErrorType();
3604       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3605         do_confess( CPLGetLastErrorMsg(), 0 );
3606 
3607 
3608 
3609 
3610 
3611       }
3612 
3613 
3614       /*
3615           Make warnings regular Perl warnings. This duplicates the warning
3616           message if DontUseExceptions() is in effect (it is not by default).
3617           */
3618       if ( eclass == CE_Warning ) {
3619         warn( CPLGetLastErrorMsg(), "%s" );
3620       }
3621 
3622 
3623     }
3624     {
3625       /* %typemap(out) const char * */
3626       ST(argvi) = newSVpv(result, 0);
3627       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
3628       sv_2mortal(ST(argvi));
3629       argvi++;
3630     }
3631 
3632     XSRETURN(argvi);
3633   fail:
3634 
3635     SWIG_croak_null();
3636   }
3637 }
3638 
3639 
XS(_wrap_new_SpatialReference)3640 XS(_wrap_new_SpatialReference) {
3641   {
3642     char *arg1 = (char *) "" ;
3643     int res1 ;
3644     char *buf1 = 0 ;
3645     int alloc1 = 0 ;
3646     int argvi = 0;
3647     OSRSpatialReferenceShadow *result = 0 ;
3648     dXSARGS;
3649 
3650     if ((items < 0) || (items > 1)) {
3651       SWIG_croak("Usage: new_SpatialReference(wkt);");
3652     }
3653     if (items > 0) {
3654       res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
3655       if (!SWIG_IsOK(res1)) {
3656         SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
3657       }
3658       arg1 = reinterpret_cast< char * >(buf1);
3659     }
3660     {
3661       CPLErrorReset();
3662       result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
3663       CPLErr eclass = CPLGetLastErrorType();
3664       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3665         do_confess( CPLGetLastErrorMsg(), 0 );
3666 
3667 
3668 
3669 
3670 
3671       }
3672 
3673 
3674       /*
3675           Make warnings regular Perl warnings. This duplicates the warning
3676           message if DontUseExceptions() is in effect (it is not by default).
3677           */
3678       if ( eclass == CE_Warning ) {
3679         warn( CPLGetLastErrorMsg(), "%s" );
3680       }
3681 
3682 
3683     }
3684     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
3685     if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3686     XSRETURN(argvi);
3687   fail:
3688     if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3689     SWIG_croak_null();
3690   }
3691 }
3692 
3693 
XS(_wrap_delete_SpatialReference)3694 XS(_wrap_delete_SpatialReference) {
3695   {
3696     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
3697     void *argp1 = 0 ;
3698     int res1 = 0 ;
3699     int argvi = 0;
3700     dXSARGS;
3701 
3702     if ((items < 1) || (items > 1)) {
3703       SWIG_croak("Usage: delete_SpatialReference(self);");
3704     }
3705     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN |  0 );
3706     if (!SWIG_IsOK(res1)) {
3707       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
3708     }
3709     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
3710     {
3711       CPLErrorReset();
3712       delete_OSRSpatialReferenceShadow(arg1);
3713       CPLErr eclass = CPLGetLastErrorType();
3714       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3715         do_confess( CPLGetLastErrorMsg(), 0 );
3716 
3717 
3718 
3719 
3720 
3721       }
3722 
3723 
3724       /*
3725           Make warnings regular Perl warnings. This duplicates the warning
3726           message if DontUseExceptions() is in effect (it is not by default).
3727           */
3728       if ( eclass == CE_Warning ) {
3729         warn( CPLGetLastErrorMsg(), "%s" );
3730       }
3731 
3732 
3733     }
3734     {
3735       /* %typemap(out) void */
3736     }
3737 
3738     XSRETURN(argvi);
3739   fail:
3740 
3741     SWIG_croak_null();
3742   }
3743 }
3744 
3745 
XS(_wrap_SpatialReference_GetName)3746 XS(_wrap_SpatialReference_GetName) {
3747   {
3748     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
3749     void *argp1 = 0 ;
3750     int res1 = 0 ;
3751     int argvi = 0;
3752     char *result = 0 ;
3753     dXSARGS;
3754 
3755     if ((items < 1) || (items > 1)) {
3756       SWIG_croak("Usage: SpatialReference_GetName(self);");
3757     }
3758     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3759     if (!SWIG_IsOK(res1)) {
3760       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
3761     }
3762     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
3763     {
3764       CPLErrorReset();
3765       result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
3766       CPLErr eclass = CPLGetLastErrorType();
3767       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3768         do_confess( CPLGetLastErrorMsg(), 0 );
3769 
3770 
3771 
3772 
3773 
3774       }
3775 
3776 
3777       /*
3778           Make warnings regular Perl warnings. This duplicates the warning
3779           message if DontUseExceptions() is in effect (it is not by default).
3780           */
3781       if ( eclass == CE_Warning ) {
3782         warn( CPLGetLastErrorMsg(), "%s" );
3783       }
3784 
3785 
3786     }
3787     {
3788       /* %typemap(out) const char * */
3789       ST(argvi) = newSVpv(result, 0);
3790       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
3791       sv_2mortal(ST(argvi));
3792       argvi++;
3793     }
3794 
3795     XSRETURN(argvi);
3796   fail:
3797 
3798     SWIG_croak_null();
3799   }
3800 }
3801 
3802 
XS(_wrap_SpatialReference_IsSame)3803 XS(_wrap_SpatialReference_IsSame) {
3804   {
3805     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
3806     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
3807     char **arg3 = (char **) NULL ;
3808     void *argp1 = 0 ;
3809     int res1 = 0 ;
3810     void *argp2 = 0 ;
3811     int res2 = 0 ;
3812     int argvi = 0;
3813     int result;
3814     dXSARGS;
3815 
3816     if ((items < 2) || (items > 3)) {
3817       SWIG_croak("Usage: SpatialReference_IsSame(self,rhs,options);");
3818     }
3819     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3820     if (!SWIG_IsOK(res1)) {
3821       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
3822     }
3823     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
3824     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3825     if (!SWIG_IsOK(res2)) {
3826       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
3827     }
3828     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
3829     if (items > 2) {
3830       {
3831         /* %typemap(in) char **options */
3832         if (SvOK(ST(2))) {
3833           if (SvROK(ST(2))) {
3834             if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
3835               AV *av = (AV*)(SvRV(ST(2)));
3836               for (int i = 0; i < av_len(av)+1; i++) {
3837                 SV *sv = *(av_fetch(av, i, 0));
3838                 bool sf;
3839                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
3840                 arg3 = CSLAddString(arg3, tmp);
3841                 if (sf) Safefree(tmp); else free(tmp);
3842               }
3843             } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
3844               HV *hv = (HV*)SvRV(ST(2));
3845               SV *sv;
3846               char *key;
3847               I32 klen;
3848               arg3 = NULL;
3849               hv_iterinit(hv);
3850               while(sv = hv_iternextsv(hv, &key, &klen)) {
3851                 bool sf;
3852                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
3853                 arg3 = CSLAddNameValue(arg3, key, tmp);
3854                 if (sf) Safefree(tmp); else free(tmp);
3855               }
3856             } else
3857             do_confess(NEED_REF, 1);
3858           } else
3859           do_confess(NEED_REF, 1);
3860         }
3861       }
3862     }
3863     {
3864       if (!arg2) {
3865         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3866       }
3867     }
3868     {
3869       CPLErrorReset();
3870       result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2,arg3);
3871       CPLErr eclass = CPLGetLastErrorType();
3872       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3873         do_confess( CPLGetLastErrorMsg(), 0 );
3874 
3875 
3876 
3877 
3878 
3879       }
3880 
3881 
3882       /*
3883           Make warnings regular Perl warnings. This duplicates the warning
3884           message if DontUseExceptions() is in effect (it is not by default).
3885           */
3886       if ( eclass == CE_Warning ) {
3887         warn( CPLGetLastErrorMsg(), "%s" );
3888       }
3889 
3890 
3891     }
3892     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
3893 
3894 
3895     {
3896       /* %typemap(freearg) char **options */
3897       if (arg3) CSLDestroy( arg3 );
3898     }
3899     XSRETURN(argvi);
3900   fail:
3901 
3902 
3903     {
3904       /* %typemap(freearg) char **options */
3905       if (arg3) CSLDestroy( arg3 );
3906     }
3907     SWIG_croak_null();
3908   }
3909 }
3910 
3911 
XS(_wrap_SpatialReference_IsSameGeogCS)3912 XS(_wrap_SpatialReference_IsSameGeogCS) {
3913   {
3914     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
3915     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
3916     void *argp1 = 0 ;
3917     int res1 = 0 ;
3918     void *argp2 = 0 ;
3919     int res2 = 0 ;
3920     int argvi = 0;
3921     int result;
3922     dXSARGS;
3923 
3924     if ((items < 2) || (items > 2)) {
3925       SWIG_croak("Usage: SpatialReference_IsSameGeogCS(self,rhs);");
3926     }
3927     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3928     if (!SWIG_IsOK(res1)) {
3929       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
3930     }
3931     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
3932     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3933     if (!SWIG_IsOK(res2)) {
3934       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
3935     }
3936     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
3937     {
3938       if (!arg2) {
3939         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3940       }
3941     }
3942     {
3943       CPLErrorReset();
3944       result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
3945       CPLErr eclass = CPLGetLastErrorType();
3946       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3947         do_confess( CPLGetLastErrorMsg(), 0 );
3948 
3949 
3950 
3951 
3952 
3953       }
3954 
3955 
3956       /*
3957           Make warnings regular Perl warnings. This duplicates the warning
3958           message if DontUseExceptions() is in effect (it is not by default).
3959           */
3960       if ( eclass == CE_Warning ) {
3961         warn( CPLGetLastErrorMsg(), "%s" );
3962       }
3963 
3964 
3965     }
3966     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
3967 
3968 
3969     XSRETURN(argvi);
3970   fail:
3971 
3972 
3973     SWIG_croak_null();
3974   }
3975 }
3976 
3977 
XS(_wrap_SpatialReference_IsSameVertCS)3978 XS(_wrap_SpatialReference_IsSameVertCS) {
3979   {
3980     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
3981     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
3982     void *argp1 = 0 ;
3983     int res1 = 0 ;
3984     void *argp2 = 0 ;
3985     int res2 = 0 ;
3986     int argvi = 0;
3987     int result;
3988     dXSARGS;
3989 
3990     if ((items < 2) || (items > 2)) {
3991       SWIG_croak("Usage: SpatialReference_IsSameVertCS(self,rhs);");
3992     }
3993     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3994     if (!SWIG_IsOK(res1)) {
3995       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
3996     }
3997     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
3998     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
3999     if (!SWIG_IsOK(res2)) {
4000       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4001     }
4002     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4003     {
4004       if (!arg2) {
4005         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4006       }
4007     }
4008     {
4009       CPLErrorReset();
4010       result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
4011       CPLErr eclass = CPLGetLastErrorType();
4012       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4013         do_confess( CPLGetLastErrorMsg(), 0 );
4014 
4015 
4016 
4017 
4018 
4019       }
4020 
4021 
4022       /*
4023           Make warnings regular Perl warnings. This duplicates the warning
4024           message if DontUseExceptions() is in effect (it is not by default).
4025           */
4026       if ( eclass == CE_Warning ) {
4027         warn( CPLGetLastErrorMsg(), "%s" );
4028       }
4029 
4030 
4031     }
4032     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4033 
4034 
4035     XSRETURN(argvi);
4036   fail:
4037 
4038 
4039     SWIG_croak_null();
4040   }
4041 }
4042 
4043 
XS(_wrap_SpatialReference_IsGeographic)4044 XS(_wrap_SpatialReference_IsGeographic) {
4045   {
4046     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4047     void *argp1 = 0 ;
4048     int res1 = 0 ;
4049     int argvi = 0;
4050     int result;
4051     dXSARGS;
4052 
4053     if ((items < 1) || (items > 1)) {
4054       SWIG_croak("Usage: SpatialReference_IsGeographic(self);");
4055     }
4056     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4057     if (!SWIG_IsOK(res1)) {
4058       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4059     }
4060     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4061     {
4062       CPLErrorReset();
4063       result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
4064       CPLErr eclass = CPLGetLastErrorType();
4065       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4066         do_confess( CPLGetLastErrorMsg(), 0 );
4067 
4068 
4069 
4070 
4071 
4072       }
4073 
4074 
4075       /*
4076           Make warnings regular Perl warnings. This duplicates the warning
4077           message if DontUseExceptions() is in effect (it is not by default).
4078           */
4079       if ( eclass == CE_Warning ) {
4080         warn( CPLGetLastErrorMsg(), "%s" );
4081       }
4082 
4083 
4084     }
4085     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4086 
4087     XSRETURN(argvi);
4088   fail:
4089 
4090     SWIG_croak_null();
4091   }
4092 }
4093 
4094 
XS(_wrap_SpatialReference_IsDerivedGeographic)4095 XS(_wrap_SpatialReference_IsDerivedGeographic) {
4096   {
4097     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4098     void *argp1 = 0 ;
4099     int res1 = 0 ;
4100     int argvi = 0;
4101     int result;
4102     dXSARGS;
4103 
4104     if ((items < 1) || (items > 1)) {
4105       SWIG_croak("Usage: SpatialReference_IsDerivedGeographic(self);");
4106     }
4107     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4108     if (!SWIG_IsOK(res1)) {
4109       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4110     }
4111     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4112     {
4113       CPLErrorReset();
4114       result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
4115       CPLErr eclass = CPLGetLastErrorType();
4116       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4117         do_confess( CPLGetLastErrorMsg(), 0 );
4118 
4119 
4120 
4121 
4122 
4123       }
4124 
4125 
4126       /*
4127           Make warnings regular Perl warnings. This duplicates the warning
4128           message if DontUseExceptions() is in effect (it is not by default).
4129           */
4130       if ( eclass == CE_Warning ) {
4131         warn( CPLGetLastErrorMsg(), "%s" );
4132       }
4133 
4134 
4135     }
4136     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4137 
4138     XSRETURN(argvi);
4139   fail:
4140 
4141     SWIG_croak_null();
4142   }
4143 }
4144 
4145 
XS(_wrap_SpatialReference_IsProjected)4146 XS(_wrap_SpatialReference_IsProjected) {
4147   {
4148     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4149     void *argp1 = 0 ;
4150     int res1 = 0 ;
4151     int argvi = 0;
4152     int result;
4153     dXSARGS;
4154 
4155     if ((items < 1) || (items > 1)) {
4156       SWIG_croak("Usage: SpatialReference_IsProjected(self);");
4157     }
4158     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4159     if (!SWIG_IsOK(res1)) {
4160       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4161     }
4162     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4163     {
4164       CPLErrorReset();
4165       result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
4166       CPLErr eclass = CPLGetLastErrorType();
4167       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4168         do_confess( CPLGetLastErrorMsg(), 0 );
4169 
4170 
4171 
4172 
4173 
4174       }
4175 
4176 
4177       /*
4178           Make warnings regular Perl warnings. This duplicates the warning
4179           message if DontUseExceptions() is in effect (it is not by default).
4180           */
4181       if ( eclass == CE_Warning ) {
4182         warn( CPLGetLastErrorMsg(), "%s" );
4183       }
4184 
4185 
4186     }
4187     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4188 
4189     XSRETURN(argvi);
4190   fail:
4191 
4192     SWIG_croak_null();
4193   }
4194 }
4195 
4196 
XS(_wrap_SpatialReference_IsCompound)4197 XS(_wrap_SpatialReference_IsCompound) {
4198   {
4199     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4200     void *argp1 = 0 ;
4201     int res1 = 0 ;
4202     int argvi = 0;
4203     int result;
4204     dXSARGS;
4205 
4206     if ((items < 1) || (items > 1)) {
4207       SWIG_croak("Usage: SpatialReference_IsCompound(self);");
4208     }
4209     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4210     if (!SWIG_IsOK(res1)) {
4211       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4212     }
4213     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4214     {
4215       CPLErrorReset();
4216       result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
4217       CPLErr eclass = CPLGetLastErrorType();
4218       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4219         do_confess( CPLGetLastErrorMsg(), 0 );
4220 
4221 
4222 
4223 
4224 
4225       }
4226 
4227 
4228       /*
4229           Make warnings regular Perl warnings. This duplicates the warning
4230           message if DontUseExceptions() is in effect (it is not by default).
4231           */
4232       if ( eclass == CE_Warning ) {
4233         warn( CPLGetLastErrorMsg(), "%s" );
4234       }
4235 
4236 
4237     }
4238     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4239 
4240     XSRETURN(argvi);
4241   fail:
4242 
4243     SWIG_croak_null();
4244   }
4245 }
4246 
4247 
XS(_wrap_SpatialReference_IsGeocentric)4248 XS(_wrap_SpatialReference_IsGeocentric) {
4249   {
4250     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4251     void *argp1 = 0 ;
4252     int res1 = 0 ;
4253     int argvi = 0;
4254     int result;
4255     dXSARGS;
4256 
4257     if ((items < 1) || (items > 1)) {
4258       SWIG_croak("Usage: SpatialReference_IsGeocentric(self);");
4259     }
4260     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4261     if (!SWIG_IsOK(res1)) {
4262       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4263     }
4264     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4265     {
4266       CPLErrorReset();
4267       result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
4268       CPLErr eclass = CPLGetLastErrorType();
4269       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4270         do_confess( CPLGetLastErrorMsg(), 0 );
4271 
4272 
4273 
4274 
4275 
4276       }
4277 
4278 
4279       /*
4280           Make warnings regular Perl warnings. This duplicates the warning
4281           message if DontUseExceptions() is in effect (it is not by default).
4282           */
4283       if ( eclass == CE_Warning ) {
4284         warn( CPLGetLastErrorMsg(), "%s" );
4285       }
4286 
4287 
4288     }
4289     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4290 
4291     XSRETURN(argvi);
4292   fail:
4293 
4294     SWIG_croak_null();
4295   }
4296 }
4297 
4298 
XS(_wrap_SpatialReference_IsLocal)4299 XS(_wrap_SpatialReference_IsLocal) {
4300   {
4301     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4302     void *argp1 = 0 ;
4303     int res1 = 0 ;
4304     int argvi = 0;
4305     int result;
4306     dXSARGS;
4307 
4308     if ((items < 1) || (items > 1)) {
4309       SWIG_croak("Usage: SpatialReference_IsLocal(self);");
4310     }
4311     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4312     if (!SWIG_IsOK(res1)) {
4313       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4314     }
4315     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4316     {
4317       CPLErrorReset();
4318       result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
4319       CPLErr eclass = CPLGetLastErrorType();
4320       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4321         do_confess( CPLGetLastErrorMsg(), 0 );
4322 
4323 
4324 
4325 
4326 
4327       }
4328 
4329 
4330       /*
4331           Make warnings regular Perl warnings. This duplicates the warning
4332           message if DontUseExceptions() is in effect (it is not by default).
4333           */
4334       if ( eclass == CE_Warning ) {
4335         warn( CPLGetLastErrorMsg(), "%s" );
4336       }
4337 
4338 
4339     }
4340     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4341 
4342     XSRETURN(argvi);
4343   fail:
4344 
4345     SWIG_croak_null();
4346   }
4347 }
4348 
4349 
XS(_wrap_SpatialReference_IsVertical)4350 XS(_wrap_SpatialReference_IsVertical) {
4351   {
4352     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4353     void *argp1 = 0 ;
4354     int res1 = 0 ;
4355     int argvi = 0;
4356     int result;
4357     dXSARGS;
4358 
4359     if ((items < 1) || (items > 1)) {
4360       SWIG_croak("Usage: SpatialReference_IsVertical(self);");
4361     }
4362     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4363     if (!SWIG_IsOK(res1)) {
4364       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4365     }
4366     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4367     {
4368       CPLErrorReset();
4369       result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
4370       CPLErr eclass = CPLGetLastErrorType();
4371       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4372         do_confess( CPLGetLastErrorMsg(), 0 );
4373 
4374 
4375 
4376 
4377 
4378       }
4379 
4380 
4381       /*
4382           Make warnings regular Perl warnings. This duplicates the warning
4383           message if DontUseExceptions() is in effect (it is not by default).
4384           */
4385       if ( eclass == CE_Warning ) {
4386         warn( CPLGetLastErrorMsg(), "%s" );
4387       }
4388 
4389 
4390     }
4391     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4392 
4393     XSRETURN(argvi);
4394   fail:
4395 
4396     SWIG_croak_null();
4397   }
4398 }
4399 
4400 
XS(_wrap_SpatialReference_EPSGTreatsAsLatLong)4401 XS(_wrap_SpatialReference_EPSGTreatsAsLatLong) {
4402   {
4403     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4404     void *argp1 = 0 ;
4405     int res1 = 0 ;
4406     int argvi = 0;
4407     int result;
4408     dXSARGS;
4409 
4410     if ((items < 1) || (items > 1)) {
4411       SWIG_croak("Usage: SpatialReference_EPSGTreatsAsLatLong(self);");
4412     }
4413     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4414     if (!SWIG_IsOK(res1)) {
4415       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4416     }
4417     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4418     {
4419       CPLErrorReset();
4420       result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
4421       CPLErr eclass = CPLGetLastErrorType();
4422       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4423         do_confess( CPLGetLastErrorMsg(), 0 );
4424 
4425 
4426 
4427 
4428 
4429       }
4430 
4431 
4432       /*
4433           Make warnings regular Perl warnings. This duplicates the warning
4434           message if DontUseExceptions() is in effect (it is not by default).
4435           */
4436       if ( eclass == CE_Warning ) {
4437         warn( CPLGetLastErrorMsg(), "%s" );
4438       }
4439 
4440 
4441     }
4442     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4443 
4444     XSRETURN(argvi);
4445   fail:
4446 
4447     SWIG_croak_null();
4448   }
4449 }
4450 
4451 
XS(_wrap_SpatialReference_EPSGTreatsAsNorthingEasting)4452 XS(_wrap_SpatialReference_EPSGTreatsAsNorthingEasting) {
4453   {
4454     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4455     void *argp1 = 0 ;
4456     int res1 = 0 ;
4457     int argvi = 0;
4458     int result;
4459     dXSARGS;
4460 
4461     if ((items < 1) || (items > 1)) {
4462       SWIG_croak("Usage: SpatialReference_EPSGTreatsAsNorthingEasting(self);");
4463     }
4464     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4465     if (!SWIG_IsOK(res1)) {
4466       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsNorthingEasting" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4467     }
4468     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4469     {
4470       CPLErrorReset();
4471       result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
4472       CPLErr eclass = CPLGetLastErrorType();
4473       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4474         do_confess( CPLGetLastErrorMsg(), 0 );
4475 
4476 
4477 
4478 
4479 
4480       }
4481 
4482 
4483       /*
4484           Make warnings regular Perl warnings. This duplicates the warning
4485           message if DontUseExceptions() is in effect (it is not by default).
4486           */
4487       if ( eclass == CE_Warning ) {
4488         warn( CPLGetLastErrorMsg(), "%s" );
4489       }
4490 
4491 
4492     }
4493     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
4494 
4495     XSRETURN(argvi);
4496   fail:
4497 
4498     SWIG_croak_null();
4499   }
4500 }
4501 
4502 
XS(_wrap_SpatialReference_SetAuthority)4503 XS(_wrap_SpatialReference_SetAuthority) {
4504   {
4505     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4506     char *arg2 = (char *) 0 ;
4507     char *arg3 = (char *) 0 ;
4508     int arg4 ;
4509     void *argp1 = 0 ;
4510     int res1 = 0 ;
4511     int res2 ;
4512     char *buf2 = 0 ;
4513     int alloc2 = 0 ;
4514     int res3 ;
4515     char *buf3 = 0 ;
4516     int alloc3 = 0 ;
4517     int val4 ;
4518     int ecode4 = 0 ;
4519     int argvi = 0;
4520     OGRErr result;
4521     dXSARGS;
4522 
4523     if ((items < 4) || (items > 4)) {
4524       SWIG_croak("Usage: SpatialReference_SetAuthority(self,pszTargetKey,pszAuthority,nCode);");
4525     }
4526     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4527     if (!SWIG_IsOK(res1)) {
4528       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4529     }
4530     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4531     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
4532     if (!SWIG_IsOK(res2)) {
4533       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
4534     }
4535     arg2 = reinterpret_cast< char * >(buf2);
4536     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
4537     if (!SWIG_IsOK(res3)) {
4538       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
4539     }
4540     arg3 = reinterpret_cast< char * >(buf3);
4541     ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
4542     if (!SWIG_IsOK(ecode4)) {
4543       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
4544     }
4545     arg4 = static_cast< int >(val4);
4546     {
4547       CPLErrorReset();
4548       result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
4549       CPLErr eclass = CPLGetLastErrorType();
4550       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4551         do_confess( CPLGetLastErrorMsg(), 0 );
4552 
4553 
4554 
4555 
4556 
4557       }
4558 
4559 
4560       /*
4561           Make warnings regular Perl warnings. This duplicates the warning
4562           message if DontUseExceptions() is in effect (it is not by default).
4563           */
4564       if ( eclass == CE_Warning ) {
4565         warn( CPLGetLastErrorMsg(), "%s" );
4566       }
4567 
4568 
4569     }
4570     {
4571       /* %typemap(out) OGRErr */
4572       if ( result != 0 ) {
4573         const char *err = CPLGetLastErrorMsg();
4574         if (err and *err) do_confess(err, 0); /* this is usually better */
4575         do_confess( OGRErrMessages(result), 1 );
4576       }
4577     }
4578 
4579     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4580     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4581 
4582     XSRETURN(argvi);
4583   fail:
4584 
4585     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4586     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4587 
4588     SWIG_croak_null();
4589   }
4590 }
4591 
4592 
XS(_wrap_SpatialReference_GetAttrValue)4593 XS(_wrap_SpatialReference_GetAttrValue) {
4594   {
4595     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4596     char *arg2 = (char *) 0 ;
4597     int arg3 = (int) 0 ;
4598     void *argp1 = 0 ;
4599     int res1 = 0 ;
4600     U8 *tmpbuf2 = NULL ;
4601     int val3 ;
4602     int ecode3 = 0 ;
4603     int argvi = 0;
4604     char *result = 0 ;
4605     dXSARGS;
4606 
4607     if ((items < 2) || (items > 3)) {
4608       SWIG_croak("Usage: SpatialReference_GetAttrValue(self,name,child);");
4609     }
4610     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4611     if (!SWIG_IsOK(res1)) {
4612       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4613     }
4614     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4615     {
4616       /* %typemap(in,numinputs=1) (const char* name) */
4617       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
4618     }
4619     if (items > 2) {
4620       ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
4621       if (!SWIG_IsOK(ecode3)) {
4622         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
4623       }
4624       arg3 = static_cast< int >(val3);
4625     }
4626     {
4627       if (!arg2) {
4628         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4629       }
4630     }
4631     {
4632       CPLErrorReset();
4633       result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
4634       CPLErr eclass = CPLGetLastErrorType();
4635       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4636         do_confess( CPLGetLastErrorMsg(), 0 );
4637 
4638 
4639 
4640 
4641 
4642       }
4643 
4644 
4645       /*
4646           Make warnings regular Perl warnings. This duplicates the warning
4647           message if DontUseExceptions() is in effect (it is not by default).
4648           */
4649       if ( eclass == CE_Warning ) {
4650         warn( CPLGetLastErrorMsg(), "%s" );
4651       }
4652 
4653 
4654     }
4655     {
4656       /* %typemap(out) const char * */
4657       ST(argvi) = newSVpv(result, 0);
4658       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
4659       sv_2mortal(ST(argvi));
4660       argvi++;
4661     }
4662 
4663     {
4664       /* %typemap(freearg) (const char* name) */
4665       if (tmpbuf2) Safefree(tmpbuf2);
4666     }
4667 
4668     XSRETURN(argvi);
4669   fail:
4670 
4671     {
4672       /* %typemap(freearg) (const char* name) */
4673       if (tmpbuf2) Safefree(tmpbuf2);
4674     }
4675 
4676     SWIG_croak_null();
4677   }
4678 }
4679 
4680 
XS(_wrap_SpatialReference_SetAttrValue)4681 XS(_wrap_SpatialReference_SetAttrValue) {
4682   {
4683     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4684     char *arg2 = (char *) 0 ;
4685     char *arg3 = (char *) 0 ;
4686     void *argp1 = 0 ;
4687     int res1 = 0 ;
4688     U8 *tmpbuf2 = NULL ;
4689     int res3 ;
4690     char *buf3 = 0 ;
4691     int alloc3 = 0 ;
4692     int argvi = 0;
4693     OGRErr result;
4694     dXSARGS;
4695 
4696     if ((items < 3) || (items > 3)) {
4697       SWIG_croak("Usage: SpatialReference_SetAttrValue(self,name,value);");
4698     }
4699     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4700     if (!SWIG_IsOK(res1)) {
4701       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4702     }
4703     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4704     {
4705       /* %typemap(in,numinputs=1) (const char* name) */
4706       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
4707     }
4708     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
4709     if (!SWIG_IsOK(res3)) {
4710       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
4711     }
4712     arg3 = reinterpret_cast< char * >(buf3);
4713     {
4714       if (!arg2) {
4715         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4716       }
4717     }
4718     {
4719       CPLErrorReset();
4720       result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
4721       CPLErr eclass = CPLGetLastErrorType();
4722       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4723         do_confess( CPLGetLastErrorMsg(), 0 );
4724 
4725 
4726 
4727 
4728 
4729       }
4730 
4731 
4732       /*
4733           Make warnings regular Perl warnings. This duplicates the warning
4734           message if DontUseExceptions() is in effect (it is not by default).
4735           */
4736       if ( eclass == CE_Warning ) {
4737         warn( CPLGetLastErrorMsg(), "%s" );
4738       }
4739 
4740 
4741     }
4742     {
4743       /* %typemap(out) OGRErr */
4744       if ( result != 0 ) {
4745         const char *err = CPLGetLastErrorMsg();
4746         if (err and *err) do_confess(err, 0); /* this is usually better */
4747         do_confess( OGRErrMessages(result), 1 );
4748       }
4749     }
4750 
4751     {
4752       /* %typemap(freearg) (const char* name) */
4753       if (tmpbuf2) Safefree(tmpbuf2);
4754     }
4755     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4756     XSRETURN(argvi);
4757   fail:
4758 
4759     {
4760       /* %typemap(freearg) (const char* name) */
4761       if (tmpbuf2) Safefree(tmpbuf2);
4762     }
4763     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4764     SWIG_croak_null();
4765   }
4766 }
4767 
4768 
XS(_wrap_SpatialReference_SetAngularUnits)4769 XS(_wrap_SpatialReference_SetAngularUnits) {
4770   {
4771     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4772     char *arg2 = (char *) 0 ;
4773     double arg3 ;
4774     void *argp1 = 0 ;
4775     int res1 = 0 ;
4776     U8 *tmpbuf2 = NULL ;
4777     double val3 ;
4778     int ecode3 = 0 ;
4779     int argvi = 0;
4780     OGRErr result;
4781     dXSARGS;
4782 
4783     if ((items < 3) || (items > 3)) {
4784       SWIG_croak("Usage: SpatialReference_SetAngularUnits(self,name,to_radians);");
4785     }
4786     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4787     if (!SWIG_IsOK(res1)) {
4788       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4789     }
4790     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4791     {
4792       /* %typemap(in,numinputs=1) (const char* name) */
4793       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
4794     }
4795     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
4796     if (!SWIG_IsOK(ecode3)) {
4797       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
4798     }
4799     arg3 = static_cast< double >(val3);
4800     {
4801       if (!arg2) {
4802         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4803       }
4804     }
4805     {
4806       CPLErrorReset();
4807       result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
4808       CPLErr eclass = CPLGetLastErrorType();
4809       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4810         do_confess( CPLGetLastErrorMsg(), 0 );
4811 
4812 
4813 
4814 
4815 
4816       }
4817 
4818 
4819       /*
4820           Make warnings regular Perl warnings. This duplicates the warning
4821           message if DontUseExceptions() is in effect (it is not by default).
4822           */
4823       if ( eclass == CE_Warning ) {
4824         warn( CPLGetLastErrorMsg(), "%s" );
4825       }
4826 
4827 
4828     }
4829     {
4830       /* %typemap(out) OGRErr */
4831       if ( result != 0 ) {
4832         const char *err = CPLGetLastErrorMsg();
4833         if (err and *err) do_confess(err, 0); /* this is usually better */
4834         do_confess( OGRErrMessages(result), 1 );
4835       }
4836     }
4837 
4838     {
4839       /* %typemap(freearg) (const char* name) */
4840       if (tmpbuf2) Safefree(tmpbuf2);
4841     }
4842 
4843     XSRETURN(argvi);
4844   fail:
4845 
4846     {
4847       /* %typemap(freearg) (const char* name) */
4848       if (tmpbuf2) Safefree(tmpbuf2);
4849     }
4850 
4851     SWIG_croak_null();
4852   }
4853 }
4854 
4855 
XS(_wrap_SpatialReference_GetAngularUnits)4856 XS(_wrap_SpatialReference_GetAngularUnits) {
4857   {
4858     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4859     void *argp1 = 0 ;
4860     int res1 = 0 ;
4861     int argvi = 0;
4862     double result;
4863     dXSARGS;
4864 
4865     if ((items < 1) || (items > 1)) {
4866       SWIG_croak("Usage: SpatialReference_GetAngularUnits(self);");
4867     }
4868     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4869     if (!SWIG_IsOK(res1)) {
4870       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4871     }
4872     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4873     {
4874       CPLErrorReset();
4875       result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
4876       CPLErr eclass = CPLGetLastErrorType();
4877       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4878         do_confess( CPLGetLastErrorMsg(), 0 );
4879 
4880 
4881 
4882 
4883 
4884       }
4885 
4886 
4887       /*
4888           Make warnings regular Perl warnings. This duplicates the warning
4889           message if DontUseExceptions() is in effect (it is not by default).
4890           */
4891       if ( eclass == CE_Warning ) {
4892         warn( CPLGetLastErrorMsg(), "%s" );
4893       }
4894 
4895 
4896     }
4897     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
4898 
4899     XSRETURN(argvi);
4900   fail:
4901 
4902     SWIG_croak_null();
4903   }
4904 }
4905 
4906 
XS(_wrap_SpatialReference_GetAngularUnitsName)4907 XS(_wrap_SpatialReference_GetAngularUnitsName) {
4908   {
4909     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4910     void *argp1 = 0 ;
4911     int res1 = 0 ;
4912     int argvi = 0;
4913     char *result = 0 ;
4914     dXSARGS;
4915 
4916     if ((items < 1) || (items > 1)) {
4917       SWIG_croak("Usage: SpatialReference_GetAngularUnitsName(self);");
4918     }
4919     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4920     if (!SWIG_IsOK(res1)) {
4921       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4922     }
4923     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4924     {
4925       CPLErrorReset();
4926       result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
4927       CPLErr eclass = CPLGetLastErrorType();
4928       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4929         do_confess( CPLGetLastErrorMsg(), 0 );
4930 
4931 
4932 
4933 
4934 
4935       }
4936 
4937 
4938       /*
4939           Make warnings regular Perl warnings. This duplicates the warning
4940           message if DontUseExceptions() is in effect (it is not by default).
4941           */
4942       if ( eclass == CE_Warning ) {
4943         warn( CPLGetLastErrorMsg(), "%s" );
4944       }
4945 
4946 
4947     }
4948     {
4949       /* %typemap(out) const char * */
4950       ST(argvi) = newSVpv(result, 0);
4951       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
4952       sv_2mortal(ST(argvi));
4953       argvi++;
4954     }
4955 
4956     XSRETURN(argvi);
4957   fail:
4958 
4959     SWIG_croak_null();
4960   }
4961 }
4962 
4963 
XS(_wrap_SpatialReference_SetTargetLinearUnits)4964 XS(_wrap_SpatialReference_SetTargetLinearUnits) {
4965   {
4966     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4967     char *arg2 = (char *) 0 ;
4968     char *arg3 = (char *) 0 ;
4969     double arg4 ;
4970     void *argp1 = 0 ;
4971     int res1 = 0 ;
4972     int res2 ;
4973     char *buf2 = 0 ;
4974     int alloc2 = 0 ;
4975     U8 *tmpbuf3 = NULL ;
4976     double val4 ;
4977     int ecode4 = 0 ;
4978     int argvi = 0;
4979     OGRErr result;
4980     dXSARGS;
4981 
4982     if ((items < 4) || (items > 4)) {
4983       SWIG_croak("Usage: SpatialReference_SetTargetLinearUnits(self,target,name,to_meters);");
4984     }
4985     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
4986     if (!SWIG_IsOK(res1)) {
4987       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4988     }
4989     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4990     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
4991     if (!SWIG_IsOK(res2)) {
4992       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
4993     }
4994     arg2 = reinterpret_cast< char * >(buf2);
4995     {
4996       /* %typemap(in,numinputs=1) (const char* name) */
4997       arg3 = sv_to_utf8_string(ST(2), &tmpbuf3);
4998     }
4999     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
5000     if (!SWIG_IsOK(ecode4)) {
5001       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
5002     }
5003     arg4 = static_cast< double >(val4);
5004     {
5005       if (!arg3) {
5006         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5007       }
5008     }
5009     {
5010       CPLErrorReset();
5011       result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
5012       CPLErr eclass = CPLGetLastErrorType();
5013       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5014         do_confess( CPLGetLastErrorMsg(), 0 );
5015 
5016 
5017 
5018 
5019 
5020       }
5021 
5022 
5023       /*
5024           Make warnings regular Perl warnings. This duplicates the warning
5025           message if DontUseExceptions() is in effect (it is not by default).
5026           */
5027       if ( eclass == CE_Warning ) {
5028         warn( CPLGetLastErrorMsg(), "%s" );
5029       }
5030 
5031 
5032     }
5033     {
5034       /* %typemap(out) OGRErr */
5035       if ( result != 0 ) {
5036         const char *err = CPLGetLastErrorMsg();
5037         if (err and *err) do_confess(err, 0); /* this is usually better */
5038         do_confess( OGRErrMessages(result), 1 );
5039       }
5040     }
5041 
5042     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5043     {
5044       /* %typemap(freearg) (const char* name) */
5045       if (tmpbuf3) Safefree(tmpbuf3);
5046     }
5047 
5048     XSRETURN(argvi);
5049   fail:
5050 
5051     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5052     {
5053       /* %typemap(freearg) (const char* name) */
5054       if (tmpbuf3) Safefree(tmpbuf3);
5055     }
5056 
5057     SWIG_croak_null();
5058   }
5059 }
5060 
5061 
XS(_wrap_SpatialReference_SetLinearUnits)5062 XS(_wrap_SpatialReference_SetLinearUnits) {
5063   {
5064     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5065     char *arg2 = (char *) 0 ;
5066     double arg3 ;
5067     void *argp1 = 0 ;
5068     int res1 = 0 ;
5069     U8 *tmpbuf2 = NULL ;
5070     double val3 ;
5071     int ecode3 = 0 ;
5072     int argvi = 0;
5073     OGRErr result;
5074     dXSARGS;
5075 
5076     if ((items < 3) || (items > 3)) {
5077       SWIG_croak("Usage: SpatialReference_SetLinearUnits(self,name,to_meters);");
5078     }
5079     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5080     if (!SWIG_IsOK(res1)) {
5081       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5082     }
5083     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5084     {
5085       /* %typemap(in,numinputs=1) (const char* name) */
5086       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
5087     }
5088     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
5089     if (!SWIG_IsOK(ecode3)) {
5090       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
5091     }
5092     arg3 = static_cast< double >(val3);
5093     {
5094       if (!arg2) {
5095         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5096       }
5097     }
5098     {
5099       CPLErrorReset();
5100       result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
5101       CPLErr eclass = CPLGetLastErrorType();
5102       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5103         do_confess( CPLGetLastErrorMsg(), 0 );
5104 
5105 
5106 
5107 
5108 
5109       }
5110 
5111 
5112       /*
5113           Make warnings regular Perl warnings. This duplicates the warning
5114           message if DontUseExceptions() is in effect (it is not by default).
5115           */
5116       if ( eclass == CE_Warning ) {
5117         warn( CPLGetLastErrorMsg(), "%s" );
5118       }
5119 
5120 
5121     }
5122     {
5123       /* %typemap(out) OGRErr */
5124       if ( result != 0 ) {
5125         const char *err = CPLGetLastErrorMsg();
5126         if (err and *err) do_confess(err, 0); /* this is usually better */
5127         do_confess( OGRErrMessages(result), 1 );
5128       }
5129     }
5130 
5131     {
5132       /* %typemap(freearg) (const char* name) */
5133       if (tmpbuf2) Safefree(tmpbuf2);
5134     }
5135 
5136     XSRETURN(argvi);
5137   fail:
5138 
5139     {
5140       /* %typemap(freearg) (const char* name) */
5141       if (tmpbuf2) Safefree(tmpbuf2);
5142     }
5143 
5144     SWIG_croak_null();
5145   }
5146 }
5147 
5148 
XS(_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters)5149 XS(_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters) {
5150   {
5151     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5152     char *arg2 = (char *) 0 ;
5153     double arg3 ;
5154     void *argp1 = 0 ;
5155     int res1 = 0 ;
5156     U8 *tmpbuf2 = NULL ;
5157     double val3 ;
5158     int ecode3 = 0 ;
5159     int argvi = 0;
5160     OGRErr result;
5161     dXSARGS;
5162 
5163     if ((items < 3) || (items > 3)) {
5164       SWIG_croak("Usage: SpatialReference_SetLinearUnitsAndUpdateParameters(self,name,to_meters);");
5165     }
5166     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5167     if (!SWIG_IsOK(res1)) {
5168       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5169     }
5170     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5171     {
5172       /* %typemap(in,numinputs=1) (const char* name) */
5173       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
5174     }
5175     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
5176     if (!SWIG_IsOK(ecode3)) {
5177       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
5178     }
5179     arg3 = static_cast< double >(val3);
5180     {
5181       if (!arg2) {
5182         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5183       }
5184     }
5185     {
5186       CPLErrorReset();
5187       result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
5188       CPLErr eclass = CPLGetLastErrorType();
5189       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5190         do_confess( CPLGetLastErrorMsg(), 0 );
5191 
5192 
5193 
5194 
5195 
5196       }
5197 
5198 
5199       /*
5200           Make warnings regular Perl warnings. This duplicates the warning
5201           message if DontUseExceptions() is in effect (it is not by default).
5202           */
5203       if ( eclass == CE_Warning ) {
5204         warn( CPLGetLastErrorMsg(), "%s" );
5205       }
5206 
5207 
5208     }
5209     {
5210       /* %typemap(out) OGRErr */
5211       if ( result != 0 ) {
5212         const char *err = CPLGetLastErrorMsg();
5213         if (err and *err) do_confess(err, 0); /* this is usually better */
5214         do_confess( OGRErrMessages(result), 1 );
5215       }
5216     }
5217 
5218     {
5219       /* %typemap(freearg) (const char* name) */
5220       if (tmpbuf2) Safefree(tmpbuf2);
5221     }
5222 
5223     XSRETURN(argvi);
5224   fail:
5225 
5226     {
5227       /* %typemap(freearg) (const char* name) */
5228       if (tmpbuf2) Safefree(tmpbuf2);
5229     }
5230 
5231     SWIG_croak_null();
5232   }
5233 }
5234 
5235 
XS(_wrap_SpatialReference_GetTargetLinearUnits)5236 XS(_wrap_SpatialReference_GetTargetLinearUnits) {
5237   {
5238     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5239     char *arg2 = (char *) 0 ;
5240     void *argp1 = 0 ;
5241     int res1 = 0 ;
5242     int res2 ;
5243     char *buf2 = 0 ;
5244     int alloc2 = 0 ;
5245     int argvi = 0;
5246     double result;
5247     dXSARGS;
5248 
5249     {
5250       /* %typemap(default) const char * target_key */
5251       arg2 = NULL;
5252     }
5253     if ((items < 1) || (items > 2)) {
5254       SWIG_croak("Usage: SpatialReference_GetTargetLinearUnits(self,target_key);");
5255     }
5256     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5257     if (!SWIG_IsOK(res1)) {
5258       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5259     }
5260     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5261     if (items > 1) {
5262       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
5263       if (!SWIG_IsOK(res2)) {
5264         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
5265       }
5266       arg2 = reinterpret_cast< char * >(buf2);
5267     }
5268     {
5269       CPLErrorReset();
5270       result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
5271       CPLErr eclass = CPLGetLastErrorType();
5272       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5273         do_confess( CPLGetLastErrorMsg(), 0 );
5274 
5275 
5276 
5277 
5278 
5279       }
5280 
5281 
5282       /*
5283           Make warnings regular Perl warnings. This duplicates the warning
5284           message if DontUseExceptions() is in effect (it is not by default).
5285           */
5286       if ( eclass == CE_Warning ) {
5287         warn( CPLGetLastErrorMsg(), "%s" );
5288       }
5289 
5290 
5291     }
5292     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
5293 
5294     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5295     XSRETURN(argvi);
5296   fail:
5297 
5298     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5299     SWIG_croak_null();
5300   }
5301 }
5302 
5303 
XS(_wrap_SpatialReference_GetLinearUnits)5304 XS(_wrap_SpatialReference_GetLinearUnits) {
5305   {
5306     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5307     void *argp1 = 0 ;
5308     int res1 = 0 ;
5309     int argvi = 0;
5310     double result;
5311     dXSARGS;
5312 
5313     if ((items < 1) || (items > 1)) {
5314       SWIG_croak("Usage: SpatialReference_GetLinearUnits(self);");
5315     }
5316     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5317     if (!SWIG_IsOK(res1)) {
5318       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5319     }
5320     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5321     {
5322       CPLErrorReset();
5323       result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
5324       CPLErr eclass = CPLGetLastErrorType();
5325       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5326         do_confess( CPLGetLastErrorMsg(), 0 );
5327 
5328 
5329 
5330 
5331 
5332       }
5333 
5334 
5335       /*
5336           Make warnings regular Perl warnings. This duplicates the warning
5337           message if DontUseExceptions() is in effect (it is not by default).
5338           */
5339       if ( eclass == CE_Warning ) {
5340         warn( CPLGetLastErrorMsg(), "%s" );
5341       }
5342 
5343 
5344     }
5345     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
5346 
5347     XSRETURN(argvi);
5348   fail:
5349 
5350     SWIG_croak_null();
5351   }
5352 }
5353 
5354 
XS(_wrap_SpatialReference_GetLinearUnitsName)5355 XS(_wrap_SpatialReference_GetLinearUnitsName) {
5356   {
5357     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5358     void *argp1 = 0 ;
5359     int res1 = 0 ;
5360     int argvi = 0;
5361     char *result = 0 ;
5362     dXSARGS;
5363 
5364     if ((items < 1) || (items > 1)) {
5365       SWIG_croak("Usage: SpatialReference_GetLinearUnitsName(self);");
5366     }
5367     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5368     if (!SWIG_IsOK(res1)) {
5369       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5370     }
5371     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5372     {
5373       CPLErrorReset();
5374       result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
5375       CPLErr eclass = CPLGetLastErrorType();
5376       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5377         do_confess( CPLGetLastErrorMsg(), 0 );
5378 
5379 
5380 
5381 
5382 
5383       }
5384 
5385 
5386       /*
5387           Make warnings regular Perl warnings. This duplicates the warning
5388           message if DontUseExceptions() is in effect (it is not by default).
5389           */
5390       if ( eclass == CE_Warning ) {
5391         warn( CPLGetLastErrorMsg(), "%s" );
5392       }
5393 
5394 
5395     }
5396     {
5397       /* %typemap(out) const char * */
5398       ST(argvi) = newSVpv(result, 0);
5399       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
5400       sv_2mortal(ST(argvi));
5401       argvi++;
5402     }
5403 
5404     XSRETURN(argvi);
5405   fail:
5406 
5407     SWIG_croak_null();
5408   }
5409 }
5410 
5411 
XS(_wrap_SpatialReference_GetAuthorityCode)5412 XS(_wrap_SpatialReference_GetAuthorityCode) {
5413   {
5414     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5415     char *arg2 = (char *) 0 ;
5416     void *argp1 = 0 ;
5417     int res1 = 0 ;
5418     int res2 ;
5419     char *buf2 = 0 ;
5420     int alloc2 = 0 ;
5421     int argvi = 0;
5422     char *result = 0 ;
5423     dXSARGS;
5424 
5425     {
5426       /* %typemap(default) const char * target_key */
5427       arg2 = NULL;
5428     }
5429     if ((items < 1) || (items > 2)) {
5430       SWIG_croak("Usage: SpatialReference_GetAuthorityCode(self,target_key);");
5431     }
5432     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5433     if (!SWIG_IsOK(res1)) {
5434       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5435     }
5436     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5437     if (items > 1) {
5438       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
5439       if (!SWIG_IsOK(res2)) {
5440         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
5441       }
5442       arg2 = reinterpret_cast< char * >(buf2);
5443     }
5444     {
5445       CPLErrorReset();
5446       result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
5447       CPLErr eclass = CPLGetLastErrorType();
5448       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5449         do_confess( CPLGetLastErrorMsg(), 0 );
5450 
5451 
5452 
5453 
5454 
5455       }
5456 
5457 
5458       /*
5459           Make warnings regular Perl warnings. This duplicates the warning
5460           message if DontUseExceptions() is in effect (it is not by default).
5461           */
5462       if ( eclass == CE_Warning ) {
5463         warn( CPLGetLastErrorMsg(), "%s" );
5464       }
5465 
5466 
5467     }
5468     {
5469       /* %typemap(out) const char * */
5470       ST(argvi) = newSVpv(result, 0);
5471       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
5472       sv_2mortal(ST(argvi));
5473       argvi++;
5474     }
5475 
5476     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5477     XSRETURN(argvi);
5478   fail:
5479 
5480     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5481     SWIG_croak_null();
5482   }
5483 }
5484 
5485 
XS(_wrap_SpatialReference_GetAuthorityName)5486 XS(_wrap_SpatialReference_GetAuthorityName) {
5487   {
5488     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5489     char *arg2 = (char *) 0 ;
5490     void *argp1 = 0 ;
5491     int res1 = 0 ;
5492     int res2 ;
5493     char *buf2 = 0 ;
5494     int alloc2 = 0 ;
5495     int argvi = 0;
5496     char *result = 0 ;
5497     dXSARGS;
5498 
5499     {
5500       /* %typemap(default) const char * target_key */
5501       arg2 = NULL;
5502     }
5503     if ((items < 1) || (items > 2)) {
5504       SWIG_croak("Usage: SpatialReference_GetAuthorityName(self,target_key);");
5505     }
5506     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5507     if (!SWIG_IsOK(res1)) {
5508       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5509     }
5510     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5511     if (items > 1) {
5512       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
5513       if (!SWIG_IsOK(res2)) {
5514         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
5515       }
5516       arg2 = reinterpret_cast< char * >(buf2);
5517     }
5518     {
5519       CPLErrorReset();
5520       result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
5521       CPLErr eclass = CPLGetLastErrorType();
5522       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5523         do_confess( CPLGetLastErrorMsg(), 0 );
5524 
5525 
5526 
5527 
5528 
5529       }
5530 
5531 
5532       /*
5533           Make warnings regular Perl warnings. This duplicates the warning
5534           message if DontUseExceptions() is in effect (it is not by default).
5535           */
5536       if ( eclass == CE_Warning ) {
5537         warn( CPLGetLastErrorMsg(), "%s" );
5538       }
5539 
5540 
5541     }
5542     {
5543       /* %typemap(out) const char * */
5544       ST(argvi) = newSVpv(result, 0);
5545       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
5546       sv_2mortal(ST(argvi));
5547       argvi++;
5548     }
5549 
5550     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5551     XSRETURN(argvi);
5552   fail:
5553 
5554     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5555     SWIG_croak_null();
5556   }
5557 }
5558 
5559 
XS(_wrap_SpatialReference_GetAreaOfUse)5560 XS(_wrap_SpatialReference_GetAreaOfUse) {
5561   {
5562     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5563     void *argp1 = 0 ;
5564     int res1 = 0 ;
5565     int argvi = 0;
5566     OSRAreaOfUse *result = 0 ;
5567     dXSARGS;
5568 
5569     if ((items < 1) || (items > 1)) {
5570       SWIG_croak("Usage: SpatialReference_GetAreaOfUse(self);");
5571     }
5572     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5573     if (!SWIG_IsOK(res1)) {
5574       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAreaOfUse" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5575     }
5576     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5577     {
5578       CPLErrorReset();
5579       result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
5580       CPLErr eclass = CPLGetLastErrorType();
5581       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5582         do_confess( CPLGetLastErrorMsg(), 0 );
5583 
5584 
5585 
5586 
5587 
5588       }
5589 
5590 
5591       /*
5592           Make warnings regular Perl warnings. This duplicates the warning
5593           message if DontUseExceptions() is in effect (it is not by default).
5594           */
5595       if ( eclass == CE_Warning ) {
5596         warn( CPLGetLastErrorMsg(), "%s" );
5597       }
5598 
5599 
5600     }
5601     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
5602 
5603     XSRETURN(argvi);
5604   fail:
5605 
5606     SWIG_croak_null();
5607   }
5608 }
5609 
5610 
XS(_wrap_SpatialReference_GetAxisName)5611 XS(_wrap_SpatialReference_GetAxisName) {
5612   {
5613     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5614     char *arg2 = (char *) 0 ;
5615     int arg3 ;
5616     void *argp1 = 0 ;
5617     int res1 = 0 ;
5618     int res2 ;
5619     char *buf2 = 0 ;
5620     int alloc2 = 0 ;
5621     int val3 ;
5622     int ecode3 = 0 ;
5623     int argvi = 0;
5624     char *result = 0 ;
5625     dXSARGS;
5626 
5627     {
5628       /* %typemap(default) const char * target_key */
5629       arg2 = NULL;
5630     }
5631     if ((items < 1) || (items > 3)) {
5632       SWIG_croak("Usage: SpatialReference_GetAxisName(self,target_key,iAxis);");
5633     }
5634     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5635     if (!SWIG_IsOK(res1)) {
5636       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5637     }
5638     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5639     if (items > 1) {
5640       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
5641       if (!SWIG_IsOK(res2)) {
5642         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisName" "', argument " "2"" of type '" "char const *""'");
5643       }
5644       arg2 = reinterpret_cast< char * >(buf2);
5645     }
5646     if (items > 2) {
5647       ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
5648       if (!SWIG_IsOK(ecode3)) {
5649         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisName" "', argument " "3"" of type '" "int""'");
5650       }
5651       arg3 = static_cast< int >(val3);
5652     }
5653     {
5654       CPLErrorReset();
5655       result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
5656       CPLErr eclass = CPLGetLastErrorType();
5657       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5658         do_confess( CPLGetLastErrorMsg(), 0 );
5659 
5660 
5661 
5662 
5663 
5664       }
5665 
5666 
5667       /*
5668           Make warnings regular Perl warnings. This duplicates the warning
5669           message if DontUseExceptions() is in effect (it is not by default).
5670           */
5671       if ( eclass == CE_Warning ) {
5672         warn( CPLGetLastErrorMsg(), "%s" );
5673       }
5674 
5675 
5676     }
5677     {
5678       /* %typemap(out) const char * */
5679       ST(argvi) = newSVpv(result, 0);
5680       SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
5681       sv_2mortal(ST(argvi));
5682       argvi++;
5683     }
5684 
5685     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5686 
5687     XSRETURN(argvi);
5688   fail:
5689 
5690     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5691 
5692     SWIG_croak_null();
5693   }
5694 }
5695 
5696 
XS(_wrap_SpatialReference_GetAxesCount)5697 XS(_wrap_SpatialReference_GetAxesCount) {
5698   {
5699     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5700     void *argp1 = 0 ;
5701     int res1 = 0 ;
5702     int argvi = 0;
5703     int result;
5704     dXSARGS;
5705 
5706     if ((items < 1) || (items > 1)) {
5707       SWIG_croak("Usage: SpatialReference_GetAxesCount(self);");
5708     }
5709     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5710     if (!SWIG_IsOK(res1)) {
5711       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxesCount" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5712     }
5713     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5714     {
5715       CPLErrorReset();
5716       result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
5717       CPLErr eclass = CPLGetLastErrorType();
5718       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5719         do_confess( CPLGetLastErrorMsg(), 0 );
5720 
5721 
5722 
5723 
5724 
5725       }
5726 
5727 
5728       /*
5729           Make warnings regular Perl warnings. This duplicates the warning
5730           message if DontUseExceptions() is in effect (it is not by default).
5731           */
5732       if ( eclass == CE_Warning ) {
5733         warn( CPLGetLastErrorMsg(), "%s" );
5734       }
5735 
5736 
5737     }
5738     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
5739 
5740     XSRETURN(argvi);
5741   fail:
5742 
5743     SWIG_croak_null();
5744   }
5745 }
5746 
5747 
XS(_wrap_SpatialReference_GetAxisOrientation)5748 XS(_wrap_SpatialReference_GetAxisOrientation) {
5749   {
5750     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5751     char *arg2 = (char *) 0 ;
5752     int arg3 ;
5753     void *argp1 = 0 ;
5754     int res1 = 0 ;
5755     int res2 ;
5756     char *buf2 = 0 ;
5757     int alloc2 = 0 ;
5758     int val3 ;
5759     int ecode3 = 0 ;
5760     int argvi = 0;
5761     OGRAxisOrientation result;
5762     dXSARGS;
5763 
5764     {
5765       /* %typemap(default) const char * target_key */
5766       arg2 = NULL;
5767     }
5768     if ((items < 1) || (items > 3)) {
5769       SWIG_croak("Usage: SpatialReference_GetAxisOrientation(self,target_key,iAxis);");
5770     }
5771     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5772     if (!SWIG_IsOK(res1)) {
5773       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5774     }
5775     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5776     if (items > 1) {
5777       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
5778       if (!SWIG_IsOK(res2)) {
5779         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "2"" of type '" "char const *""'");
5780       }
5781       arg2 = reinterpret_cast< char * >(buf2);
5782     }
5783     if (items > 2) {
5784       ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
5785       if (!SWIG_IsOK(ecode3)) {
5786         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "3"" of type '" "int""'");
5787       }
5788       arg3 = static_cast< int >(val3);
5789     }
5790     {
5791       CPLErrorReset();
5792       result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
5793       CPLErr eclass = CPLGetLastErrorType();
5794       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5795         do_confess( CPLGetLastErrorMsg(), 0 );
5796 
5797 
5798 
5799 
5800 
5801       }
5802 
5803 
5804       /*
5805           Make warnings regular Perl warnings. This duplicates the warning
5806           message if DontUseExceptions() is in effect (it is not by default).
5807           */
5808       if ( eclass == CE_Warning ) {
5809         warn( CPLGetLastErrorMsg(), "%s" );
5810       }
5811 
5812 
5813     }
5814     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
5815 
5816     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5817 
5818     XSRETURN(argvi);
5819   fail:
5820 
5821     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5822 
5823     SWIG_croak_null();
5824   }
5825 }
5826 
5827 
XS(_wrap_SpatialReference_GetAxisMappingStrategy)5828 XS(_wrap_SpatialReference_GetAxisMappingStrategy) {
5829   {
5830     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5831     void *argp1 = 0 ;
5832     int res1 = 0 ;
5833     int argvi = 0;
5834     OSRAxisMappingStrategy result;
5835     dXSARGS;
5836 
5837     if ((items < 1) || (items > 1)) {
5838       SWIG_croak("Usage: SpatialReference_GetAxisMappingStrategy(self);");
5839     }
5840     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5841     if (!SWIG_IsOK(res1)) {
5842       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5843     }
5844     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5845     {
5846       CPLErrorReset();
5847       result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
5848       CPLErr eclass = CPLGetLastErrorType();
5849       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5850         do_confess( CPLGetLastErrorMsg(), 0 );
5851 
5852 
5853 
5854 
5855 
5856       }
5857 
5858 
5859       /*
5860           Make warnings regular Perl warnings. This duplicates the warning
5861           message if DontUseExceptions() is in effect (it is not by default).
5862           */
5863       if ( eclass == CE_Warning ) {
5864         warn( CPLGetLastErrorMsg(), "%s" );
5865       }
5866 
5867 
5868     }
5869     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
5870 
5871     XSRETURN(argvi);
5872   fail:
5873 
5874     SWIG_croak_null();
5875   }
5876 }
5877 
5878 
XS(_wrap_SpatialReference_SetAxisMappingStrategy)5879 XS(_wrap_SpatialReference_SetAxisMappingStrategy) {
5880   {
5881     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5882     OSRAxisMappingStrategy arg2 ;
5883     void *argp1 = 0 ;
5884     int res1 = 0 ;
5885     int val2 ;
5886     int ecode2 = 0 ;
5887     int argvi = 0;
5888     dXSARGS;
5889 
5890     if ((items < 2) || (items > 2)) {
5891       SWIG_croak("Usage: SpatialReference_SetAxisMappingStrategy(self,strategy);");
5892     }
5893     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5894     if (!SWIG_IsOK(res1)) {
5895       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5896     }
5897     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5898     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
5899     if (!SWIG_IsOK(ecode2)) {
5900       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "2"" of type '" "OSRAxisMappingStrategy""'");
5901     }
5902     arg2 = static_cast< OSRAxisMappingStrategy >(val2);
5903     {
5904       CPLErrorReset();
5905       OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
5906       CPLErr eclass = CPLGetLastErrorType();
5907       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5908         do_confess( CPLGetLastErrorMsg(), 0 );
5909 
5910 
5911 
5912 
5913 
5914       }
5915 
5916 
5917       /*
5918           Make warnings regular Perl warnings. This duplicates the warning
5919           message if DontUseExceptions() is in effect (it is not by default).
5920           */
5921       if ( eclass == CE_Warning ) {
5922         warn( CPLGetLastErrorMsg(), "%s" );
5923       }
5924 
5925 
5926     }
5927     {
5928       /* %typemap(out) void */
5929     }
5930 
5931 
5932     XSRETURN(argvi);
5933   fail:
5934 
5935 
5936     SWIG_croak_null();
5937   }
5938 }
5939 
5940 
XS(_wrap_SpatialReference_GetDataAxisToSRSAxisMapping)5941 XS(_wrap_SpatialReference_GetDataAxisToSRSAxisMapping) {
5942   {
5943     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5944     int *arg2 = (int *) 0 ;
5945     int **arg3 = (int **) 0 ;
5946     void *argp1 = 0 ;
5947     int res1 = 0 ;
5948     int nLen2 ;
5949     int *pList2 ;
5950     int argvi = 0;
5951     dXSARGS;
5952 
5953     {
5954       /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) */
5955       arg2 = &nLen2;
5956       arg3 = &pList2;
5957     }
5958     if ((items < 1) || (items > 1)) {
5959       SWIG_croak("Usage: SpatialReference_GetDataAxisToSRSAxisMapping(self,pList);");
5960     }
5961     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
5962     if (!SWIG_IsOK(res1)) {
5963       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5964     }
5965     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5966     {
5967       CPLErrorReset();
5968       OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
5969       CPLErr eclass = CPLGetLastErrorType();
5970       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5971         do_confess( CPLGetLastErrorMsg(), 0 );
5972 
5973 
5974 
5975 
5976 
5977       }
5978 
5979 
5980       /*
5981           Make warnings regular Perl warnings. This duplicates the warning
5982           message if DontUseExceptions() is in effect (it is not by default).
5983           */
5984       if ( eclass == CE_Warning ) {
5985         warn( CPLGetLastErrorMsg(), "%s" );
5986       }
5987 
5988 
5989     }
5990     {
5991       /* %typemap(out) void */
5992     }
5993     {
5994       /* %typemap(argout) (int *nLen, const int **pList) */
5995       ST(argvi) = CreateArrayFromIntArray( *(arg3), *(arg2) );
5996       argvi++;
5997     }
5998 
5999     XSRETURN(argvi);
6000   fail:
6001 
6002     SWIG_croak_null();
6003   }
6004 }
6005 
6006 
XS(_wrap_SpatialReference_SetDataAxisToSRSAxisMapping)6007 XS(_wrap_SpatialReference_SetDataAxisToSRSAxisMapping) {
6008   {
6009     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6010     int arg2 ;
6011     int *arg3 = (int *) 0 ;
6012     void *argp1 = 0 ;
6013     int res1 = 0 ;
6014     int argvi = 0;
6015     OGRErr result;
6016     dXSARGS;
6017 
6018     if ((items < 2) || (items > 2)) {
6019       SWIG_croak("Usage: SpatialReference_SetDataAxisToSRSAxisMapping(self,nList,pList);");
6020     }
6021     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6022     if (!SWIG_IsOK(res1)) {
6023       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6024     }
6025     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6026     {
6027       /* %typemap(in,numinputs=1) (int nList, int* pList) */
6028       if (!(SvROK(ST(1)) && (SvTYPE(SvRV(ST(1)))==SVt_PVAV)))
6029       do_confess(NEED_ARRAY_REF, 1);
6030       AV *av = (AV*)(SvRV(ST(1)));
6031       arg2 = av_len(av)+1;
6032       arg3 = (int*)CPLMalloc(arg2*sizeof(int));
6033       if (arg3) {
6034         for( int i = 0; i<arg2; i++ ) {
6035           SV **sv = av_fetch(av, i, 0);
6036           arg3[i] =  SvIV(*sv);
6037         }
6038       } else
6039       SWIG_fail;
6040     }
6041     {
6042       CPLErrorReset();
6043       result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
6044       CPLErr eclass = CPLGetLastErrorType();
6045       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6046         do_confess( CPLGetLastErrorMsg(), 0 );
6047 
6048 
6049 
6050 
6051 
6052       }
6053 
6054 
6055       /*
6056           Make warnings regular Perl warnings. This duplicates the warning
6057           message if DontUseExceptions() is in effect (it is not by default).
6058           */
6059       if ( eclass == CE_Warning ) {
6060         warn( CPLGetLastErrorMsg(), "%s" );
6061       }
6062 
6063 
6064     }
6065     {
6066       /* %typemap(out) OGRErr */
6067       if ( result != 0 ) {
6068         const char *err = CPLGetLastErrorMsg();
6069         if (err and *err) do_confess(err, 0); /* this is usually better */
6070         do_confess( OGRErrMessages(result), 1 );
6071       }
6072     }
6073 
6074     {
6075       /* %typemap(freearg) (int nList, int* pList) */
6076       CPLFree((void*) arg3);
6077     }
6078     XSRETURN(argvi);
6079   fail:
6080 
6081     {
6082       /* %typemap(freearg) (int nList, int* pList) */
6083       CPLFree((void*) arg3);
6084     }
6085     SWIG_croak_null();
6086   }
6087 }
6088 
6089 
XS(_wrap_SpatialReference_SetUTM)6090 XS(_wrap_SpatialReference_SetUTM) {
6091   {
6092     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6093     int arg2 ;
6094     int arg3 = (int) 1 ;
6095     void *argp1 = 0 ;
6096     int res1 = 0 ;
6097     int val2 ;
6098     int ecode2 = 0 ;
6099     int val3 ;
6100     int ecode3 = 0 ;
6101     int argvi = 0;
6102     OGRErr result;
6103     dXSARGS;
6104 
6105     if ((items < 2) || (items > 3)) {
6106       SWIG_croak("Usage: SpatialReference_SetUTM(self,zone,north);");
6107     }
6108     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6109     if (!SWIG_IsOK(res1)) {
6110       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6111     }
6112     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6113     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
6114     if (!SWIG_IsOK(ecode2)) {
6115       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
6116     }
6117     arg2 = static_cast< int >(val2);
6118     if (items > 2) {
6119       ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6120       if (!SWIG_IsOK(ecode3)) {
6121         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
6122       }
6123       arg3 = static_cast< int >(val3);
6124     }
6125     {
6126       CPLErrorReset();
6127       result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
6128       CPLErr eclass = CPLGetLastErrorType();
6129       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6130         do_confess( CPLGetLastErrorMsg(), 0 );
6131 
6132 
6133 
6134 
6135 
6136       }
6137 
6138 
6139       /*
6140           Make warnings regular Perl warnings. This duplicates the warning
6141           message if DontUseExceptions() is in effect (it is not by default).
6142           */
6143       if ( eclass == CE_Warning ) {
6144         warn( CPLGetLastErrorMsg(), "%s" );
6145       }
6146 
6147 
6148     }
6149     {
6150       /* %typemap(out) OGRErr */
6151       if ( result != 0 ) {
6152         const char *err = CPLGetLastErrorMsg();
6153         if (err and *err) do_confess(err, 0); /* this is usually better */
6154         do_confess( OGRErrMessages(result), 1 );
6155       }
6156     }
6157 
6158 
6159 
6160     XSRETURN(argvi);
6161   fail:
6162 
6163 
6164 
6165     SWIG_croak_null();
6166   }
6167 }
6168 
6169 
XS(_wrap_SpatialReference__GetUTMZone)6170 XS(_wrap_SpatialReference__GetUTMZone) {
6171   {
6172     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6173     void *argp1 = 0 ;
6174     int res1 = 0 ;
6175     int argvi = 0;
6176     int result;
6177     dXSARGS;
6178 
6179     if ((items < 1) || (items > 1)) {
6180       SWIG_croak("Usage: SpatialReference__GetUTMZone(self);");
6181     }
6182     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6183     if (!SWIG_IsOK(res1)) {
6184       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference__GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6185     }
6186     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6187     {
6188       CPLErrorReset();
6189       result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
6190       CPLErr eclass = CPLGetLastErrorType();
6191       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6192         do_confess( CPLGetLastErrorMsg(), 0 );
6193 
6194 
6195 
6196 
6197 
6198       }
6199 
6200 
6201       /*
6202           Make warnings regular Perl warnings. This duplicates the warning
6203           message if DontUseExceptions() is in effect (it is not by default).
6204           */
6205       if ( eclass == CE_Warning ) {
6206         warn( CPLGetLastErrorMsg(), "%s" );
6207       }
6208 
6209 
6210     }
6211     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
6212 
6213     XSRETURN(argvi);
6214   fail:
6215 
6216     SWIG_croak_null();
6217   }
6218 }
6219 
6220 
XS(_wrap_SpatialReference_SetStatePlane)6221 XS(_wrap_SpatialReference_SetStatePlane) {
6222   {
6223     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6224     int arg2 ;
6225     int arg3 = (int) 1 ;
6226     char *arg4 = (char *) "" ;
6227     double arg5 = (double) 0.0 ;
6228     void *argp1 = 0 ;
6229     int res1 = 0 ;
6230     int val2 ;
6231     int ecode2 = 0 ;
6232     int val3 ;
6233     int ecode3 = 0 ;
6234     int res4 ;
6235     char *buf4 = 0 ;
6236     int alloc4 = 0 ;
6237     double val5 ;
6238     int ecode5 = 0 ;
6239     int argvi = 0;
6240     OGRErr result;
6241     dXSARGS;
6242 
6243     if ((items < 2) || (items > 5)) {
6244       SWIG_croak("Usage: SpatialReference_SetStatePlane(self,zone,is_nad83,unitsname,units);");
6245     }
6246     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6247     if (!SWIG_IsOK(res1)) {
6248       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6249     }
6250     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6251     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
6252     if (!SWIG_IsOK(ecode2)) {
6253       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
6254     }
6255     arg2 = static_cast< int >(val2);
6256     if (items > 2) {
6257       ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6258       if (!SWIG_IsOK(ecode3)) {
6259         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
6260       }
6261       arg3 = static_cast< int >(val3);
6262     }
6263     if (items > 3) {
6264       res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
6265       if (!SWIG_IsOK(res4)) {
6266         SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
6267       }
6268       arg4 = reinterpret_cast< char * >(buf4);
6269     }
6270     if (items > 4) {
6271       ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
6272       if (!SWIG_IsOK(ecode5)) {
6273         SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
6274       }
6275       arg5 = static_cast< double >(val5);
6276     }
6277     {
6278       CPLErrorReset();
6279       result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
6280       CPLErr eclass = CPLGetLastErrorType();
6281       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6282         do_confess( CPLGetLastErrorMsg(), 0 );
6283 
6284 
6285 
6286 
6287 
6288       }
6289 
6290 
6291       /*
6292           Make warnings regular Perl warnings. This duplicates the warning
6293           message if DontUseExceptions() is in effect (it is not by default).
6294           */
6295       if ( eclass == CE_Warning ) {
6296         warn( CPLGetLastErrorMsg(), "%s" );
6297       }
6298 
6299 
6300     }
6301     {
6302       /* %typemap(out) OGRErr */
6303       if ( result != 0 ) {
6304         const char *err = CPLGetLastErrorMsg();
6305         if (err and *err) do_confess(err, 0); /* this is usually better */
6306         do_confess( OGRErrMessages(result), 1 );
6307       }
6308     }
6309 
6310 
6311 
6312     if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
6313 
6314     XSRETURN(argvi);
6315   fail:
6316 
6317 
6318 
6319     if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
6320 
6321     SWIG_croak_null();
6322   }
6323 }
6324 
6325 
XS(_wrap_SpatialReference_AutoIdentifyEPSG)6326 XS(_wrap_SpatialReference_AutoIdentifyEPSG) {
6327   {
6328     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6329     void *argp1 = 0 ;
6330     int res1 = 0 ;
6331     int argvi = 0;
6332     OGRErr result;
6333     dXSARGS;
6334 
6335     if ((items < 1) || (items > 1)) {
6336       SWIG_croak("Usage: SpatialReference_AutoIdentifyEPSG(self);");
6337     }
6338     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6339     if (!SWIG_IsOK(res1)) {
6340       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6341     }
6342     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6343     {
6344       CPLErrorReset();
6345       result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
6346       CPLErr eclass = CPLGetLastErrorType();
6347       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6348         do_confess( CPLGetLastErrorMsg(), 0 );
6349 
6350 
6351 
6352 
6353 
6354       }
6355 
6356 
6357       /*
6358           Make warnings regular Perl warnings. This duplicates the warning
6359           message if DontUseExceptions() is in effect (it is not by default).
6360           */
6361       if ( eclass == CE_Warning ) {
6362         warn( CPLGetLastErrorMsg(), "%s" );
6363       }
6364 
6365 
6366     }
6367     {
6368       /* %typemap(out) OGRErr */
6369       if ( result != 0 ) {
6370         const char *err = CPLGetLastErrorMsg();
6371         if (err and *err) do_confess(err, 0); /* this is usually better */
6372         do_confess( OGRErrMessages(result), 1 );
6373       }
6374     }
6375 
6376     XSRETURN(argvi);
6377   fail:
6378 
6379     SWIG_croak_null();
6380   }
6381 }
6382 
6383 
XS(_wrap_SpatialReference_SetProjection)6384 XS(_wrap_SpatialReference_SetProjection) {
6385   {
6386     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6387     char *arg2 = (char *) 0 ;
6388     void *argp1 = 0 ;
6389     int res1 = 0 ;
6390     int res2 ;
6391     char *buf2 = 0 ;
6392     int alloc2 = 0 ;
6393     int argvi = 0;
6394     OGRErr result;
6395     dXSARGS;
6396 
6397     if ((items < 2) || (items > 2)) {
6398       SWIG_croak("Usage: SpatialReference_SetProjection(self,arg);");
6399     }
6400     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6401     if (!SWIG_IsOK(res1)) {
6402       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6403     }
6404     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6405     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
6406     if (!SWIG_IsOK(res2)) {
6407       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
6408     }
6409     arg2 = reinterpret_cast< char * >(buf2);
6410     {
6411       CPLErrorReset();
6412       result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
6413       CPLErr eclass = CPLGetLastErrorType();
6414       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6415         do_confess( CPLGetLastErrorMsg(), 0 );
6416 
6417 
6418 
6419 
6420 
6421       }
6422 
6423 
6424       /*
6425           Make warnings regular Perl warnings. This duplicates the warning
6426           message if DontUseExceptions() is in effect (it is not by default).
6427           */
6428       if ( eclass == CE_Warning ) {
6429         warn( CPLGetLastErrorMsg(), "%s" );
6430       }
6431 
6432 
6433     }
6434     {
6435       /* %typemap(out) OGRErr */
6436       if ( result != 0 ) {
6437         const char *err = CPLGetLastErrorMsg();
6438         if (err and *err) do_confess(err, 0); /* this is usually better */
6439         do_confess( OGRErrMessages(result), 1 );
6440       }
6441     }
6442 
6443     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6444     XSRETURN(argvi);
6445   fail:
6446 
6447     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6448     SWIG_croak_null();
6449   }
6450 }
6451 
6452 
XS(_wrap_SpatialReference_SetProjParm)6453 XS(_wrap_SpatialReference_SetProjParm) {
6454   {
6455     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6456     char *arg2 = (char *) 0 ;
6457     double arg3 ;
6458     void *argp1 = 0 ;
6459     int res1 = 0 ;
6460     U8 *tmpbuf2 = NULL ;
6461     double val3 ;
6462     int ecode3 = 0 ;
6463     int argvi = 0;
6464     OGRErr result;
6465     dXSARGS;
6466 
6467     if ((items < 3) || (items > 3)) {
6468       SWIG_croak("Usage: SpatialReference_SetProjParm(self,name,val);");
6469     }
6470     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6471     if (!SWIG_IsOK(res1)) {
6472       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6473     }
6474     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6475     {
6476       /* %typemap(in,numinputs=1) (const char* name) */
6477       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
6478     }
6479     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6480     if (!SWIG_IsOK(ecode3)) {
6481       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
6482     }
6483     arg3 = static_cast< double >(val3);
6484     {
6485       if (!arg2) {
6486         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6487       }
6488     }
6489     {
6490       CPLErrorReset();
6491       result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
6492       CPLErr eclass = CPLGetLastErrorType();
6493       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6494         do_confess( CPLGetLastErrorMsg(), 0 );
6495 
6496 
6497 
6498 
6499 
6500       }
6501 
6502 
6503       /*
6504           Make warnings regular Perl warnings. This duplicates the warning
6505           message if DontUseExceptions() is in effect (it is not by default).
6506           */
6507       if ( eclass == CE_Warning ) {
6508         warn( CPLGetLastErrorMsg(), "%s" );
6509       }
6510 
6511 
6512     }
6513     {
6514       /* %typemap(out) OGRErr */
6515       if ( result != 0 ) {
6516         const char *err = CPLGetLastErrorMsg();
6517         if (err and *err) do_confess(err, 0); /* this is usually better */
6518         do_confess( OGRErrMessages(result), 1 );
6519       }
6520     }
6521 
6522     {
6523       /* %typemap(freearg) (const char* name) */
6524       if (tmpbuf2) Safefree(tmpbuf2);
6525     }
6526 
6527     XSRETURN(argvi);
6528   fail:
6529 
6530     {
6531       /* %typemap(freearg) (const char* name) */
6532       if (tmpbuf2) Safefree(tmpbuf2);
6533     }
6534 
6535     SWIG_croak_null();
6536   }
6537 }
6538 
6539 
XS(_wrap_SpatialReference_GetProjParm)6540 XS(_wrap_SpatialReference_GetProjParm) {
6541   {
6542     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6543     char *arg2 = (char *) 0 ;
6544     double arg3 = (double) 0.0 ;
6545     void *argp1 = 0 ;
6546     int res1 = 0 ;
6547     U8 *tmpbuf2 = NULL ;
6548     double val3 ;
6549     int ecode3 = 0 ;
6550     int argvi = 0;
6551     double result;
6552     dXSARGS;
6553 
6554     if ((items < 2) || (items > 3)) {
6555       SWIG_croak("Usage: SpatialReference_GetProjParm(self,name,default_val);");
6556     }
6557     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6558     if (!SWIG_IsOK(res1)) {
6559       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6560     }
6561     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6562     {
6563       /* %typemap(in,numinputs=1) (const char* name) */
6564       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
6565     }
6566     if (items > 2) {
6567       ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6568       if (!SWIG_IsOK(ecode3)) {
6569         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
6570       }
6571       arg3 = static_cast< double >(val3);
6572     }
6573     {
6574       if (!arg2) {
6575         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6576       }
6577     }
6578     {
6579       CPLErrorReset();
6580       result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
6581       CPLErr eclass = CPLGetLastErrorType();
6582       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6583         do_confess( CPLGetLastErrorMsg(), 0 );
6584 
6585 
6586 
6587 
6588 
6589       }
6590 
6591 
6592       /*
6593           Make warnings regular Perl warnings. This duplicates the warning
6594           message if DontUseExceptions() is in effect (it is not by default).
6595           */
6596       if ( eclass == CE_Warning ) {
6597         warn( CPLGetLastErrorMsg(), "%s" );
6598       }
6599 
6600 
6601     }
6602     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
6603 
6604     {
6605       /* %typemap(freearg) (const char* name) */
6606       if (tmpbuf2) Safefree(tmpbuf2);
6607     }
6608 
6609     XSRETURN(argvi);
6610   fail:
6611 
6612     {
6613       /* %typemap(freearg) (const char* name) */
6614       if (tmpbuf2) Safefree(tmpbuf2);
6615     }
6616 
6617     SWIG_croak_null();
6618   }
6619 }
6620 
6621 
XS(_wrap_SpatialReference_SetNormProjParm)6622 XS(_wrap_SpatialReference_SetNormProjParm) {
6623   {
6624     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6625     char *arg2 = (char *) 0 ;
6626     double arg3 ;
6627     void *argp1 = 0 ;
6628     int res1 = 0 ;
6629     U8 *tmpbuf2 = NULL ;
6630     double val3 ;
6631     int ecode3 = 0 ;
6632     int argvi = 0;
6633     OGRErr result;
6634     dXSARGS;
6635 
6636     if ((items < 3) || (items > 3)) {
6637       SWIG_croak("Usage: SpatialReference_SetNormProjParm(self,name,val);");
6638     }
6639     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6640     if (!SWIG_IsOK(res1)) {
6641       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6642     }
6643     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6644     {
6645       /* %typemap(in,numinputs=1) (const char* name) */
6646       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
6647     }
6648     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6649     if (!SWIG_IsOK(ecode3)) {
6650       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
6651     }
6652     arg3 = static_cast< double >(val3);
6653     {
6654       if (!arg2) {
6655         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6656       }
6657     }
6658     {
6659       CPLErrorReset();
6660       result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
6661       CPLErr eclass = CPLGetLastErrorType();
6662       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6663         do_confess( CPLGetLastErrorMsg(), 0 );
6664 
6665 
6666 
6667 
6668 
6669       }
6670 
6671 
6672       /*
6673           Make warnings regular Perl warnings. This duplicates the warning
6674           message if DontUseExceptions() is in effect (it is not by default).
6675           */
6676       if ( eclass == CE_Warning ) {
6677         warn( CPLGetLastErrorMsg(), "%s" );
6678       }
6679 
6680 
6681     }
6682     {
6683       /* %typemap(out) OGRErr */
6684       if ( result != 0 ) {
6685         const char *err = CPLGetLastErrorMsg();
6686         if (err and *err) do_confess(err, 0); /* this is usually better */
6687         do_confess( OGRErrMessages(result), 1 );
6688       }
6689     }
6690 
6691     {
6692       /* %typemap(freearg) (const char* name) */
6693       if (tmpbuf2) Safefree(tmpbuf2);
6694     }
6695 
6696     XSRETURN(argvi);
6697   fail:
6698 
6699     {
6700       /* %typemap(freearg) (const char* name) */
6701       if (tmpbuf2) Safefree(tmpbuf2);
6702     }
6703 
6704     SWIG_croak_null();
6705   }
6706 }
6707 
6708 
XS(_wrap_SpatialReference_GetNormProjParm)6709 XS(_wrap_SpatialReference_GetNormProjParm) {
6710   {
6711     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6712     char *arg2 = (char *) 0 ;
6713     double arg3 = (double) 0.0 ;
6714     void *argp1 = 0 ;
6715     int res1 = 0 ;
6716     U8 *tmpbuf2 = NULL ;
6717     double val3 ;
6718     int ecode3 = 0 ;
6719     int argvi = 0;
6720     double result;
6721     dXSARGS;
6722 
6723     if ((items < 2) || (items > 3)) {
6724       SWIG_croak("Usage: SpatialReference_GetNormProjParm(self,name,default_val);");
6725     }
6726     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6727     if (!SWIG_IsOK(res1)) {
6728       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6729     }
6730     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6731     {
6732       /* %typemap(in,numinputs=1) (const char* name) */
6733       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
6734     }
6735     if (items > 2) {
6736       ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6737       if (!SWIG_IsOK(ecode3)) {
6738         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
6739       }
6740       arg3 = static_cast< double >(val3);
6741     }
6742     {
6743       if (!arg2) {
6744         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6745       }
6746     }
6747     {
6748       CPLErrorReset();
6749       result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
6750       CPLErr eclass = CPLGetLastErrorType();
6751       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6752         do_confess( CPLGetLastErrorMsg(), 0 );
6753 
6754 
6755 
6756 
6757 
6758       }
6759 
6760 
6761       /*
6762           Make warnings regular Perl warnings. This duplicates the warning
6763           message if DontUseExceptions() is in effect (it is not by default).
6764           */
6765       if ( eclass == CE_Warning ) {
6766         warn( CPLGetLastErrorMsg(), "%s" );
6767       }
6768 
6769 
6770     }
6771     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
6772 
6773     {
6774       /* %typemap(freearg) (const char* name) */
6775       if (tmpbuf2) Safefree(tmpbuf2);
6776     }
6777 
6778     XSRETURN(argvi);
6779   fail:
6780 
6781     {
6782       /* %typemap(freearg) (const char* name) */
6783       if (tmpbuf2) Safefree(tmpbuf2);
6784     }
6785 
6786     SWIG_croak_null();
6787   }
6788 }
6789 
6790 
XS(_wrap_SpatialReference_GetSemiMajor)6791 XS(_wrap_SpatialReference_GetSemiMajor) {
6792   {
6793     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6794     void *argp1 = 0 ;
6795     int res1 = 0 ;
6796     int argvi = 0;
6797     double result;
6798     dXSARGS;
6799 
6800     if ((items < 1) || (items > 1)) {
6801       SWIG_croak("Usage: SpatialReference_GetSemiMajor(self);");
6802     }
6803     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6804     if (!SWIG_IsOK(res1)) {
6805       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6806     }
6807     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6808     {
6809       CPLErrorReset();
6810       result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
6811       CPLErr eclass = CPLGetLastErrorType();
6812       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6813         do_confess( CPLGetLastErrorMsg(), 0 );
6814 
6815 
6816 
6817 
6818 
6819       }
6820 
6821 
6822       /*
6823           Make warnings regular Perl warnings. This duplicates the warning
6824           message if DontUseExceptions() is in effect (it is not by default).
6825           */
6826       if ( eclass == CE_Warning ) {
6827         warn( CPLGetLastErrorMsg(), "%s" );
6828       }
6829 
6830 
6831     }
6832     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
6833 
6834     XSRETURN(argvi);
6835   fail:
6836 
6837     SWIG_croak_null();
6838   }
6839 }
6840 
6841 
XS(_wrap_SpatialReference_GetSemiMinor)6842 XS(_wrap_SpatialReference_GetSemiMinor) {
6843   {
6844     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6845     void *argp1 = 0 ;
6846     int res1 = 0 ;
6847     int argvi = 0;
6848     double result;
6849     dXSARGS;
6850 
6851     if ((items < 1) || (items > 1)) {
6852       SWIG_croak("Usage: SpatialReference_GetSemiMinor(self);");
6853     }
6854     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6855     if (!SWIG_IsOK(res1)) {
6856       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6857     }
6858     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6859     {
6860       CPLErrorReset();
6861       result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
6862       CPLErr eclass = CPLGetLastErrorType();
6863       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6864         do_confess( CPLGetLastErrorMsg(), 0 );
6865 
6866 
6867 
6868 
6869 
6870       }
6871 
6872 
6873       /*
6874           Make warnings regular Perl warnings. This duplicates the warning
6875           message if DontUseExceptions() is in effect (it is not by default).
6876           */
6877       if ( eclass == CE_Warning ) {
6878         warn( CPLGetLastErrorMsg(), "%s" );
6879       }
6880 
6881 
6882     }
6883     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
6884 
6885     XSRETURN(argvi);
6886   fail:
6887 
6888     SWIG_croak_null();
6889   }
6890 }
6891 
6892 
XS(_wrap_SpatialReference_GetInvFlattening)6893 XS(_wrap_SpatialReference_GetInvFlattening) {
6894   {
6895     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6896     void *argp1 = 0 ;
6897     int res1 = 0 ;
6898     int argvi = 0;
6899     double result;
6900     dXSARGS;
6901 
6902     if ((items < 1) || (items > 1)) {
6903       SWIG_croak("Usage: SpatialReference_GetInvFlattening(self);");
6904     }
6905     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6906     if (!SWIG_IsOK(res1)) {
6907       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6908     }
6909     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6910     {
6911       CPLErrorReset();
6912       result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
6913       CPLErr eclass = CPLGetLastErrorType();
6914       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6915         do_confess( CPLGetLastErrorMsg(), 0 );
6916 
6917 
6918 
6919 
6920 
6921       }
6922 
6923 
6924       /*
6925           Make warnings regular Perl warnings. This duplicates the warning
6926           message if DontUseExceptions() is in effect (it is not by default).
6927           */
6928       if ( eclass == CE_Warning ) {
6929         warn( CPLGetLastErrorMsg(), "%s" );
6930       }
6931 
6932 
6933     }
6934     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
6935 
6936     XSRETURN(argvi);
6937   fail:
6938 
6939     SWIG_croak_null();
6940   }
6941 }
6942 
6943 
XS(_wrap_SpatialReference_SetACEA)6944 XS(_wrap_SpatialReference_SetACEA) {
6945   {
6946     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6947     double arg2 ;
6948     double arg3 ;
6949     double arg4 ;
6950     double arg5 ;
6951     double arg6 ;
6952     double arg7 ;
6953     void *argp1 = 0 ;
6954     int res1 = 0 ;
6955     double val2 ;
6956     int ecode2 = 0 ;
6957     double val3 ;
6958     int ecode3 = 0 ;
6959     double val4 ;
6960     int ecode4 = 0 ;
6961     double val5 ;
6962     int ecode5 = 0 ;
6963     double val6 ;
6964     int ecode6 = 0 ;
6965     double val7 ;
6966     int ecode7 = 0 ;
6967     int argvi = 0;
6968     OGRErr result;
6969     dXSARGS;
6970 
6971     if ((items < 7) || (items > 7)) {
6972       SWIG_croak("Usage: SpatialReference_SetACEA(self,stdp1,stdp2,clat,clong,fe,fn);");
6973     }
6974     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
6975     if (!SWIG_IsOK(res1)) {
6976       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6977     }
6978     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6979     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
6980     if (!SWIG_IsOK(ecode2)) {
6981       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
6982     }
6983     arg2 = static_cast< double >(val2);
6984     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
6985     if (!SWIG_IsOK(ecode3)) {
6986       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
6987     }
6988     arg3 = static_cast< double >(val3);
6989     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
6990     if (!SWIG_IsOK(ecode4)) {
6991       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
6992     }
6993     arg4 = static_cast< double >(val4);
6994     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
6995     if (!SWIG_IsOK(ecode5)) {
6996       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
6997     }
6998     arg5 = static_cast< double >(val5);
6999     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
7000     if (!SWIG_IsOK(ecode6)) {
7001       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
7002     }
7003     arg6 = static_cast< double >(val6);
7004     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
7005     if (!SWIG_IsOK(ecode7)) {
7006       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
7007     }
7008     arg7 = static_cast< double >(val7);
7009     {
7010       CPLErrorReset();
7011       result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
7012       CPLErr eclass = CPLGetLastErrorType();
7013       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7014         do_confess( CPLGetLastErrorMsg(), 0 );
7015 
7016 
7017 
7018 
7019 
7020       }
7021 
7022 
7023       /*
7024           Make warnings regular Perl warnings. This duplicates the warning
7025           message if DontUseExceptions() is in effect (it is not by default).
7026           */
7027       if ( eclass == CE_Warning ) {
7028         warn( CPLGetLastErrorMsg(), "%s" );
7029       }
7030 
7031 
7032     }
7033     {
7034       /* %typemap(out) OGRErr */
7035       if ( result != 0 ) {
7036         const char *err = CPLGetLastErrorMsg();
7037         if (err and *err) do_confess(err, 0); /* this is usually better */
7038         do_confess( OGRErrMessages(result), 1 );
7039       }
7040     }
7041 
7042 
7043 
7044 
7045 
7046 
7047 
7048     XSRETURN(argvi);
7049   fail:
7050 
7051 
7052 
7053 
7054 
7055 
7056 
7057     SWIG_croak_null();
7058   }
7059 }
7060 
7061 
XS(_wrap_SpatialReference_SetAE)7062 XS(_wrap_SpatialReference_SetAE) {
7063   {
7064     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7065     double arg2 ;
7066     double arg3 ;
7067     double arg4 ;
7068     double arg5 ;
7069     void *argp1 = 0 ;
7070     int res1 = 0 ;
7071     double val2 ;
7072     int ecode2 = 0 ;
7073     double val3 ;
7074     int ecode3 = 0 ;
7075     double val4 ;
7076     int ecode4 = 0 ;
7077     double val5 ;
7078     int ecode5 = 0 ;
7079     int argvi = 0;
7080     OGRErr result;
7081     dXSARGS;
7082 
7083     if ((items < 5) || (items > 5)) {
7084       SWIG_croak("Usage: SpatialReference_SetAE(self,clat,clong,fe,fn);");
7085     }
7086     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7087     if (!SWIG_IsOK(res1)) {
7088       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7089     }
7090     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7091     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7092     if (!SWIG_IsOK(ecode2)) {
7093       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
7094     }
7095     arg2 = static_cast< double >(val2);
7096     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7097     if (!SWIG_IsOK(ecode3)) {
7098       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
7099     }
7100     arg3 = static_cast< double >(val3);
7101     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7102     if (!SWIG_IsOK(ecode4)) {
7103       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
7104     }
7105     arg4 = static_cast< double >(val4);
7106     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7107     if (!SWIG_IsOK(ecode5)) {
7108       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
7109     }
7110     arg5 = static_cast< double >(val5);
7111     {
7112       CPLErrorReset();
7113       result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
7114       CPLErr eclass = CPLGetLastErrorType();
7115       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7116         do_confess( CPLGetLastErrorMsg(), 0 );
7117 
7118 
7119 
7120 
7121 
7122       }
7123 
7124 
7125       /*
7126           Make warnings regular Perl warnings. This duplicates the warning
7127           message if DontUseExceptions() is in effect (it is not by default).
7128           */
7129       if ( eclass == CE_Warning ) {
7130         warn( CPLGetLastErrorMsg(), "%s" );
7131       }
7132 
7133 
7134     }
7135     {
7136       /* %typemap(out) OGRErr */
7137       if ( result != 0 ) {
7138         const char *err = CPLGetLastErrorMsg();
7139         if (err and *err) do_confess(err, 0); /* this is usually better */
7140         do_confess( OGRErrMessages(result), 1 );
7141       }
7142     }
7143 
7144 
7145 
7146 
7147 
7148     XSRETURN(argvi);
7149   fail:
7150 
7151 
7152 
7153 
7154 
7155     SWIG_croak_null();
7156   }
7157 }
7158 
7159 
XS(_wrap_SpatialReference_SetBonne)7160 XS(_wrap_SpatialReference_SetBonne) {
7161   {
7162     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7163     double arg2 ;
7164     double arg3 ;
7165     double arg4 ;
7166     double arg5 ;
7167     void *argp1 = 0 ;
7168     int res1 = 0 ;
7169     double val2 ;
7170     int ecode2 = 0 ;
7171     double val3 ;
7172     int ecode3 = 0 ;
7173     double val4 ;
7174     int ecode4 = 0 ;
7175     double val5 ;
7176     int ecode5 = 0 ;
7177     int argvi = 0;
7178     OGRErr result;
7179     dXSARGS;
7180 
7181     if ((items < 5) || (items > 5)) {
7182       SWIG_croak("Usage: SpatialReference_SetBonne(self,stdp,cm,fe,fn);");
7183     }
7184     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7185     if (!SWIG_IsOK(res1)) {
7186       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7187     }
7188     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7189     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7190     if (!SWIG_IsOK(ecode2)) {
7191       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
7192     }
7193     arg2 = static_cast< double >(val2);
7194     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7195     if (!SWIG_IsOK(ecode3)) {
7196       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
7197     }
7198     arg3 = static_cast< double >(val3);
7199     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7200     if (!SWIG_IsOK(ecode4)) {
7201       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
7202     }
7203     arg4 = static_cast< double >(val4);
7204     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7205     if (!SWIG_IsOK(ecode5)) {
7206       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
7207     }
7208     arg5 = static_cast< double >(val5);
7209     {
7210       CPLErrorReset();
7211       result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
7212       CPLErr eclass = CPLGetLastErrorType();
7213       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7214         do_confess( CPLGetLastErrorMsg(), 0 );
7215 
7216 
7217 
7218 
7219 
7220       }
7221 
7222 
7223       /*
7224           Make warnings regular Perl warnings. This duplicates the warning
7225           message if DontUseExceptions() is in effect (it is not by default).
7226           */
7227       if ( eclass == CE_Warning ) {
7228         warn( CPLGetLastErrorMsg(), "%s" );
7229       }
7230 
7231 
7232     }
7233     {
7234       /* %typemap(out) OGRErr */
7235       if ( result != 0 ) {
7236         const char *err = CPLGetLastErrorMsg();
7237         if (err and *err) do_confess(err, 0); /* this is usually better */
7238         do_confess( OGRErrMessages(result), 1 );
7239       }
7240     }
7241 
7242 
7243 
7244 
7245 
7246     XSRETURN(argvi);
7247   fail:
7248 
7249 
7250 
7251 
7252 
7253     SWIG_croak_null();
7254   }
7255 }
7256 
7257 
XS(_wrap_SpatialReference_SetCEA)7258 XS(_wrap_SpatialReference_SetCEA) {
7259   {
7260     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7261     double arg2 ;
7262     double arg3 ;
7263     double arg4 ;
7264     double arg5 ;
7265     void *argp1 = 0 ;
7266     int res1 = 0 ;
7267     double val2 ;
7268     int ecode2 = 0 ;
7269     double val3 ;
7270     int ecode3 = 0 ;
7271     double val4 ;
7272     int ecode4 = 0 ;
7273     double val5 ;
7274     int ecode5 = 0 ;
7275     int argvi = 0;
7276     OGRErr result;
7277     dXSARGS;
7278 
7279     if ((items < 5) || (items > 5)) {
7280       SWIG_croak("Usage: SpatialReference_SetCEA(self,stdp1,cm,fe,fn);");
7281     }
7282     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7283     if (!SWIG_IsOK(res1)) {
7284       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7285     }
7286     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7287     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7288     if (!SWIG_IsOK(ecode2)) {
7289       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
7290     }
7291     arg2 = static_cast< double >(val2);
7292     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7293     if (!SWIG_IsOK(ecode3)) {
7294       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
7295     }
7296     arg3 = static_cast< double >(val3);
7297     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7298     if (!SWIG_IsOK(ecode4)) {
7299       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
7300     }
7301     arg4 = static_cast< double >(val4);
7302     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7303     if (!SWIG_IsOK(ecode5)) {
7304       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
7305     }
7306     arg5 = static_cast< double >(val5);
7307     {
7308       CPLErrorReset();
7309       result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
7310       CPLErr eclass = CPLGetLastErrorType();
7311       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7312         do_confess( CPLGetLastErrorMsg(), 0 );
7313 
7314 
7315 
7316 
7317 
7318       }
7319 
7320 
7321       /*
7322           Make warnings regular Perl warnings. This duplicates the warning
7323           message if DontUseExceptions() is in effect (it is not by default).
7324           */
7325       if ( eclass == CE_Warning ) {
7326         warn( CPLGetLastErrorMsg(), "%s" );
7327       }
7328 
7329 
7330     }
7331     {
7332       /* %typemap(out) OGRErr */
7333       if ( result != 0 ) {
7334         const char *err = CPLGetLastErrorMsg();
7335         if (err and *err) do_confess(err, 0); /* this is usually better */
7336         do_confess( OGRErrMessages(result), 1 );
7337       }
7338     }
7339 
7340 
7341 
7342 
7343 
7344     XSRETURN(argvi);
7345   fail:
7346 
7347 
7348 
7349 
7350 
7351     SWIG_croak_null();
7352   }
7353 }
7354 
7355 
XS(_wrap_SpatialReference_SetCS)7356 XS(_wrap_SpatialReference_SetCS) {
7357   {
7358     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7359     double arg2 ;
7360     double arg3 ;
7361     double arg4 ;
7362     double arg5 ;
7363     void *argp1 = 0 ;
7364     int res1 = 0 ;
7365     double val2 ;
7366     int ecode2 = 0 ;
7367     double val3 ;
7368     int ecode3 = 0 ;
7369     double val4 ;
7370     int ecode4 = 0 ;
7371     double val5 ;
7372     int ecode5 = 0 ;
7373     int argvi = 0;
7374     OGRErr result;
7375     dXSARGS;
7376 
7377     if ((items < 5) || (items > 5)) {
7378       SWIG_croak("Usage: SpatialReference_SetCS(self,clat,clong,fe,fn);");
7379     }
7380     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7381     if (!SWIG_IsOK(res1)) {
7382       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7383     }
7384     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7385     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7386     if (!SWIG_IsOK(ecode2)) {
7387       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
7388     }
7389     arg2 = static_cast< double >(val2);
7390     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7391     if (!SWIG_IsOK(ecode3)) {
7392       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
7393     }
7394     arg3 = static_cast< double >(val3);
7395     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7396     if (!SWIG_IsOK(ecode4)) {
7397       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
7398     }
7399     arg4 = static_cast< double >(val4);
7400     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7401     if (!SWIG_IsOK(ecode5)) {
7402       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
7403     }
7404     arg5 = static_cast< double >(val5);
7405     {
7406       CPLErrorReset();
7407       result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
7408       CPLErr eclass = CPLGetLastErrorType();
7409       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7410         do_confess( CPLGetLastErrorMsg(), 0 );
7411 
7412 
7413 
7414 
7415 
7416       }
7417 
7418 
7419       /*
7420           Make warnings regular Perl warnings. This duplicates the warning
7421           message if DontUseExceptions() is in effect (it is not by default).
7422           */
7423       if ( eclass == CE_Warning ) {
7424         warn( CPLGetLastErrorMsg(), "%s" );
7425       }
7426 
7427 
7428     }
7429     {
7430       /* %typemap(out) OGRErr */
7431       if ( result != 0 ) {
7432         const char *err = CPLGetLastErrorMsg();
7433         if (err and *err) do_confess(err, 0); /* this is usually better */
7434         do_confess( OGRErrMessages(result), 1 );
7435       }
7436     }
7437 
7438 
7439 
7440 
7441 
7442     XSRETURN(argvi);
7443   fail:
7444 
7445 
7446 
7447 
7448 
7449     SWIG_croak_null();
7450   }
7451 }
7452 
7453 
XS(_wrap_SpatialReference_SetEC)7454 XS(_wrap_SpatialReference_SetEC) {
7455   {
7456     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7457     double arg2 ;
7458     double arg3 ;
7459     double arg4 ;
7460     double arg5 ;
7461     double arg6 ;
7462     double arg7 ;
7463     void *argp1 = 0 ;
7464     int res1 = 0 ;
7465     double val2 ;
7466     int ecode2 = 0 ;
7467     double val3 ;
7468     int ecode3 = 0 ;
7469     double val4 ;
7470     int ecode4 = 0 ;
7471     double val5 ;
7472     int ecode5 = 0 ;
7473     double val6 ;
7474     int ecode6 = 0 ;
7475     double val7 ;
7476     int ecode7 = 0 ;
7477     int argvi = 0;
7478     OGRErr result;
7479     dXSARGS;
7480 
7481     if ((items < 7) || (items > 7)) {
7482       SWIG_croak("Usage: SpatialReference_SetEC(self,stdp1,stdp2,clat,clong,fe,fn);");
7483     }
7484     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7485     if (!SWIG_IsOK(res1)) {
7486       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7487     }
7488     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7489     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7490     if (!SWIG_IsOK(ecode2)) {
7491       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
7492     }
7493     arg2 = static_cast< double >(val2);
7494     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7495     if (!SWIG_IsOK(ecode3)) {
7496       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
7497     }
7498     arg3 = static_cast< double >(val3);
7499     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7500     if (!SWIG_IsOK(ecode4)) {
7501       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
7502     }
7503     arg4 = static_cast< double >(val4);
7504     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7505     if (!SWIG_IsOK(ecode5)) {
7506       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
7507     }
7508     arg5 = static_cast< double >(val5);
7509     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
7510     if (!SWIG_IsOK(ecode6)) {
7511       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
7512     }
7513     arg6 = static_cast< double >(val6);
7514     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
7515     if (!SWIG_IsOK(ecode7)) {
7516       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
7517     }
7518     arg7 = static_cast< double >(val7);
7519     {
7520       CPLErrorReset();
7521       result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
7522       CPLErr eclass = CPLGetLastErrorType();
7523       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7524         do_confess( CPLGetLastErrorMsg(), 0 );
7525 
7526 
7527 
7528 
7529 
7530       }
7531 
7532 
7533       /*
7534           Make warnings regular Perl warnings. This duplicates the warning
7535           message if DontUseExceptions() is in effect (it is not by default).
7536           */
7537       if ( eclass == CE_Warning ) {
7538         warn( CPLGetLastErrorMsg(), "%s" );
7539       }
7540 
7541 
7542     }
7543     {
7544       /* %typemap(out) OGRErr */
7545       if ( result != 0 ) {
7546         const char *err = CPLGetLastErrorMsg();
7547         if (err and *err) do_confess(err, 0); /* this is usually better */
7548         do_confess( OGRErrMessages(result), 1 );
7549       }
7550     }
7551 
7552 
7553 
7554 
7555 
7556 
7557 
7558     XSRETURN(argvi);
7559   fail:
7560 
7561 
7562 
7563 
7564 
7565 
7566 
7567     SWIG_croak_null();
7568   }
7569 }
7570 
7571 
XS(_wrap_SpatialReference_SetEckertIV)7572 XS(_wrap_SpatialReference_SetEckertIV) {
7573   {
7574     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7575     double arg2 ;
7576     double arg3 ;
7577     double arg4 ;
7578     void *argp1 = 0 ;
7579     int res1 = 0 ;
7580     double val2 ;
7581     int ecode2 = 0 ;
7582     double val3 ;
7583     int ecode3 = 0 ;
7584     double val4 ;
7585     int ecode4 = 0 ;
7586     int argvi = 0;
7587     OGRErr result;
7588     dXSARGS;
7589 
7590     if ((items < 4) || (items > 4)) {
7591       SWIG_croak("Usage: SpatialReference_SetEckertIV(self,cm,fe,fn);");
7592     }
7593     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7594     if (!SWIG_IsOK(res1)) {
7595       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7596     }
7597     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7598     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7599     if (!SWIG_IsOK(ecode2)) {
7600       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
7601     }
7602     arg2 = static_cast< double >(val2);
7603     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7604     if (!SWIG_IsOK(ecode3)) {
7605       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
7606     }
7607     arg3 = static_cast< double >(val3);
7608     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7609     if (!SWIG_IsOK(ecode4)) {
7610       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
7611     }
7612     arg4 = static_cast< double >(val4);
7613     {
7614       CPLErrorReset();
7615       result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
7616       CPLErr eclass = CPLGetLastErrorType();
7617       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7618         do_confess( CPLGetLastErrorMsg(), 0 );
7619 
7620 
7621 
7622 
7623 
7624       }
7625 
7626 
7627       /*
7628           Make warnings regular Perl warnings. This duplicates the warning
7629           message if DontUseExceptions() is in effect (it is not by default).
7630           */
7631       if ( eclass == CE_Warning ) {
7632         warn( CPLGetLastErrorMsg(), "%s" );
7633       }
7634 
7635 
7636     }
7637     {
7638       /* %typemap(out) OGRErr */
7639       if ( result != 0 ) {
7640         const char *err = CPLGetLastErrorMsg();
7641         if (err and *err) do_confess(err, 0); /* this is usually better */
7642         do_confess( OGRErrMessages(result), 1 );
7643       }
7644     }
7645 
7646 
7647 
7648 
7649     XSRETURN(argvi);
7650   fail:
7651 
7652 
7653 
7654 
7655     SWIG_croak_null();
7656   }
7657 }
7658 
7659 
XS(_wrap_SpatialReference_SetEckertVI)7660 XS(_wrap_SpatialReference_SetEckertVI) {
7661   {
7662     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7663     double arg2 ;
7664     double arg3 ;
7665     double arg4 ;
7666     void *argp1 = 0 ;
7667     int res1 = 0 ;
7668     double val2 ;
7669     int ecode2 = 0 ;
7670     double val3 ;
7671     int ecode3 = 0 ;
7672     double val4 ;
7673     int ecode4 = 0 ;
7674     int argvi = 0;
7675     OGRErr result;
7676     dXSARGS;
7677 
7678     if ((items < 4) || (items > 4)) {
7679       SWIG_croak("Usage: SpatialReference_SetEckertVI(self,cm,fe,fn);");
7680     }
7681     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7682     if (!SWIG_IsOK(res1)) {
7683       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7684     }
7685     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7686     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7687     if (!SWIG_IsOK(ecode2)) {
7688       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
7689     }
7690     arg2 = static_cast< double >(val2);
7691     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7692     if (!SWIG_IsOK(ecode3)) {
7693       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
7694     }
7695     arg3 = static_cast< double >(val3);
7696     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7697     if (!SWIG_IsOK(ecode4)) {
7698       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
7699     }
7700     arg4 = static_cast< double >(val4);
7701     {
7702       CPLErrorReset();
7703       result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
7704       CPLErr eclass = CPLGetLastErrorType();
7705       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7706         do_confess( CPLGetLastErrorMsg(), 0 );
7707 
7708 
7709 
7710 
7711 
7712       }
7713 
7714 
7715       /*
7716           Make warnings regular Perl warnings. This duplicates the warning
7717           message if DontUseExceptions() is in effect (it is not by default).
7718           */
7719       if ( eclass == CE_Warning ) {
7720         warn( CPLGetLastErrorMsg(), "%s" );
7721       }
7722 
7723 
7724     }
7725     {
7726       /* %typemap(out) OGRErr */
7727       if ( result != 0 ) {
7728         const char *err = CPLGetLastErrorMsg();
7729         if (err and *err) do_confess(err, 0); /* this is usually better */
7730         do_confess( OGRErrMessages(result), 1 );
7731       }
7732     }
7733 
7734 
7735 
7736 
7737     XSRETURN(argvi);
7738   fail:
7739 
7740 
7741 
7742 
7743     SWIG_croak_null();
7744   }
7745 }
7746 
7747 
XS(_wrap_SpatialReference_SetEquirectangular)7748 XS(_wrap_SpatialReference_SetEquirectangular) {
7749   {
7750     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7751     double arg2 ;
7752     double arg3 ;
7753     double arg4 ;
7754     double arg5 ;
7755     void *argp1 = 0 ;
7756     int res1 = 0 ;
7757     double val2 ;
7758     int ecode2 = 0 ;
7759     double val3 ;
7760     int ecode3 = 0 ;
7761     double val4 ;
7762     int ecode4 = 0 ;
7763     double val5 ;
7764     int ecode5 = 0 ;
7765     int argvi = 0;
7766     OGRErr result;
7767     dXSARGS;
7768 
7769     if ((items < 5) || (items > 5)) {
7770       SWIG_croak("Usage: SpatialReference_SetEquirectangular(self,clat,clong,fe,fn);");
7771     }
7772     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7773     if (!SWIG_IsOK(res1)) {
7774       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7775     }
7776     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7777     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7778     if (!SWIG_IsOK(ecode2)) {
7779       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
7780     }
7781     arg2 = static_cast< double >(val2);
7782     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7783     if (!SWIG_IsOK(ecode3)) {
7784       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
7785     }
7786     arg3 = static_cast< double >(val3);
7787     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7788     if (!SWIG_IsOK(ecode4)) {
7789       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
7790     }
7791     arg4 = static_cast< double >(val4);
7792     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7793     if (!SWIG_IsOK(ecode5)) {
7794       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
7795     }
7796     arg5 = static_cast< double >(val5);
7797     {
7798       CPLErrorReset();
7799       result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
7800       CPLErr eclass = CPLGetLastErrorType();
7801       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7802         do_confess( CPLGetLastErrorMsg(), 0 );
7803 
7804 
7805 
7806 
7807 
7808       }
7809 
7810 
7811       /*
7812           Make warnings regular Perl warnings. This duplicates the warning
7813           message if DontUseExceptions() is in effect (it is not by default).
7814           */
7815       if ( eclass == CE_Warning ) {
7816         warn( CPLGetLastErrorMsg(), "%s" );
7817       }
7818 
7819 
7820     }
7821     {
7822       /* %typemap(out) OGRErr */
7823       if ( result != 0 ) {
7824         const char *err = CPLGetLastErrorMsg();
7825         if (err and *err) do_confess(err, 0); /* this is usually better */
7826         do_confess( OGRErrMessages(result), 1 );
7827       }
7828     }
7829 
7830 
7831 
7832 
7833 
7834     XSRETURN(argvi);
7835   fail:
7836 
7837 
7838 
7839 
7840 
7841     SWIG_croak_null();
7842   }
7843 }
7844 
7845 
XS(_wrap_SpatialReference_SetEquirectangular2)7846 XS(_wrap_SpatialReference_SetEquirectangular2) {
7847   {
7848     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7849     double arg2 ;
7850     double arg3 ;
7851     double arg4 ;
7852     double arg5 ;
7853     double arg6 ;
7854     void *argp1 = 0 ;
7855     int res1 = 0 ;
7856     double val2 ;
7857     int ecode2 = 0 ;
7858     double val3 ;
7859     int ecode3 = 0 ;
7860     double val4 ;
7861     int ecode4 = 0 ;
7862     double val5 ;
7863     int ecode5 = 0 ;
7864     double val6 ;
7865     int ecode6 = 0 ;
7866     int argvi = 0;
7867     OGRErr result;
7868     dXSARGS;
7869 
7870     if ((items < 6) || (items > 6)) {
7871       SWIG_croak("Usage: SpatialReference_SetEquirectangular2(self,clat,clong,pseudostdparallellat,fe,fn);");
7872     }
7873     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7874     if (!SWIG_IsOK(res1)) {
7875       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7876     }
7877     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7878     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7879     if (!SWIG_IsOK(ecode2)) {
7880       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
7881     }
7882     arg2 = static_cast< double >(val2);
7883     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7884     if (!SWIG_IsOK(ecode3)) {
7885       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
7886     }
7887     arg3 = static_cast< double >(val3);
7888     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7889     if (!SWIG_IsOK(ecode4)) {
7890       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
7891     }
7892     arg4 = static_cast< double >(val4);
7893     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
7894     if (!SWIG_IsOK(ecode5)) {
7895       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
7896     }
7897     arg5 = static_cast< double >(val5);
7898     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
7899     if (!SWIG_IsOK(ecode6)) {
7900       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
7901     }
7902     arg6 = static_cast< double >(val6);
7903     {
7904       CPLErrorReset();
7905       result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
7906       CPLErr eclass = CPLGetLastErrorType();
7907       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7908         do_confess( CPLGetLastErrorMsg(), 0 );
7909 
7910 
7911 
7912 
7913 
7914       }
7915 
7916 
7917       /*
7918           Make warnings regular Perl warnings. This duplicates the warning
7919           message if DontUseExceptions() is in effect (it is not by default).
7920           */
7921       if ( eclass == CE_Warning ) {
7922         warn( CPLGetLastErrorMsg(), "%s" );
7923       }
7924 
7925 
7926     }
7927     {
7928       /* %typemap(out) OGRErr */
7929       if ( result != 0 ) {
7930         const char *err = CPLGetLastErrorMsg();
7931         if (err and *err) do_confess(err, 0); /* this is usually better */
7932         do_confess( OGRErrMessages(result), 1 );
7933       }
7934     }
7935 
7936 
7937 
7938 
7939 
7940 
7941     XSRETURN(argvi);
7942   fail:
7943 
7944 
7945 
7946 
7947 
7948 
7949     SWIG_croak_null();
7950   }
7951 }
7952 
7953 
XS(_wrap_SpatialReference_SetGaussSchreiberTMercator)7954 XS(_wrap_SpatialReference_SetGaussSchreiberTMercator) {
7955   {
7956     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7957     double arg2 ;
7958     double arg3 ;
7959     double arg4 ;
7960     double arg5 ;
7961     double arg6 ;
7962     void *argp1 = 0 ;
7963     int res1 = 0 ;
7964     double val2 ;
7965     int ecode2 = 0 ;
7966     double val3 ;
7967     int ecode3 = 0 ;
7968     double val4 ;
7969     int ecode4 = 0 ;
7970     double val5 ;
7971     int ecode5 = 0 ;
7972     double val6 ;
7973     int ecode6 = 0 ;
7974     int argvi = 0;
7975     OGRErr result;
7976     dXSARGS;
7977 
7978     if ((items < 6) || (items > 6)) {
7979       SWIG_croak("Usage: SpatialReference_SetGaussSchreiberTMercator(self,clat,clong,sc,fe,fn);");
7980     }
7981     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
7982     if (!SWIG_IsOK(res1)) {
7983       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7984     }
7985     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7986     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
7987     if (!SWIG_IsOK(ecode2)) {
7988       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
7989     }
7990     arg2 = static_cast< double >(val2);
7991     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
7992     if (!SWIG_IsOK(ecode3)) {
7993       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
7994     }
7995     arg3 = static_cast< double >(val3);
7996     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
7997     if (!SWIG_IsOK(ecode4)) {
7998       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
7999     }
8000     arg4 = static_cast< double >(val4);
8001     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8002     if (!SWIG_IsOK(ecode5)) {
8003       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
8004     }
8005     arg5 = static_cast< double >(val5);
8006     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
8007     if (!SWIG_IsOK(ecode6)) {
8008       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
8009     }
8010     arg6 = static_cast< double >(val6);
8011     {
8012       CPLErrorReset();
8013       result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
8014       CPLErr eclass = CPLGetLastErrorType();
8015       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8016         do_confess( CPLGetLastErrorMsg(), 0 );
8017 
8018 
8019 
8020 
8021 
8022       }
8023 
8024 
8025       /*
8026           Make warnings regular Perl warnings. This duplicates the warning
8027           message if DontUseExceptions() is in effect (it is not by default).
8028           */
8029       if ( eclass == CE_Warning ) {
8030         warn( CPLGetLastErrorMsg(), "%s" );
8031       }
8032 
8033 
8034     }
8035     {
8036       /* %typemap(out) OGRErr */
8037       if ( result != 0 ) {
8038         const char *err = CPLGetLastErrorMsg();
8039         if (err and *err) do_confess(err, 0); /* this is usually better */
8040         do_confess( OGRErrMessages(result), 1 );
8041       }
8042     }
8043 
8044 
8045 
8046 
8047 
8048 
8049     XSRETURN(argvi);
8050   fail:
8051 
8052 
8053 
8054 
8055 
8056 
8057     SWIG_croak_null();
8058   }
8059 }
8060 
8061 
XS(_wrap_SpatialReference_SetGS)8062 XS(_wrap_SpatialReference_SetGS) {
8063   {
8064     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8065     double arg2 ;
8066     double arg3 ;
8067     double arg4 ;
8068     void *argp1 = 0 ;
8069     int res1 = 0 ;
8070     double val2 ;
8071     int ecode2 = 0 ;
8072     double val3 ;
8073     int ecode3 = 0 ;
8074     double val4 ;
8075     int ecode4 = 0 ;
8076     int argvi = 0;
8077     OGRErr result;
8078     dXSARGS;
8079 
8080     if ((items < 4) || (items > 4)) {
8081       SWIG_croak("Usage: SpatialReference_SetGS(self,cm,fe,fn);");
8082     }
8083     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8084     if (!SWIG_IsOK(res1)) {
8085       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8086     }
8087     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8088     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8089     if (!SWIG_IsOK(ecode2)) {
8090       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
8091     }
8092     arg2 = static_cast< double >(val2);
8093     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8094     if (!SWIG_IsOK(ecode3)) {
8095       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
8096     }
8097     arg3 = static_cast< double >(val3);
8098     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8099     if (!SWIG_IsOK(ecode4)) {
8100       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
8101     }
8102     arg4 = static_cast< double >(val4);
8103     {
8104       CPLErrorReset();
8105       result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
8106       CPLErr eclass = CPLGetLastErrorType();
8107       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8108         do_confess( CPLGetLastErrorMsg(), 0 );
8109 
8110 
8111 
8112 
8113 
8114       }
8115 
8116 
8117       /*
8118           Make warnings regular Perl warnings. This duplicates the warning
8119           message if DontUseExceptions() is in effect (it is not by default).
8120           */
8121       if ( eclass == CE_Warning ) {
8122         warn( CPLGetLastErrorMsg(), "%s" );
8123       }
8124 
8125 
8126     }
8127     {
8128       /* %typemap(out) OGRErr */
8129       if ( result != 0 ) {
8130         const char *err = CPLGetLastErrorMsg();
8131         if (err and *err) do_confess(err, 0); /* this is usually better */
8132         do_confess( OGRErrMessages(result), 1 );
8133       }
8134     }
8135 
8136 
8137 
8138 
8139     XSRETURN(argvi);
8140   fail:
8141 
8142 
8143 
8144 
8145     SWIG_croak_null();
8146   }
8147 }
8148 
8149 
XS(_wrap_SpatialReference_SetGH)8150 XS(_wrap_SpatialReference_SetGH) {
8151   {
8152     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8153     double arg2 ;
8154     double arg3 ;
8155     double arg4 ;
8156     void *argp1 = 0 ;
8157     int res1 = 0 ;
8158     double val2 ;
8159     int ecode2 = 0 ;
8160     double val3 ;
8161     int ecode3 = 0 ;
8162     double val4 ;
8163     int ecode4 = 0 ;
8164     int argvi = 0;
8165     OGRErr result;
8166     dXSARGS;
8167 
8168     if ((items < 4) || (items > 4)) {
8169       SWIG_croak("Usage: SpatialReference_SetGH(self,cm,fe,fn);");
8170     }
8171     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8172     if (!SWIG_IsOK(res1)) {
8173       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8174     }
8175     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8176     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8177     if (!SWIG_IsOK(ecode2)) {
8178       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
8179     }
8180     arg2 = static_cast< double >(val2);
8181     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8182     if (!SWIG_IsOK(ecode3)) {
8183       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
8184     }
8185     arg3 = static_cast< double >(val3);
8186     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8187     if (!SWIG_IsOK(ecode4)) {
8188       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
8189     }
8190     arg4 = static_cast< double >(val4);
8191     {
8192       CPLErrorReset();
8193       result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
8194       CPLErr eclass = CPLGetLastErrorType();
8195       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8196         do_confess( CPLGetLastErrorMsg(), 0 );
8197 
8198 
8199 
8200 
8201 
8202       }
8203 
8204 
8205       /*
8206           Make warnings regular Perl warnings. This duplicates the warning
8207           message if DontUseExceptions() is in effect (it is not by default).
8208           */
8209       if ( eclass == CE_Warning ) {
8210         warn( CPLGetLastErrorMsg(), "%s" );
8211       }
8212 
8213 
8214     }
8215     {
8216       /* %typemap(out) OGRErr */
8217       if ( result != 0 ) {
8218         const char *err = CPLGetLastErrorMsg();
8219         if (err and *err) do_confess(err, 0); /* this is usually better */
8220         do_confess( OGRErrMessages(result), 1 );
8221       }
8222     }
8223 
8224 
8225 
8226 
8227     XSRETURN(argvi);
8228   fail:
8229 
8230 
8231 
8232 
8233     SWIG_croak_null();
8234   }
8235 }
8236 
8237 
XS(_wrap_SpatialReference_SetIGH)8238 XS(_wrap_SpatialReference_SetIGH) {
8239   {
8240     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8241     void *argp1 = 0 ;
8242     int res1 = 0 ;
8243     int argvi = 0;
8244     OGRErr result;
8245     dXSARGS;
8246 
8247     if ((items < 1) || (items > 1)) {
8248       SWIG_croak("Usage: SpatialReference_SetIGH(self);");
8249     }
8250     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8251     if (!SWIG_IsOK(res1)) {
8252       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8253     }
8254     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8255     {
8256       CPLErrorReset();
8257       result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
8258       CPLErr eclass = CPLGetLastErrorType();
8259       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8260         do_confess( CPLGetLastErrorMsg(), 0 );
8261 
8262 
8263 
8264 
8265 
8266       }
8267 
8268 
8269       /*
8270           Make warnings regular Perl warnings. This duplicates the warning
8271           message if DontUseExceptions() is in effect (it is not by default).
8272           */
8273       if ( eclass == CE_Warning ) {
8274         warn( CPLGetLastErrorMsg(), "%s" );
8275       }
8276 
8277 
8278     }
8279     {
8280       /* %typemap(out) OGRErr */
8281       if ( result != 0 ) {
8282         const char *err = CPLGetLastErrorMsg();
8283         if (err and *err) do_confess(err, 0); /* this is usually better */
8284         do_confess( OGRErrMessages(result), 1 );
8285       }
8286     }
8287 
8288     XSRETURN(argvi);
8289   fail:
8290 
8291     SWIG_croak_null();
8292   }
8293 }
8294 
8295 
XS(_wrap_SpatialReference_SetGEOS)8296 XS(_wrap_SpatialReference_SetGEOS) {
8297   {
8298     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8299     double arg2 ;
8300     double arg3 ;
8301     double arg4 ;
8302     double arg5 ;
8303     void *argp1 = 0 ;
8304     int res1 = 0 ;
8305     double val2 ;
8306     int ecode2 = 0 ;
8307     double val3 ;
8308     int ecode3 = 0 ;
8309     double val4 ;
8310     int ecode4 = 0 ;
8311     double val5 ;
8312     int ecode5 = 0 ;
8313     int argvi = 0;
8314     OGRErr result;
8315     dXSARGS;
8316 
8317     if ((items < 5) || (items > 5)) {
8318       SWIG_croak("Usage: SpatialReference_SetGEOS(self,cm,satelliteheight,fe,fn);");
8319     }
8320     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8321     if (!SWIG_IsOK(res1)) {
8322       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8323     }
8324     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8325     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8326     if (!SWIG_IsOK(ecode2)) {
8327       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
8328     }
8329     arg2 = static_cast< double >(val2);
8330     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8331     if (!SWIG_IsOK(ecode3)) {
8332       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
8333     }
8334     arg3 = static_cast< double >(val3);
8335     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8336     if (!SWIG_IsOK(ecode4)) {
8337       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
8338     }
8339     arg4 = static_cast< double >(val4);
8340     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8341     if (!SWIG_IsOK(ecode5)) {
8342       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
8343     }
8344     arg5 = static_cast< double >(val5);
8345     {
8346       CPLErrorReset();
8347       result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
8348       CPLErr eclass = CPLGetLastErrorType();
8349       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8350         do_confess( CPLGetLastErrorMsg(), 0 );
8351 
8352 
8353 
8354 
8355 
8356       }
8357 
8358 
8359       /*
8360           Make warnings regular Perl warnings. This duplicates the warning
8361           message if DontUseExceptions() is in effect (it is not by default).
8362           */
8363       if ( eclass == CE_Warning ) {
8364         warn( CPLGetLastErrorMsg(), "%s" );
8365       }
8366 
8367 
8368     }
8369     {
8370       /* %typemap(out) OGRErr */
8371       if ( result != 0 ) {
8372         const char *err = CPLGetLastErrorMsg();
8373         if (err and *err) do_confess(err, 0); /* this is usually better */
8374         do_confess( OGRErrMessages(result), 1 );
8375       }
8376     }
8377 
8378 
8379 
8380 
8381 
8382     XSRETURN(argvi);
8383   fail:
8384 
8385 
8386 
8387 
8388 
8389     SWIG_croak_null();
8390   }
8391 }
8392 
8393 
XS(_wrap_SpatialReference_SetGnomonic)8394 XS(_wrap_SpatialReference_SetGnomonic) {
8395   {
8396     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8397     double arg2 ;
8398     double arg3 ;
8399     double arg4 ;
8400     double arg5 ;
8401     void *argp1 = 0 ;
8402     int res1 = 0 ;
8403     double val2 ;
8404     int ecode2 = 0 ;
8405     double val3 ;
8406     int ecode3 = 0 ;
8407     double val4 ;
8408     int ecode4 = 0 ;
8409     double val5 ;
8410     int ecode5 = 0 ;
8411     int argvi = 0;
8412     OGRErr result;
8413     dXSARGS;
8414 
8415     if ((items < 5) || (items > 5)) {
8416       SWIG_croak("Usage: SpatialReference_SetGnomonic(self,clat,clong,fe,fn);");
8417     }
8418     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8419     if (!SWIG_IsOK(res1)) {
8420       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8421     }
8422     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8423     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8424     if (!SWIG_IsOK(ecode2)) {
8425       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
8426     }
8427     arg2 = static_cast< double >(val2);
8428     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8429     if (!SWIG_IsOK(ecode3)) {
8430       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
8431     }
8432     arg3 = static_cast< double >(val3);
8433     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8434     if (!SWIG_IsOK(ecode4)) {
8435       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
8436     }
8437     arg4 = static_cast< double >(val4);
8438     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8439     if (!SWIG_IsOK(ecode5)) {
8440       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
8441     }
8442     arg5 = static_cast< double >(val5);
8443     {
8444       CPLErrorReset();
8445       result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
8446       CPLErr eclass = CPLGetLastErrorType();
8447       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8448         do_confess( CPLGetLastErrorMsg(), 0 );
8449 
8450 
8451 
8452 
8453 
8454       }
8455 
8456 
8457       /*
8458           Make warnings regular Perl warnings. This duplicates the warning
8459           message if DontUseExceptions() is in effect (it is not by default).
8460           */
8461       if ( eclass == CE_Warning ) {
8462         warn( CPLGetLastErrorMsg(), "%s" );
8463       }
8464 
8465 
8466     }
8467     {
8468       /* %typemap(out) OGRErr */
8469       if ( result != 0 ) {
8470         const char *err = CPLGetLastErrorMsg();
8471         if (err and *err) do_confess(err, 0); /* this is usually better */
8472         do_confess( OGRErrMessages(result), 1 );
8473       }
8474     }
8475 
8476 
8477 
8478 
8479 
8480     XSRETURN(argvi);
8481   fail:
8482 
8483 
8484 
8485 
8486 
8487     SWIG_croak_null();
8488   }
8489 }
8490 
8491 
XS(_wrap_SpatialReference_SetHOM)8492 XS(_wrap_SpatialReference_SetHOM) {
8493   {
8494     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8495     double arg2 ;
8496     double arg3 ;
8497     double arg4 ;
8498     double arg5 ;
8499     double arg6 ;
8500     double arg7 ;
8501     double arg8 ;
8502     void *argp1 = 0 ;
8503     int res1 = 0 ;
8504     double val2 ;
8505     int ecode2 = 0 ;
8506     double val3 ;
8507     int ecode3 = 0 ;
8508     double val4 ;
8509     int ecode4 = 0 ;
8510     double val5 ;
8511     int ecode5 = 0 ;
8512     double val6 ;
8513     int ecode6 = 0 ;
8514     double val7 ;
8515     int ecode7 = 0 ;
8516     double val8 ;
8517     int ecode8 = 0 ;
8518     int argvi = 0;
8519     OGRErr result;
8520     dXSARGS;
8521 
8522     if ((items < 8) || (items > 8)) {
8523       SWIG_croak("Usage: SpatialReference_SetHOM(self,clat,clong,azimuth,recttoskew,scale,fe,fn);");
8524     }
8525     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8526     if (!SWIG_IsOK(res1)) {
8527       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8528     }
8529     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8530     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8531     if (!SWIG_IsOK(ecode2)) {
8532       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
8533     }
8534     arg2 = static_cast< double >(val2);
8535     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8536     if (!SWIG_IsOK(ecode3)) {
8537       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
8538     }
8539     arg3 = static_cast< double >(val3);
8540     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8541     if (!SWIG_IsOK(ecode4)) {
8542       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
8543     }
8544     arg4 = static_cast< double >(val4);
8545     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8546     if (!SWIG_IsOK(ecode5)) {
8547       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
8548     }
8549     arg5 = static_cast< double >(val5);
8550     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
8551     if (!SWIG_IsOK(ecode6)) {
8552       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
8553     }
8554     arg6 = static_cast< double >(val6);
8555     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
8556     if (!SWIG_IsOK(ecode7)) {
8557       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
8558     }
8559     arg7 = static_cast< double >(val7);
8560     ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
8561     if (!SWIG_IsOK(ecode8)) {
8562       SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
8563     }
8564     arg8 = static_cast< double >(val8);
8565     {
8566       CPLErrorReset();
8567       result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
8568       CPLErr eclass = CPLGetLastErrorType();
8569       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8570         do_confess( CPLGetLastErrorMsg(), 0 );
8571 
8572 
8573 
8574 
8575 
8576       }
8577 
8578 
8579       /*
8580           Make warnings regular Perl warnings. This duplicates the warning
8581           message if DontUseExceptions() is in effect (it is not by default).
8582           */
8583       if ( eclass == CE_Warning ) {
8584         warn( CPLGetLastErrorMsg(), "%s" );
8585       }
8586 
8587 
8588     }
8589     {
8590       /* %typemap(out) OGRErr */
8591       if ( result != 0 ) {
8592         const char *err = CPLGetLastErrorMsg();
8593         if (err and *err) do_confess(err, 0); /* this is usually better */
8594         do_confess( OGRErrMessages(result), 1 );
8595       }
8596     }
8597 
8598 
8599 
8600 
8601 
8602 
8603 
8604 
8605     XSRETURN(argvi);
8606   fail:
8607 
8608 
8609 
8610 
8611 
8612 
8613 
8614 
8615     SWIG_croak_null();
8616   }
8617 }
8618 
8619 
XS(_wrap_SpatialReference_SetHOM2PNO)8620 XS(_wrap_SpatialReference_SetHOM2PNO) {
8621   {
8622     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8623     double arg2 ;
8624     double arg3 ;
8625     double arg4 ;
8626     double arg5 ;
8627     double arg6 ;
8628     double arg7 ;
8629     double arg8 ;
8630     double arg9 ;
8631     void *argp1 = 0 ;
8632     int res1 = 0 ;
8633     double val2 ;
8634     int ecode2 = 0 ;
8635     double val3 ;
8636     int ecode3 = 0 ;
8637     double val4 ;
8638     int ecode4 = 0 ;
8639     double val5 ;
8640     int ecode5 = 0 ;
8641     double val6 ;
8642     int ecode6 = 0 ;
8643     double val7 ;
8644     int ecode7 = 0 ;
8645     double val8 ;
8646     int ecode8 = 0 ;
8647     double val9 ;
8648     int ecode9 = 0 ;
8649     int argvi = 0;
8650     OGRErr result;
8651     dXSARGS;
8652 
8653     if ((items < 9) || (items > 9)) {
8654       SWIG_croak("Usage: SpatialReference_SetHOM2PNO(self,clat,dfLat1,dfLong1,dfLat2,dfLong2,scale,fe,fn);");
8655     }
8656     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8657     if (!SWIG_IsOK(res1)) {
8658       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8659     }
8660     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8661     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8662     if (!SWIG_IsOK(ecode2)) {
8663       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
8664     }
8665     arg2 = static_cast< double >(val2);
8666     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8667     if (!SWIG_IsOK(ecode3)) {
8668       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
8669     }
8670     arg3 = static_cast< double >(val3);
8671     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8672     if (!SWIG_IsOK(ecode4)) {
8673       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
8674     }
8675     arg4 = static_cast< double >(val4);
8676     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8677     if (!SWIG_IsOK(ecode5)) {
8678       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
8679     }
8680     arg5 = static_cast< double >(val5);
8681     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
8682     if (!SWIG_IsOK(ecode6)) {
8683       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
8684     }
8685     arg6 = static_cast< double >(val6);
8686     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
8687     if (!SWIG_IsOK(ecode7)) {
8688       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
8689     }
8690     arg7 = static_cast< double >(val7);
8691     ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
8692     if (!SWIG_IsOK(ecode8)) {
8693       SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
8694     }
8695     arg8 = static_cast< double >(val8);
8696     ecode9 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
8697     if (!SWIG_IsOK(ecode9)) {
8698       SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
8699     }
8700     arg9 = static_cast< double >(val9);
8701     {
8702       CPLErrorReset();
8703       result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
8704       CPLErr eclass = CPLGetLastErrorType();
8705       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8706         do_confess( CPLGetLastErrorMsg(), 0 );
8707 
8708 
8709 
8710 
8711 
8712       }
8713 
8714 
8715       /*
8716           Make warnings regular Perl warnings. This duplicates the warning
8717           message if DontUseExceptions() is in effect (it is not by default).
8718           */
8719       if ( eclass == CE_Warning ) {
8720         warn( CPLGetLastErrorMsg(), "%s" );
8721       }
8722 
8723 
8724     }
8725     {
8726       /* %typemap(out) OGRErr */
8727       if ( result != 0 ) {
8728         const char *err = CPLGetLastErrorMsg();
8729         if (err and *err) do_confess(err, 0); /* this is usually better */
8730         do_confess( OGRErrMessages(result), 1 );
8731       }
8732     }
8733 
8734 
8735 
8736 
8737 
8738 
8739 
8740 
8741 
8742     XSRETURN(argvi);
8743   fail:
8744 
8745 
8746 
8747 
8748 
8749 
8750 
8751 
8752 
8753     SWIG_croak_null();
8754   }
8755 }
8756 
8757 
XS(_wrap_SpatialReference_SetKrovak)8758 XS(_wrap_SpatialReference_SetKrovak) {
8759   {
8760     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8761     double arg2 ;
8762     double arg3 ;
8763     double arg4 ;
8764     double arg5 ;
8765     double arg6 ;
8766     double arg7 ;
8767     double arg8 ;
8768     void *argp1 = 0 ;
8769     int res1 = 0 ;
8770     double val2 ;
8771     int ecode2 = 0 ;
8772     double val3 ;
8773     int ecode3 = 0 ;
8774     double val4 ;
8775     int ecode4 = 0 ;
8776     double val5 ;
8777     int ecode5 = 0 ;
8778     double val6 ;
8779     int ecode6 = 0 ;
8780     double val7 ;
8781     int ecode7 = 0 ;
8782     double val8 ;
8783     int ecode8 = 0 ;
8784     int argvi = 0;
8785     OGRErr result;
8786     dXSARGS;
8787 
8788     if ((items < 8) || (items > 8)) {
8789       SWIG_croak("Usage: SpatialReference_SetKrovak(self,clat,clong,azimuth,pseudostdparallellat,scale,fe,fn);");
8790     }
8791     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8792     if (!SWIG_IsOK(res1)) {
8793       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8794     }
8795     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8796     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8797     if (!SWIG_IsOK(ecode2)) {
8798       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
8799     }
8800     arg2 = static_cast< double >(val2);
8801     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8802     if (!SWIG_IsOK(ecode3)) {
8803       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
8804     }
8805     arg3 = static_cast< double >(val3);
8806     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8807     if (!SWIG_IsOK(ecode4)) {
8808       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
8809     }
8810     arg4 = static_cast< double >(val4);
8811     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8812     if (!SWIG_IsOK(ecode5)) {
8813       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
8814     }
8815     arg5 = static_cast< double >(val5);
8816     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
8817     if (!SWIG_IsOK(ecode6)) {
8818       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
8819     }
8820     arg6 = static_cast< double >(val6);
8821     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
8822     if (!SWIG_IsOK(ecode7)) {
8823       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
8824     }
8825     arg7 = static_cast< double >(val7);
8826     ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
8827     if (!SWIG_IsOK(ecode8)) {
8828       SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
8829     }
8830     arg8 = static_cast< double >(val8);
8831     {
8832       CPLErrorReset();
8833       result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
8834       CPLErr eclass = CPLGetLastErrorType();
8835       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8836         do_confess( CPLGetLastErrorMsg(), 0 );
8837 
8838 
8839 
8840 
8841 
8842       }
8843 
8844 
8845       /*
8846           Make warnings regular Perl warnings. This duplicates the warning
8847           message if DontUseExceptions() is in effect (it is not by default).
8848           */
8849       if ( eclass == CE_Warning ) {
8850         warn( CPLGetLastErrorMsg(), "%s" );
8851       }
8852 
8853 
8854     }
8855     {
8856       /* %typemap(out) OGRErr */
8857       if ( result != 0 ) {
8858         const char *err = CPLGetLastErrorMsg();
8859         if (err and *err) do_confess(err, 0); /* this is usually better */
8860         do_confess( OGRErrMessages(result), 1 );
8861       }
8862     }
8863 
8864 
8865 
8866 
8867 
8868 
8869 
8870 
8871     XSRETURN(argvi);
8872   fail:
8873 
8874 
8875 
8876 
8877 
8878 
8879 
8880 
8881     SWIG_croak_null();
8882   }
8883 }
8884 
8885 
XS(_wrap_SpatialReference_SetLAEA)8886 XS(_wrap_SpatialReference_SetLAEA) {
8887   {
8888     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8889     double arg2 ;
8890     double arg3 ;
8891     double arg4 ;
8892     double arg5 ;
8893     void *argp1 = 0 ;
8894     int res1 = 0 ;
8895     double val2 ;
8896     int ecode2 = 0 ;
8897     double val3 ;
8898     int ecode3 = 0 ;
8899     double val4 ;
8900     int ecode4 = 0 ;
8901     double val5 ;
8902     int ecode5 = 0 ;
8903     int argvi = 0;
8904     OGRErr result;
8905     dXSARGS;
8906 
8907     if ((items < 5) || (items > 5)) {
8908       SWIG_croak("Usage: SpatialReference_SetLAEA(self,clat,clong,fe,fn);");
8909     }
8910     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
8911     if (!SWIG_IsOK(res1)) {
8912       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8913     }
8914     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8915     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
8916     if (!SWIG_IsOK(ecode2)) {
8917       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
8918     }
8919     arg2 = static_cast< double >(val2);
8920     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
8921     if (!SWIG_IsOK(ecode3)) {
8922       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
8923     }
8924     arg3 = static_cast< double >(val3);
8925     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
8926     if (!SWIG_IsOK(ecode4)) {
8927       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
8928     }
8929     arg4 = static_cast< double >(val4);
8930     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
8931     if (!SWIG_IsOK(ecode5)) {
8932       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
8933     }
8934     arg5 = static_cast< double >(val5);
8935     {
8936       CPLErrorReset();
8937       result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
8938       CPLErr eclass = CPLGetLastErrorType();
8939       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8940         do_confess( CPLGetLastErrorMsg(), 0 );
8941 
8942 
8943 
8944 
8945 
8946       }
8947 
8948 
8949       /*
8950           Make warnings regular Perl warnings. This duplicates the warning
8951           message if DontUseExceptions() is in effect (it is not by default).
8952           */
8953       if ( eclass == CE_Warning ) {
8954         warn( CPLGetLastErrorMsg(), "%s" );
8955       }
8956 
8957 
8958     }
8959     {
8960       /* %typemap(out) OGRErr */
8961       if ( result != 0 ) {
8962         const char *err = CPLGetLastErrorMsg();
8963         if (err and *err) do_confess(err, 0); /* this is usually better */
8964         do_confess( OGRErrMessages(result), 1 );
8965       }
8966     }
8967 
8968 
8969 
8970 
8971 
8972     XSRETURN(argvi);
8973   fail:
8974 
8975 
8976 
8977 
8978 
8979     SWIG_croak_null();
8980   }
8981 }
8982 
8983 
XS(_wrap_SpatialReference_SetLCC)8984 XS(_wrap_SpatialReference_SetLCC) {
8985   {
8986     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8987     double arg2 ;
8988     double arg3 ;
8989     double arg4 ;
8990     double arg5 ;
8991     double arg6 ;
8992     double arg7 ;
8993     void *argp1 = 0 ;
8994     int res1 = 0 ;
8995     double val2 ;
8996     int ecode2 = 0 ;
8997     double val3 ;
8998     int ecode3 = 0 ;
8999     double val4 ;
9000     int ecode4 = 0 ;
9001     double val5 ;
9002     int ecode5 = 0 ;
9003     double val6 ;
9004     int ecode6 = 0 ;
9005     double val7 ;
9006     int ecode7 = 0 ;
9007     int argvi = 0;
9008     OGRErr result;
9009     dXSARGS;
9010 
9011     if ((items < 7) || (items > 7)) {
9012       SWIG_croak("Usage: SpatialReference_SetLCC(self,stdp1,stdp2,clat,clong,fe,fn);");
9013     }
9014     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9015     if (!SWIG_IsOK(res1)) {
9016       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9017     }
9018     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9019     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9020     if (!SWIG_IsOK(ecode2)) {
9021       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
9022     }
9023     arg2 = static_cast< double >(val2);
9024     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9025     if (!SWIG_IsOK(ecode3)) {
9026       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
9027     }
9028     arg3 = static_cast< double >(val3);
9029     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9030     if (!SWIG_IsOK(ecode4)) {
9031       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
9032     }
9033     arg4 = static_cast< double >(val4);
9034     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9035     if (!SWIG_IsOK(ecode5)) {
9036       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
9037     }
9038     arg5 = static_cast< double >(val5);
9039     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
9040     if (!SWIG_IsOK(ecode6)) {
9041       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
9042     }
9043     arg6 = static_cast< double >(val6);
9044     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
9045     if (!SWIG_IsOK(ecode7)) {
9046       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
9047     }
9048     arg7 = static_cast< double >(val7);
9049     {
9050       CPLErrorReset();
9051       result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9052       CPLErr eclass = CPLGetLastErrorType();
9053       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9054         do_confess( CPLGetLastErrorMsg(), 0 );
9055 
9056 
9057 
9058 
9059 
9060       }
9061 
9062 
9063       /*
9064           Make warnings regular Perl warnings. This duplicates the warning
9065           message if DontUseExceptions() is in effect (it is not by default).
9066           */
9067       if ( eclass == CE_Warning ) {
9068         warn( CPLGetLastErrorMsg(), "%s" );
9069       }
9070 
9071 
9072     }
9073     {
9074       /* %typemap(out) OGRErr */
9075       if ( result != 0 ) {
9076         const char *err = CPLGetLastErrorMsg();
9077         if (err and *err) do_confess(err, 0); /* this is usually better */
9078         do_confess( OGRErrMessages(result), 1 );
9079       }
9080     }
9081 
9082 
9083 
9084 
9085 
9086 
9087 
9088     XSRETURN(argvi);
9089   fail:
9090 
9091 
9092 
9093 
9094 
9095 
9096 
9097     SWIG_croak_null();
9098   }
9099 }
9100 
9101 
XS(_wrap_SpatialReference_SetLCC1SP)9102 XS(_wrap_SpatialReference_SetLCC1SP) {
9103   {
9104     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9105     double arg2 ;
9106     double arg3 ;
9107     double arg4 ;
9108     double arg5 ;
9109     double arg6 ;
9110     void *argp1 = 0 ;
9111     int res1 = 0 ;
9112     double val2 ;
9113     int ecode2 = 0 ;
9114     double val3 ;
9115     int ecode3 = 0 ;
9116     double val4 ;
9117     int ecode4 = 0 ;
9118     double val5 ;
9119     int ecode5 = 0 ;
9120     double val6 ;
9121     int ecode6 = 0 ;
9122     int argvi = 0;
9123     OGRErr result;
9124     dXSARGS;
9125 
9126     if ((items < 6) || (items > 6)) {
9127       SWIG_croak("Usage: SpatialReference_SetLCC1SP(self,clat,clong,scale,fe,fn);");
9128     }
9129     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9130     if (!SWIG_IsOK(res1)) {
9131       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9132     }
9133     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9134     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9135     if (!SWIG_IsOK(ecode2)) {
9136       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
9137     }
9138     arg2 = static_cast< double >(val2);
9139     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9140     if (!SWIG_IsOK(ecode3)) {
9141       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
9142     }
9143     arg3 = static_cast< double >(val3);
9144     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9145     if (!SWIG_IsOK(ecode4)) {
9146       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
9147     }
9148     arg4 = static_cast< double >(val4);
9149     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9150     if (!SWIG_IsOK(ecode5)) {
9151       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
9152     }
9153     arg5 = static_cast< double >(val5);
9154     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
9155     if (!SWIG_IsOK(ecode6)) {
9156       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
9157     }
9158     arg6 = static_cast< double >(val6);
9159     {
9160       CPLErrorReset();
9161       result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
9162       CPLErr eclass = CPLGetLastErrorType();
9163       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9164         do_confess( CPLGetLastErrorMsg(), 0 );
9165 
9166 
9167 
9168 
9169 
9170       }
9171 
9172 
9173       /*
9174           Make warnings regular Perl warnings. This duplicates the warning
9175           message if DontUseExceptions() is in effect (it is not by default).
9176           */
9177       if ( eclass == CE_Warning ) {
9178         warn( CPLGetLastErrorMsg(), "%s" );
9179       }
9180 
9181 
9182     }
9183     {
9184       /* %typemap(out) OGRErr */
9185       if ( result != 0 ) {
9186         const char *err = CPLGetLastErrorMsg();
9187         if (err and *err) do_confess(err, 0); /* this is usually better */
9188         do_confess( OGRErrMessages(result), 1 );
9189       }
9190     }
9191 
9192 
9193 
9194 
9195 
9196 
9197     XSRETURN(argvi);
9198   fail:
9199 
9200 
9201 
9202 
9203 
9204 
9205     SWIG_croak_null();
9206   }
9207 }
9208 
9209 
XS(_wrap_SpatialReference_SetLCCB)9210 XS(_wrap_SpatialReference_SetLCCB) {
9211   {
9212     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9213     double arg2 ;
9214     double arg3 ;
9215     double arg4 ;
9216     double arg5 ;
9217     double arg6 ;
9218     double arg7 ;
9219     void *argp1 = 0 ;
9220     int res1 = 0 ;
9221     double val2 ;
9222     int ecode2 = 0 ;
9223     double val3 ;
9224     int ecode3 = 0 ;
9225     double val4 ;
9226     int ecode4 = 0 ;
9227     double val5 ;
9228     int ecode5 = 0 ;
9229     double val6 ;
9230     int ecode6 = 0 ;
9231     double val7 ;
9232     int ecode7 = 0 ;
9233     int argvi = 0;
9234     OGRErr result;
9235     dXSARGS;
9236 
9237     if ((items < 7) || (items > 7)) {
9238       SWIG_croak("Usage: SpatialReference_SetLCCB(self,stdp1,stdp2,clat,clong,fe,fn);");
9239     }
9240     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9241     if (!SWIG_IsOK(res1)) {
9242       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9243     }
9244     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9245     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9246     if (!SWIG_IsOK(ecode2)) {
9247       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
9248     }
9249     arg2 = static_cast< double >(val2);
9250     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9251     if (!SWIG_IsOK(ecode3)) {
9252       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
9253     }
9254     arg3 = static_cast< double >(val3);
9255     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9256     if (!SWIG_IsOK(ecode4)) {
9257       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
9258     }
9259     arg4 = static_cast< double >(val4);
9260     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9261     if (!SWIG_IsOK(ecode5)) {
9262       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
9263     }
9264     arg5 = static_cast< double >(val5);
9265     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
9266     if (!SWIG_IsOK(ecode6)) {
9267       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
9268     }
9269     arg6 = static_cast< double >(val6);
9270     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
9271     if (!SWIG_IsOK(ecode7)) {
9272       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
9273     }
9274     arg7 = static_cast< double >(val7);
9275     {
9276       CPLErrorReset();
9277       result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9278       CPLErr eclass = CPLGetLastErrorType();
9279       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9280         do_confess( CPLGetLastErrorMsg(), 0 );
9281 
9282 
9283 
9284 
9285 
9286       }
9287 
9288 
9289       /*
9290           Make warnings regular Perl warnings. This duplicates the warning
9291           message if DontUseExceptions() is in effect (it is not by default).
9292           */
9293       if ( eclass == CE_Warning ) {
9294         warn( CPLGetLastErrorMsg(), "%s" );
9295       }
9296 
9297 
9298     }
9299     {
9300       /* %typemap(out) OGRErr */
9301       if ( result != 0 ) {
9302         const char *err = CPLGetLastErrorMsg();
9303         if (err and *err) do_confess(err, 0); /* this is usually better */
9304         do_confess( OGRErrMessages(result), 1 );
9305       }
9306     }
9307 
9308 
9309 
9310 
9311 
9312 
9313 
9314     XSRETURN(argvi);
9315   fail:
9316 
9317 
9318 
9319 
9320 
9321 
9322 
9323     SWIG_croak_null();
9324   }
9325 }
9326 
9327 
XS(_wrap_SpatialReference_SetMC)9328 XS(_wrap_SpatialReference_SetMC) {
9329   {
9330     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9331     double arg2 ;
9332     double arg3 ;
9333     double arg4 ;
9334     double arg5 ;
9335     void *argp1 = 0 ;
9336     int res1 = 0 ;
9337     double val2 ;
9338     int ecode2 = 0 ;
9339     double val3 ;
9340     int ecode3 = 0 ;
9341     double val4 ;
9342     int ecode4 = 0 ;
9343     double val5 ;
9344     int ecode5 = 0 ;
9345     int argvi = 0;
9346     OGRErr result;
9347     dXSARGS;
9348 
9349     if ((items < 5) || (items > 5)) {
9350       SWIG_croak("Usage: SpatialReference_SetMC(self,clat,clong,fe,fn);");
9351     }
9352     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9353     if (!SWIG_IsOK(res1)) {
9354       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9355     }
9356     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9357     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9358     if (!SWIG_IsOK(ecode2)) {
9359       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
9360     }
9361     arg2 = static_cast< double >(val2);
9362     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9363     if (!SWIG_IsOK(ecode3)) {
9364       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
9365     }
9366     arg3 = static_cast< double >(val3);
9367     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9368     if (!SWIG_IsOK(ecode4)) {
9369       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
9370     }
9371     arg4 = static_cast< double >(val4);
9372     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9373     if (!SWIG_IsOK(ecode5)) {
9374       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
9375     }
9376     arg5 = static_cast< double >(val5);
9377     {
9378       CPLErrorReset();
9379       result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
9380       CPLErr eclass = CPLGetLastErrorType();
9381       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9382         do_confess( CPLGetLastErrorMsg(), 0 );
9383 
9384 
9385 
9386 
9387 
9388       }
9389 
9390 
9391       /*
9392           Make warnings regular Perl warnings. This duplicates the warning
9393           message if DontUseExceptions() is in effect (it is not by default).
9394           */
9395       if ( eclass == CE_Warning ) {
9396         warn( CPLGetLastErrorMsg(), "%s" );
9397       }
9398 
9399 
9400     }
9401     {
9402       /* %typemap(out) OGRErr */
9403       if ( result != 0 ) {
9404         const char *err = CPLGetLastErrorMsg();
9405         if (err and *err) do_confess(err, 0); /* this is usually better */
9406         do_confess( OGRErrMessages(result), 1 );
9407       }
9408     }
9409 
9410 
9411 
9412 
9413 
9414     XSRETURN(argvi);
9415   fail:
9416 
9417 
9418 
9419 
9420 
9421     SWIG_croak_null();
9422   }
9423 }
9424 
9425 
XS(_wrap_SpatialReference_SetMercator)9426 XS(_wrap_SpatialReference_SetMercator) {
9427   {
9428     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9429     double arg2 ;
9430     double arg3 ;
9431     double arg4 ;
9432     double arg5 ;
9433     double arg6 ;
9434     void *argp1 = 0 ;
9435     int res1 = 0 ;
9436     double val2 ;
9437     int ecode2 = 0 ;
9438     double val3 ;
9439     int ecode3 = 0 ;
9440     double val4 ;
9441     int ecode4 = 0 ;
9442     double val5 ;
9443     int ecode5 = 0 ;
9444     double val6 ;
9445     int ecode6 = 0 ;
9446     int argvi = 0;
9447     OGRErr result;
9448     dXSARGS;
9449 
9450     if ((items < 6) || (items > 6)) {
9451       SWIG_croak("Usage: SpatialReference_SetMercator(self,clat,clong,scale,fe,fn);");
9452     }
9453     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9454     if (!SWIG_IsOK(res1)) {
9455       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9456     }
9457     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9458     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9459     if (!SWIG_IsOK(ecode2)) {
9460       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
9461     }
9462     arg2 = static_cast< double >(val2);
9463     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9464     if (!SWIG_IsOK(ecode3)) {
9465       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
9466     }
9467     arg3 = static_cast< double >(val3);
9468     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9469     if (!SWIG_IsOK(ecode4)) {
9470       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
9471     }
9472     arg4 = static_cast< double >(val4);
9473     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9474     if (!SWIG_IsOK(ecode5)) {
9475       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
9476     }
9477     arg5 = static_cast< double >(val5);
9478     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
9479     if (!SWIG_IsOK(ecode6)) {
9480       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
9481     }
9482     arg6 = static_cast< double >(val6);
9483     {
9484       CPLErrorReset();
9485       result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
9486       CPLErr eclass = CPLGetLastErrorType();
9487       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9488         do_confess( CPLGetLastErrorMsg(), 0 );
9489 
9490 
9491 
9492 
9493 
9494       }
9495 
9496 
9497       /*
9498           Make warnings regular Perl warnings. This duplicates the warning
9499           message if DontUseExceptions() is in effect (it is not by default).
9500           */
9501       if ( eclass == CE_Warning ) {
9502         warn( CPLGetLastErrorMsg(), "%s" );
9503       }
9504 
9505 
9506     }
9507     {
9508       /* %typemap(out) OGRErr */
9509       if ( result != 0 ) {
9510         const char *err = CPLGetLastErrorMsg();
9511         if (err and *err) do_confess(err, 0); /* this is usually better */
9512         do_confess( OGRErrMessages(result), 1 );
9513       }
9514     }
9515 
9516 
9517 
9518 
9519 
9520 
9521     XSRETURN(argvi);
9522   fail:
9523 
9524 
9525 
9526 
9527 
9528 
9529     SWIG_croak_null();
9530   }
9531 }
9532 
9533 
XS(_wrap_SpatialReference_SetMercator2SP)9534 XS(_wrap_SpatialReference_SetMercator2SP) {
9535   {
9536     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9537     double arg2 ;
9538     double arg3 ;
9539     double arg4 ;
9540     double arg5 ;
9541     double arg6 ;
9542     void *argp1 = 0 ;
9543     int res1 = 0 ;
9544     double val2 ;
9545     int ecode2 = 0 ;
9546     double val3 ;
9547     int ecode3 = 0 ;
9548     double val4 ;
9549     int ecode4 = 0 ;
9550     double val5 ;
9551     int ecode5 = 0 ;
9552     double val6 ;
9553     int ecode6 = 0 ;
9554     int argvi = 0;
9555     OGRErr result;
9556     dXSARGS;
9557 
9558     if ((items < 6) || (items > 6)) {
9559       SWIG_croak("Usage: SpatialReference_SetMercator2SP(self,stdp1,clat,clong,fe,fn);");
9560     }
9561     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9562     if (!SWIG_IsOK(res1)) {
9563       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator2SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9564     }
9565     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9566     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9567     if (!SWIG_IsOK(ecode2)) {
9568       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator2SP" "', argument " "2"" of type '" "double""'");
9569     }
9570     arg2 = static_cast< double >(val2);
9571     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9572     if (!SWIG_IsOK(ecode3)) {
9573       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator2SP" "', argument " "3"" of type '" "double""'");
9574     }
9575     arg3 = static_cast< double >(val3);
9576     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9577     if (!SWIG_IsOK(ecode4)) {
9578       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator2SP" "', argument " "4"" of type '" "double""'");
9579     }
9580     arg4 = static_cast< double >(val4);
9581     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9582     if (!SWIG_IsOK(ecode5)) {
9583       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator2SP" "', argument " "5"" of type '" "double""'");
9584     }
9585     arg5 = static_cast< double >(val5);
9586     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
9587     if (!SWIG_IsOK(ecode6)) {
9588       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator2SP" "', argument " "6"" of type '" "double""'");
9589     }
9590     arg6 = static_cast< double >(val6);
9591     {
9592       CPLErrorReset();
9593       result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
9594       CPLErr eclass = CPLGetLastErrorType();
9595       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9596         do_confess( CPLGetLastErrorMsg(), 0 );
9597 
9598 
9599 
9600 
9601 
9602       }
9603 
9604 
9605       /*
9606           Make warnings regular Perl warnings. This duplicates the warning
9607           message if DontUseExceptions() is in effect (it is not by default).
9608           */
9609       if ( eclass == CE_Warning ) {
9610         warn( CPLGetLastErrorMsg(), "%s" );
9611       }
9612 
9613 
9614     }
9615     {
9616       /* %typemap(out) OGRErr */
9617       if ( result != 0 ) {
9618         const char *err = CPLGetLastErrorMsg();
9619         if (err and *err) do_confess(err, 0); /* this is usually better */
9620         do_confess( OGRErrMessages(result), 1 );
9621       }
9622     }
9623 
9624 
9625 
9626 
9627 
9628 
9629     XSRETURN(argvi);
9630   fail:
9631 
9632 
9633 
9634 
9635 
9636 
9637     SWIG_croak_null();
9638   }
9639 }
9640 
9641 
XS(_wrap_SpatialReference_SetMollweide)9642 XS(_wrap_SpatialReference_SetMollweide) {
9643   {
9644     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9645     double arg2 ;
9646     double arg3 ;
9647     double arg4 ;
9648     void *argp1 = 0 ;
9649     int res1 = 0 ;
9650     double val2 ;
9651     int ecode2 = 0 ;
9652     double val3 ;
9653     int ecode3 = 0 ;
9654     double val4 ;
9655     int ecode4 = 0 ;
9656     int argvi = 0;
9657     OGRErr result;
9658     dXSARGS;
9659 
9660     if ((items < 4) || (items > 4)) {
9661       SWIG_croak("Usage: SpatialReference_SetMollweide(self,cm,fe,fn);");
9662     }
9663     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9664     if (!SWIG_IsOK(res1)) {
9665       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9666     }
9667     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9668     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9669     if (!SWIG_IsOK(ecode2)) {
9670       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
9671     }
9672     arg2 = static_cast< double >(val2);
9673     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9674     if (!SWIG_IsOK(ecode3)) {
9675       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
9676     }
9677     arg3 = static_cast< double >(val3);
9678     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9679     if (!SWIG_IsOK(ecode4)) {
9680       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
9681     }
9682     arg4 = static_cast< double >(val4);
9683     {
9684       CPLErrorReset();
9685       result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
9686       CPLErr eclass = CPLGetLastErrorType();
9687       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9688         do_confess( CPLGetLastErrorMsg(), 0 );
9689 
9690 
9691 
9692 
9693 
9694       }
9695 
9696 
9697       /*
9698           Make warnings regular Perl warnings. This duplicates the warning
9699           message if DontUseExceptions() is in effect (it is not by default).
9700           */
9701       if ( eclass == CE_Warning ) {
9702         warn( CPLGetLastErrorMsg(), "%s" );
9703       }
9704 
9705 
9706     }
9707     {
9708       /* %typemap(out) OGRErr */
9709       if ( result != 0 ) {
9710         const char *err = CPLGetLastErrorMsg();
9711         if (err and *err) do_confess(err, 0); /* this is usually better */
9712         do_confess( OGRErrMessages(result), 1 );
9713       }
9714     }
9715 
9716 
9717 
9718 
9719     XSRETURN(argvi);
9720   fail:
9721 
9722 
9723 
9724 
9725     SWIG_croak_null();
9726   }
9727 }
9728 
9729 
XS(_wrap_SpatialReference_SetNZMG)9730 XS(_wrap_SpatialReference_SetNZMG) {
9731   {
9732     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9733     double arg2 ;
9734     double arg3 ;
9735     double arg4 ;
9736     double arg5 ;
9737     void *argp1 = 0 ;
9738     int res1 = 0 ;
9739     double val2 ;
9740     int ecode2 = 0 ;
9741     double val3 ;
9742     int ecode3 = 0 ;
9743     double val4 ;
9744     int ecode4 = 0 ;
9745     double val5 ;
9746     int ecode5 = 0 ;
9747     int argvi = 0;
9748     OGRErr result;
9749     dXSARGS;
9750 
9751     if ((items < 5) || (items > 5)) {
9752       SWIG_croak("Usage: SpatialReference_SetNZMG(self,clat,clong,fe,fn);");
9753     }
9754     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9755     if (!SWIG_IsOK(res1)) {
9756       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9757     }
9758     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9759     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9760     if (!SWIG_IsOK(ecode2)) {
9761       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
9762     }
9763     arg2 = static_cast< double >(val2);
9764     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9765     if (!SWIG_IsOK(ecode3)) {
9766       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
9767     }
9768     arg3 = static_cast< double >(val3);
9769     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9770     if (!SWIG_IsOK(ecode4)) {
9771       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
9772     }
9773     arg4 = static_cast< double >(val4);
9774     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9775     if (!SWIG_IsOK(ecode5)) {
9776       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
9777     }
9778     arg5 = static_cast< double >(val5);
9779     {
9780       CPLErrorReset();
9781       result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
9782       CPLErr eclass = CPLGetLastErrorType();
9783       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9784         do_confess( CPLGetLastErrorMsg(), 0 );
9785 
9786 
9787 
9788 
9789 
9790       }
9791 
9792 
9793       /*
9794           Make warnings regular Perl warnings. This duplicates the warning
9795           message if DontUseExceptions() is in effect (it is not by default).
9796           */
9797       if ( eclass == CE_Warning ) {
9798         warn( CPLGetLastErrorMsg(), "%s" );
9799       }
9800 
9801 
9802     }
9803     {
9804       /* %typemap(out) OGRErr */
9805       if ( result != 0 ) {
9806         const char *err = CPLGetLastErrorMsg();
9807         if (err and *err) do_confess(err, 0); /* this is usually better */
9808         do_confess( OGRErrMessages(result), 1 );
9809       }
9810     }
9811 
9812 
9813 
9814 
9815 
9816     XSRETURN(argvi);
9817   fail:
9818 
9819 
9820 
9821 
9822 
9823     SWIG_croak_null();
9824   }
9825 }
9826 
9827 
XS(_wrap_SpatialReference_SetOS)9828 XS(_wrap_SpatialReference_SetOS) {
9829   {
9830     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9831     double arg2 ;
9832     double arg3 ;
9833     double arg4 ;
9834     double arg5 ;
9835     double arg6 ;
9836     void *argp1 = 0 ;
9837     int res1 = 0 ;
9838     double val2 ;
9839     int ecode2 = 0 ;
9840     double val3 ;
9841     int ecode3 = 0 ;
9842     double val4 ;
9843     int ecode4 = 0 ;
9844     double val5 ;
9845     int ecode5 = 0 ;
9846     double val6 ;
9847     int ecode6 = 0 ;
9848     int argvi = 0;
9849     OGRErr result;
9850     dXSARGS;
9851 
9852     if ((items < 6) || (items > 6)) {
9853       SWIG_croak("Usage: SpatialReference_SetOS(self,dfOriginLat,dfCMeridian,scale,fe,fn);");
9854     }
9855     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9856     if (!SWIG_IsOK(res1)) {
9857       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9858     }
9859     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9860     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9861     if (!SWIG_IsOK(ecode2)) {
9862       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
9863     }
9864     arg2 = static_cast< double >(val2);
9865     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9866     if (!SWIG_IsOK(ecode3)) {
9867       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
9868     }
9869     arg3 = static_cast< double >(val3);
9870     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9871     if (!SWIG_IsOK(ecode4)) {
9872       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
9873     }
9874     arg4 = static_cast< double >(val4);
9875     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9876     if (!SWIG_IsOK(ecode5)) {
9877       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
9878     }
9879     arg5 = static_cast< double >(val5);
9880     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
9881     if (!SWIG_IsOK(ecode6)) {
9882       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
9883     }
9884     arg6 = static_cast< double >(val6);
9885     {
9886       CPLErrorReset();
9887       result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
9888       CPLErr eclass = CPLGetLastErrorType();
9889       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9890         do_confess( CPLGetLastErrorMsg(), 0 );
9891 
9892 
9893 
9894 
9895 
9896       }
9897 
9898 
9899       /*
9900           Make warnings regular Perl warnings. This duplicates the warning
9901           message if DontUseExceptions() is in effect (it is not by default).
9902           */
9903       if ( eclass == CE_Warning ) {
9904         warn( CPLGetLastErrorMsg(), "%s" );
9905       }
9906 
9907 
9908     }
9909     {
9910       /* %typemap(out) OGRErr */
9911       if ( result != 0 ) {
9912         const char *err = CPLGetLastErrorMsg();
9913         if (err and *err) do_confess(err, 0); /* this is usually better */
9914         do_confess( OGRErrMessages(result), 1 );
9915       }
9916     }
9917 
9918 
9919 
9920 
9921 
9922 
9923     XSRETURN(argvi);
9924   fail:
9925 
9926 
9927 
9928 
9929 
9930 
9931     SWIG_croak_null();
9932   }
9933 }
9934 
9935 
XS(_wrap_SpatialReference_SetOrthographic)9936 XS(_wrap_SpatialReference_SetOrthographic) {
9937   {
9938     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9939     double arg2 ;
9940     double arg3 ;
9941     double arg4 ;
9942     double arg5 ;
9943     void *argp1 = 0 ;
9944     int res1 = 0 ;
9945     double val2 ;
9946     int ecode2 = 0 ;
9947     double val3 ;
9948     int ecode3 = 0 ;
9949     double val4 ;
9950     int ecode4 = 0 ;
9951     double val5 ;
9952     int ecode5 = 0 ;
9953     int argvi = 0;
9954     OGRErr result;
9955     dXSARGS;
9956 
9957     if ((items < 5) || (items > 5)) {
9958       SWIG_croak("Usage: SpatialReference_SetOrthographic(self,clat,clong,fe,fn);");
9959     }
9960     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
9961     if (!SWIG_IsOK(res1)) {
9962       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9963     }
9964     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9965     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
9966     if (!SWIG_IsOK(ecode2)) {
9967       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
9968     }
9969     arg2 = static_cast< double >(val2);
9970     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
9971     if (!SWIG_IsOK(ecode3)) {
9972       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
9973     }
9974     arg3 = static_cast< double >(val3);
9975     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
9976     if (!SWIG_IsOK(ecode4)) {
9977       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
9978     }
9979     arg4 = static_cast< double >(val4);
9980     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
9981     if (!SWIG_IsOK(ecode5)) {
9982       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
9983     }
9984     arg5 = static_cast< double >(val5);
9985     {
9986       CPLErrorReset();
9987       result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
9988       CPLErr eclass = CPLGetLastErrorType();
9989       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9990         do_confess( CPLGetLastErrorMsg(), 0 );
9991 
9992 
9993 
9994 
9995 
9996       }
9997 
9998 
9999       /*
10000           Make warnings regular Perl warnings. This duplicates the warning
10001           message if DontUseExceptions() is in effect (it is not by default).
10002           */
10003       if ( eclass == CE_Warning ) {
10004         warn( CPLGetLastErrorMsg(), "%s" );
10005       }
10006 
10007 
10008     }
10009     {
10010       /* %typemap(out) OGRErr */
10011       if ( result != 0 ) {
10012         const char *err = CPLGetLastErrorMsg();
10013         if (err and *err) do_confess(err, 0); /* this is usually better */
10014         do_confess( OGRErrMessages(result), 1 );
10015       }
10016     }
10017 
10018 
10019 
10020 
10021 
10022     XSRETURN(argvi);
10023   fail:
10024 
10025 
10026 
10027 
10028 
10029     SWIG_croak_null();
10030   }
10031 }
10032 
10033 
XS(_wrap_SpatialReference_SetPolyconic)10034 XS(_wrap_SpatialReference_SetPolyconic) {
10035   {
10036     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10037     double arg2 ;
10038     double arg3 ;
10039     double arg4 ;
10040     double arg5 ;
10041     void *argp1 = 0 ;
10042     int res1 = 0 ;
10043     double val2 ;
10044     int ecode2 = 0 ;
10045     double val3 ;
10046     int ecode3 = 0 ;
10047     double val4 ;
10048     int ecode4 = 0 ;
10049     double val5 ;
10050     int ecode5 = 0 ;
10051     int argvi = 0;
10052     OGRErr result;
10053     dXSARGS;
10054 
10055     if ((items < 5) || (items > 5)) {
10056       SWIG_croak("Usage: SpatialReference_SetPolyconic(self,clat,clong,fe,fn);");
10057     }
10058     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10059     if (!SWIG_IsOK(res1)) {
10060       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10061     }
10062     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10063     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10064     if (!SWIG_IsOK(ecode2)) {
10065       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
10066     }
10067     arg2 = static_cast< double >(val2);
10068     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10069     if (!SWIG_IsOK(ecode3)) {
10070       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
10071     }
10072     arg3 = static_cast< double >(val3);
10073     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10074     if (!SWIG_IsOK(ecode4)) {
10075       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
10076     }
10077     arg4 = static_cast< double >(val4);
10078     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10079     if (!SWIG_IsOK(ecode5)) {
10080       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
10081     }
10082     arg5 = static_cast< double >(val5);
10083     {
10084       CPLErrorReset();
10085       result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
10086       CPLErr eclass = CPLGetLastErrorType();
10087       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10088         do_confess( CPLGetLastErrorMsg(), 0 );
10089 
10090 
10091 
10092 
10093 
10094       }
10095 
10096 
10097       /*
10098           Make warnings regular Perl warnings. This duplicates the warning
10099           message if DontUseExceptions() is in effect (it is not by default).
10100           */
10101       if ( eclass == CE_Warning ) {
10102         warn( CPLGetLastErrorMsg(), "%s" );
10103       }
10104 
10105 
10106     }
10107     {
10108       /* %typemap(out) OGRErr */
10109       if ( result != 0 ) {
10110         const char *err = CPLGetLastErrorMsg();
10111         if (err and *err) do_confess(err, 0); /* this is usually better */
10112         do_confess( OGRErrMessages(result), 1 );
10113       }
10114     }
10115 
10116 
10117 
10118 
10119 
10120     XSRETURN(argvi);
10121   fail:
10122 
10123 
10124 
10125 
10126 
10127     SWIG_croak_null();
10128   }
10129 }
10130 
10131 
XS(_wrap_SpatialReference_SetPS)10132 XS(_wrap_SpatialReference_SetPS) {
10133   {
10134     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10135     double arg2 ;
10136     double arg3 ;
10137     double arg4 ;
10138     double arg5 ;
10139     double arg6 ;
10140     void *argp1 = 0 ;
10141     int res1 = 0 ;
10142     double val2 ;
10143     int ecode2 = 0 ;
10144     double val3 ;
10145     int ecode3 = 0 ;
10146     double val4 ;
10147     int ecode4 = 0 ;
10148     double val5 ;
10149     int ecode5 = 0 ;
10150     double val6 ;
10151     int ecode6 = 0 ;
10152     int argvi = 0;
10153     OGRErr result;
10154     dXSARGS;
10155 
10156     if ((items < 6) || (items > 6)) {
10157       SWIG_croak("Usage: SpatialReference_SetPS(self,clat,clong,scale,fe,fn);");
10158     }
10159     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10160     if (!SWIG_IsOK(res1)) {
10161       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10162     }
10163     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10164     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10165     if (!SWIG_IsOK(ecode2)) {
10166       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
10167     }
10168     arg2 = static_cast< double >(val2);
10169     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10170     if (!SWIG_IsOK(ecode3)) {
10171       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
10172     }
10173     arg3 = static_cast< double >(val3);
10174     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10175     if (!SWIG_IsOK(ecode4)) {
10176       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
10177     }
10178     arg4 = static_cast< double >(val4);
10179     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10180     if (!SWIG_IsOK(ecode5)) {
10181       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
10182     }
10183     arg5 = static_cast< double >(val5);
10184     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
10185     if (!SWIG_IsOK(ecode6)) {
10186       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
10187     }
10188     arg6 = static_cast< double >(val6);
10189     {
10190       CPLErrorReset();
10191       result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
10192       CPLErr eclass = CPLGetLastErrorType();
10193       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10194         do_confess( CPLGetLastErrorMsg(), 0 );
10195 
10196 
10197 
10198 
10199 
10200       }
10201 
10202 
10203       /*
10204           Make warnings regular Perl warnings. This duplicates the warning
10205           message if DontUseExceptions() is in effect (it is not by default).
10206           */
10207       if ( eclass == CE_Warning ) {
10208         warn( CPLGetLastErrorMsg(), "%s" );
10209       }
10210 
10211 
10212     }
10213     {
10214       /* %typemap(out) OGRErr */
10215       if ( result != 0 ) {
10216         const char *err = CPLGetLastErrorMsg();
10217         if (err and *err) do_confess(err, 0); /* this is usually better */
10218         do_confess( OGRErrMessages(result), 1 );
10219       }
10220     }
10221 
10222 
10223 
10224 
10225 
10226 
10227     XSRETURN(argvi);
10228   fail:
10229 
10230 
10231 
10232 
10233 
10234 
10235     SWIG_croak_null();
10236   }
10237 }
10238 
10239 
XS(_wrap_SpatialReference_SetRobinson)10240 XS(_wrap_SpatialReference_SetRobinson) {
10241   {
10242     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10243     double arg2 ;
10244     double arg3 ;
10245     double arg4 ;
10246     void *argp1 = 0 ;
10247     int res1 = 0 ;
10248     double val2 ;
10249     int ecode2 = 0 ;
10250     double val3 ;
10251     int ecode3 = 0 ;
10252     double val4 ;
10253     int ecode4 = 0 ;
10254     int argvi = 0;
10255     OGRErr result;
10256     dXSARGS;
10257 
10258     if ((items < 4) || (items > 4)) {
10259       SWIG_croak("Usage: SpatialReference_SetRobinson(self,clong,fe,fn);");
10260     }
10261     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10262     if (!SWIG_IsOK(res1)) {
10263       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10264     }
10265     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10266     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10267     if (!SWIG_IsOK(ecode2)) {
10268       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
10269     }
10270     arg2 = static_cast< double >(val2);
10271     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10272     if (!SWIG_IsOK(ecode3)) {
10273       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
10274     }
10275     arg3 = static_cast< double >(val3);
10276     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10277     if (!SWIG_IsOK(ecode4)) {
10278       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
10279     }
10280     arg4 = static_cast< double >(val4);
10281     {
10282       CPLErrorReset();
10283       result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
10284       CPLErr eclass = CPLGetLastErrorType();
10285       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10286         do_confess( CPLGetLastErrorMsg(), 0 );
10287 
10288 
10289 
10290 
10291 
10292       }
10293 
10294 
10295       /*
10296           Make warnings regular Perl warnings. This duplicates the warning
10297           message if DontUseExceptions() is in effect (it is not by default).
10298           */
10299       if ( eclass == CE_Warning ) {
10300         warn( CPLGetLastErrorMsg(), "%s" );
10301       }
10302 
10303 
10304     }
10305     {
10306       /* %typemap(out) OGRErr */
10307       if ( result != 0 ) {
10308         const char *err = CPLGetLastErrorMsg();
10309         if (err and *err) do_confess(err, 0); /* this is usually better */
10310         do_confess( OGRErrMessages(result), 1 );
10311       }
10312     }
10313 
10314 
10315 
10316 
10317     XSRETURN(argvi);
10318   fail:
10319 
10320 
10321 
10322 
10323     SWIG_croak_null();
10324   }
10325 }
10326 
10327 
XS(_wrap_SpatialReference_SetSinusoidal)10328 XS(_wrap_SpatialReference_SetSinusoidal) {
10329   {
10330     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10331     double arg2 ;
10332     double arg3 ;
10333     double arg4 ;
10334     void *argp1 = 0 ;
10335     int res1 = 0 ;
10336     double val2 ;
10337     int ecode2 = 0 ;
10338     double val3 ;
10339     int ecode3 = 0 ;
10340     double val4 ;
10341     int ecode4 = 0 ;
10342     int argvi = 0;
10343     OGRErr result;
10344     dXSARGS;
10345 
10346     if ((items < 4) || (items > 4)) {
10347       SWIG_croak("Usage: SpatialReference_SetSinusoidal(self,clong,fe,fn);");
10348     }
10349     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10350     if (!SWIG_IsOK(res1)) {
10351       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10352     }
10353     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10354     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10355     if (!SWIG_IsOK(ecode2)) {
10356       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
10357     }
10358     arg2 = static_cast< double >(val2);
10359     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10360     if (!SWIG_IsOK(ecode3)) {
10361       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
10362     }
10363     arg3 = static_cast< double >(val3);
10364     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10365     if (!SWIG_IsOK(ecode4)) {
10366       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
10367     }
10368     arg4 = static_cast< double >(val4);
10369     {
10370       CPLErrorReset();
10371       result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
10372       CPLErr eclass = CPLGetLastErrorType();
10373       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10374         do_confess( CPLGetLastErrorMsg(), 0 );
10375 
10376 
10377 
10378 
10379 
10380       }
10381 
10382 
10383       /*
10384           Make warnings regular Perl warnings. This duplicates the warning
10385           message if DontUseExceptions() is in effect (it is not by default).
10386           */
10387       if ( eclass == CE_Warning ) {
10388         warn( CPLGetLastErrorMsg(), "%s" );
10389       }
10390 
10391 
10392     }
10393     {
10394       /* %typemap(out) OGRErr */
10395       if ( result != 0 ) {
10396         const char *err = CPLGetLastErrorMsg();
10397         if (err and *err) do_confess(err, 0); /* this is usually better */
10398         do_confess( OGRErrMessages(result), 1 );
10399       }
10400     }
10401 
10402 
10403 
10404 
10405     XSRETURN(argvi);
10406   fail:
10407 
10408 
10409 
10410 
10411     SWIG_croak_null();
10412   }
10413 }
10414 
10415 
XS(_wrap_SpatialReference_SetStereographic)10416 XS(_wrap_SpatialReference_SetStereographic) {
10417   {
10418     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10419     double arg2 ;
10420     double arg3 ;
10421     double arg4 ;
10422     double arg5 ;
10423     double arg6 ;
10424     void *argp1 = 0 ;
10425     int res1 = 0 ;
10426     double val2 ;
10427     int ecode2 = 0 ;
10428     double val3 ;
10429     int ecode3 = 0 ;
10430     double val4 ;
10431     int ecode4 = 0 ;
10432     double val5 ;
10433     int ecode5 = 0 ;
10434     double val6 ;
10435     int ecode6 = 0 ;
10436     int argvi = 0;
10437     OGRErr result;
10438     dXSARGS;
10439 
10440     if ((items < 6) || (items > 6)) {
10441       SWIG_croak("Usage: SpatialReference_SetStereographic(self,clat,clong,scale,fe,fn);");
10442     }
10443     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10444     if (!SWIG_IsOK(res1)) {
10445       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10446     }
10447     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10448     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10449     if (!SWIG_IsOK(ecode2)) {
10450       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
10451     }
10452     arg2 = static_cast< double >(val2);
10453     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10454     if (!SWIG_IsOK(ecode3)) {
10455       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
10456     }
10457     arg3 = static_cast< double >(val3);
10458     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10459     if (!SWIG_IsOK(ecode4)) {
10460       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
10461     }
10462     arg4 = static_cast< double >(val4);
10463     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10464     if (!SWIG_IsOK(ecode5)) {
10465       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
10466     }
10467     arg5 = static_cast< double >(val5);
10468     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
10469     if (!SWIG_IsOK(ecode6)) {
10470       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
10471     }
10472     arg6 = static_cast< double >(val6);
10473     {
10474       CPLErrorReset();
10475       result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
10476       CPLErr eclass = CPLGetLastErrorType();
10477       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10478         do_confess( CPLGetLastErrorMsg(), 0 );
10479 
10480 
10481 
10482 
10483 
10484       }
10485 
10486 
10487       /*
10488           Make warnings regular Perl warnings. This duplicates the warning
10489           message if DontUseExceptions() is in effect (it is not by default).
10490           */
10491       if ( eclass == CE_Warning ) {
10492         warn( CPLGetLastErrorMsg(), "%s" );
10493       }
10494 
10495 
10496     }
10497     {
10498       /* %typemap(out) OGRErr */
10499       if ( result != 0 ) {
10500         const char *err = CPLGetLastErrorMsg();
10501         if (err and *err) do_confess(err, 0); /* this is usually better */
10502         do_confess( OGRErrMessages(result), 1 );
10503       }
10504     }
10505 
10506 
10507 
10508 
10509 
10510 
10511     XSRETURN(argvi);
10512   fail:
10513 
10514 
10515 
10516 
10517 
10518 
10519     SWIG_croak_null();
10520   }
10521 }
10522 
10523 
XS(_wrap_SpatialReference_SetSOC)10524 XS(_wrap_SpatialReference_SetSOC) {
10525   {
10526     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10527     double arg2 ;
10528     double arg3 ;
10529     double arg4 ;
10530     double arg5 ;
10531     void *argp1 = 0 ;
10532     int res1 = 0 ;
10533     double val2 ;
10534     int ecode2 = 0 ;
10535     double val3 ;
10536     int ecode3 = 0 ;
10537     double val4 ;
10538     int ecode4 = 0 ;
10539     double val5 ;
10540     int ecode5 = 0 ;
10541     int argvi = 0;
10542     OGRErr result;
10543     dXSARGS;
10544 
10545     if ((items < 5) || (items > 5)) {
10546       SWIG_croak("Usage: SpatialReference_SetSOC(self,latitudeoforigin,cm,fe,fn);");
10547     }
10548     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10549     if (!SWIG_IsOK(res1)) {
10550       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10551     }
10552     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10553     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10554     if (!SWIG_IsOK(ecode2)) {
10555       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
10556     }
10557     arg2 = static_cast< double >(val2);
10558     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10559     if (!SWIG_IsOK(ecode3)) {
10560       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
10561     }
10562     arg3 = static_cast< double >(val3);
10563     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10564     if (!SWIG_IsOK(ecode4)) {
10565       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
10566     }
10567     arg4 = static_cast< double >(val4);
10568     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10569     if (!SWIG_IsOK(ecode5)) {
10570       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
10571     }
10572     arg5 = static_cast< double >(val5);
10573     {
10574       CPLErrorReset();
10575       result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
10576       CPLErr eclass = CPLGetLastErrorType();
10577       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10578         do_confess( CPLGetLastErrorMsg(), 0 );
10579 
10580 
10581 
10582 
10583 
10584       }
10585 
10586 
10587       /*
10588           Make warnings regular Perl warnings. This duplicates the warning
10589           message if DontUseExceptions() is in effect (it is not by default).
10590           */
10591       if ( eclass == CE_Warning ) {
10592         warn( CPLGetLastErrorMsg(), "%s" );
10593       }
10594 
10595 
10596     }
10597     {
10598       /* %typemap(out) OGRErr */
10599       if ( result != 0 ) {
10600         const char *err = CPLGetLastErrorMsg();
10601         if (err and *err) do_confess(err, 0); /* this is usually better */
10602         do_confess( OGRErrMessages(result), 1 );
10603       }
10604     }
10605 
10606 
10607 
10608 
10609 
10610     XSRETURN(argvi);
10611   fail:
10612 
10613 
10614 
10615 
10616 
10617     SWIG_croak_null();
10618   }
10619 }
10620 
10621 
XS(_wrap_SpatialReference_SetTM)10622 XS(_wrap_SpatialReference_SetTM) {
10623   {
10624     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10625     double arg2 ;
10626     double arg3 ;
10627     double arg4 ;
10628     double arg5 ;
10629     double arg6 ;
10630     void *argp1 = 0 ;
10631     int res1 = 0 ;
10632     double val2 ;
10633     int ecode2 = 0 ;
10634     double val3 ;
10635     int ecode3 = 0 ;
10636     double val4 ;
10637     int ecode4 = 0 ;
10638     double val5 ;
10639     int ecode5 = 0 ;
10640     double val6 ;
10641     int ecode6 = 0 ;
10642     int argvi = 0;
10643     OGRErr result;
10644     dXSARGS;
10645 
10646     if ((items < 6) || (items > 6)) {
10647       SWIG_croak("Usage: SpatialReference_SetTM(self,clat,clong,scale,fe,fn);");
10648     }
10649     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10650     if (!SWIG_IsOK(res1)) {
10651       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10652     }
10653     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10654     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10655     if (!SWIG_IsOK(ecode2)) {
10656       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
10657     }
10658     arg2 = static_cast< double >(val2);
10659     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10660     if (!SWIG_IsOK(ecode3)) {
10661       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
10662     }
10663     arg3 = static_cast< double >(val3);
10664     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10665     if (!SWIG_IsOK(ecode4)) {
10666       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
10667     }
10668     arg4 = static_cast< double >(val4);
10669     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10670     if (!SWIG_IsOK(ecode5)) {
10671       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
10672     }
10673     arg5 = static_cast< double >(val5);
10674     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
10675     if (!SWIG_IsOK(ecode6)) {
10676       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
10677     }
10678     arg6 = static_cast< double >(val6);
10679     {
10680       CPLErrorReset();
10681       result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
10682       CPLErr eclass = CPLGetLastErrorType();
10683       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10684         do_confess( CPLGetLastErrorMsg(), 0 );
10685 
10686 
10687 
10688 
10689 
10690       }
10691 
10692 
10693       /*
10694           Make warnings regular Perl warnings. This duplicates the warning
10695           message if DontUseExceptions() is in effect (it is not by default).
10696           */
10697       if ( eclass == CE_Warning ) {
10698         warn( CPLGetLastErrorMsg(), "%s" );
10699       }
10700 
10701 
10702     }
10703     {
10704       /* %typemap(out) OGRErr */
10705       if ( result != 0 ) {
10706         const char *err = CPLGetLastErrorMsg();
10707         if (err and *err) do_confess(err, 0); /* this is usually better */
10708         do_confess( OGRErrMessages(result), 1 );
10709       }
10710     }
10711 
10712 
10713 
10714 
10715 
10716 
10717     XSRETURN(argvi);
10718   fail:
10719 
10720 
10721 
10722 
10723 
10724 
10725     SWIG_croak_null();
10726   }
10727 }
10728 
10729 
XS(_wrap_SpatialReference_SetTMVariant)10730 XS(_wrap_SpatialReference_SetTMVariant) {
10731   {
10732     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10733     char *arg2 = (char *) 0 ;
10734     double arg3 ;
10735     double arg4 ;
10736     double arg5 ;
10737     double arg6 ;
10738     double arg7 ;
10739     void *argp1 = 0 ;
10740     int res1 = 0 ;
10741     int res2 ;
10742     char *buf2 = 0 ;
10743     int alloc2 = 0 ;
10744     double val3 ;
10745     int ecode3 = 0 ;
10746     double val4 ;
10747     int ecode4 = 0 ;
10748     double val5 ;
10749     int ecode5 = 0 ;
10750     double val6 ;
10751     int ecode6 = 0 ;
10752     double val7 ;
10753     int ecode7 = 0 ;
10754     int argvi = 0;
10755     OGRErr result;
10756     dXSARGS;
10757 
10758     if ((items < 7) || (items > 7)) {
10759       SWIG_croak("Usage: SpatialReference_SetTMVariant(self,pszVariantName,clat,clong,scale,fe,fn);");
10760     }
10761     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10762     if (!SWIG_IsOK(res1)) {
10763       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10764     }
10765     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10766     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
10767     if (!SWIG_IsOK(res2)) {
10768       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
10769     }
10770     arg2 = reinterpret_cast< char * >(buf2);
10771     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10772     if (!SWIG_IsOK(ecode3)) {
10773       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
10774     }
10775     arg3 = static_cast< double >(val3);
10776     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10777     if (!SWIG_IsOK(ecode4)) {
10778       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
10779     }
10780     arg4 = static_cast< double >(val4);
10781     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10782     if (!SWIG_IsOK(ecode5)) {
10783       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
10784     }
10785     arg5 = static_cast< double >(val5);
10786     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
10787     if (!SWIG_IsOK(ecode6)) {
10788       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
10789     }
10790     arg6 = static_cast< double >(val6);
10791     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
10792     if (!SWIG_IsOK(ecode7)) {
10793       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
10794     }
10795     arg7 = static_cast< double >(val7);
10796     {
10797       CPLErrorReset();
10798       result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
10799       CPLErr eclass = CPLGetLastErrorType();
10800       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10801         do_confess( CPLGetLastErrorMsg(), 0 );
10802 
10803 
10804 
10805 
10806 
10807       }
10808 
10809 
10810       /*
10811           Make warnings regular Perl warnings. This duplicates the warning
10812           message if DontUseExceptions() is in effect (it is not by default).
10813           */
10814       if ( eclass == CE_Warning ) {
10815         warn( CPLGetLastErrorMsg(), "%s" );
10816       }
10817 
10818 
10819     }
10820     {
10821       /* %typemap(out) OGRErr */
10822       if ( result != 0 ) {
10823         const char *err = CPLGetLastErrorMsg();
10824         if (err and *err) do_confess(err, 0); /* this is usually better */
10825         do_confess( OGRErrMessages(result), 1 );
10826       }
10827     }
10828 
10829     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10830 
10831 
10832 
10833 
10834 
10835     XSRETURN(argvi);
10836   fail:
10837 
10838     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10839 
10840 
10841 
10842 
10843 
10844     SWIG_croak_null();
10845   }
10846 }
10847 
10848 
XS(_wrap_SpatialReference_SetTMG)10849 XS(_wrap_SpatialReference_SetTMG) {
10850   {
10851     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10852     double arg2 ;
10853     double arg3 ;
10854     double arg4 ;
10855     double arg5 ;
10856     void *argp1 = 0 ;
10857     int res1 = 0 ;
10858     double val2 ;
10859     int ecode2 = 0 ;
10860     double val3 ;
10861     int ecode3 = 0 ;
10862     double val4 ;
10863     int ecode4 = 0 ;
10864     double val5 ;
10865     int ecode5 = 0 ;
10866     int argvi = 0;
10867     OGRErr result;
10868     dXSARGS;
10869 
10870     if ((items < 5) || (items > 5)) {
10871       SWIG_croak("Usage: SpatialReference_SetTMG(self,clat,clong,fe,fn);");
10872     }
10873     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10874     if (!SWIG_IsOK(res1)) {
10875       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10876     }
10877     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10878     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10879     if (!SWIG_IsOK(ecode2)) {
10880       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
10881     }
10882     arg2 = static_cast< double >(val2);
10883     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10884     if (!SWIG_IsOK(ecode3)) {
10885       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
10886     }
10887     arg3 = static_cast< double >(val3);
10888     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10889     if (!SWIG_IsOK(ecode4)) {
10890       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
10891     }
10892     arg4 = static_cast< double >(val4);
10893     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10894     if (!SWIG_IsOK(ecode5)) {
10895       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
10896     }
10897     arg5 = static_cast< double >(val5);
10898     {
10899       CPLErrorReset();
10900       result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
10901       CPLErr eclass = CPLGetLastErrorType();
10902       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10903         do_confess( CPLGetLastErrorMsg(), 0 );
10904 
10905 
10906 
10907 
10908 
10909       }
10910 
10911 
10912       /*
10913           Make warnings regular Perl warnings. This duplicates the warning
10914           message if DontUseExceptions() is in effect (it is not by default).
10915           */
10916       if ( eclass == CE_Warning ) {
10917         warn( CPLGetLastErrorMsg(), "%s" );
10918       }
10919 
10920 
10921     }
10922     {
10923       /* %typemap(out) OGRErr */
10924       if ( result != 0 ) {
10925         const char *err = CPLGetLastErrorMsg();
10926         if (err and *err) do_confess(err, 0); /* this is usually better */
10927         do_confess( OGRErrMessages(result), 1 );
10928       }
10929     }
10930 
10931 
10932 
10933 
10934 
10935     XSRETURN(argvi);
10936   fail:
10937 
10938 
10939 
10940 
10941 
10942     SWIG_croak_null();
10943   }
10944 }
10945 
10946 
XS(_wrap_SpatialReference_SetTMSO)10947 XS(_wrap_SpatialReference_SetTMSO) {
10948   {
10949     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10950     double arg2 ;
10951     double arg3 ;
10952     double arg4 ;
10953     double arg5 ;
10954     double arg6 ;
10955     void *argp1 = 0 ;
10956     int res1 = 0 ;
10957     double val2 ;
10958     int ecode2 = 0 ;
10959     double val3 ;
10960     int ecode3 = 0 ;
10961     double val4 ;
10962     int ecode4 = 0 ;
10963     double val5 ;
10964     int ecode5 = 0 ;
10965     double val6 ;
10966     int ecode6 = 0 ;
10967     int argvi = 0;
10968     OGRErr result;
10969     dXSARGS;
10970 
10971     if ((items < 6) || (items > 6)) {
10972       SWIG_croak("Usage: SpatialReference_SetTMSO(self,clat,clong,scale,fe,fn);");
10973     }
10974     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
10975     if (!SWIG_IsOK(res1)) {
10976       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10977     }
10978     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10979     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
10980     if (!SWIG_IsOK(ecode2)) {
10981       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
10982     }
10983     arg2 = static_cast< double >(val2);
10984     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
10985     if (!SWIG_IsOK(ecode3)) {
10986       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
10987     }
10988     arg3 = static_cast< double >(val3);
10989     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
10990     if (!SWIG_IsOK(ecode4)) {
10991       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
10992     }
10993     arg4 = static_cast< double >(val4);
10994     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
10995     if (!SWIG_IsOK(ecode5)) {
10996       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
10997     }
10998     arg5 = static_cast< double >(val5);
10999     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
11000     if (!SWIG_IsOK(ecode6)) {
11001       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
11002     }
11003     arg6 = static_cast< double >(val6);
11004     {
11005       CPLErrorReset();
11006       result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
11007       CPLErr eclass = CPLGetLastErrorType();
11008       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11009         do_confess( CPLGetLastErrorMsg(), 0 );
11010 
11011 
11012 
11013 
11014 
11015       }
11016 
11017 
11018       /*
11019           Make warnings regular Perl warnings. This duplicates the warning
11020           message if DontUseExceptions() is in effect (it is not by default).
11021           */
11022       if ( eclass == CE_Warning ) {
11023         warn( CPLGetLastErrorMsg(), "%s" );
11024       }
11025 
11026 
11027     }
11028     {
11029       /* %typemap(out) OGRErr */
11030       if ( result != 0 ) {
11031         const char *err = CPLGetLastErrorMsg();
11032         if (err and *err) do_confess(err, 0); /* this is usually better */
11033         do_confess( OGRErrMessages(result), 1 );
11034       }
11035     }
11036 
11037 
11038 
11039 
11040 
11041 
11042     XSRETURN(argvi);
11043   fail:
11044 
11045 
11046 
11047 
11048 
11049 
11050     SWIG_croak_null();
11051   }
11052 }
11053 
11054 
XS(_wrap_SpatialReference_SetVDG)11055 XS(_wrap_SpatialReference_SetVDG) {
11056   {
11057     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11058     double arg2 ;
11059     double arg3 ;
11060     double arg4 ;
11061     void *argp1 = 0 ;
11062     int res1 = 0 ;
11063     double val2 ;
11064     int ecode2 = 0 ;
11065     double val3 ;
11066     int ecode3 = 0 ;
11067     double val4 ;
11068     int ecode4 = 0 ;
11069     int argvi = 0;
11070     OGRErr result;
11071     dXSARGS;
11072 
11073     if ((items < 4) || (items > 4)) {
11074       SWIG_croak("Usage: SpatialReference_SetVDG(self,clong,fe,fn);");
11075     }
11076     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11077     if (!SWIG_IsOK(res1)) {
11078       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11079     }
11080     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11081     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
11082     if (!SWIG_IsOK(ecode2)) {
11083       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
11084     }
11085     arg2 = static_cast< double >(val2);
11086     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
11087     if (!SWIG_IsOK(ecode3)) {
11088       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
11089     }
11090     arg3 = static_cast< double >(val3);
11091     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
11092     if (!SWIG_IsOK(ecode4)) {
11093       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
11094     }
11095     arg4 = static_cast< double >(val4);
11096     {
11097       CPLErrorReset();
11098       result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
11099       CPLErr eclass = CPLGetLastErrorType();
11100       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11101         do_confess( CPLGetLastErrorMsg(), 0 );
11102 
11103 
11104 
11105 
11106 
11107       }
11108 
11109 
11110       /*
11111           Make warnings regular Perl warnings. This duplicates the warning
11112           message if DontUseExceptions() is in effect (it is not by default).
11113           */
11114       if ( eclass == CE_Warning ) {
11115         warn( CPLGetLastErrorMsg(), "%s" );
11116       }
11117 
11118 
11119     }
11120     {
11121       /* %typemap(out) OGRErr */
11122       if ( result != 0 ) {
11123         const char *err = CPLGetLastErrorMsg();
11124         if (err and *err) do_confess(err, 0); /* this is usually better */
11125         do_confess( OGRErrMessages(result), 1 );
11126       }
11127     }
11128 
11129 
11130 
11131 
11132     XSRETURN(argvi);
11133   fail:
11134 
11135 
11136 
11137 
11138     SWIG_croak_null();
11139   }
11140 }
11141 
11142 
XS(_wrap_SpatialReference_SetVerticalPerspective)11143 XS(_wrap_SpatialReference_SetVerticalPerspective) {
11144   {
11145     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11146     double arg2 ;
11147     double arg3 ;
11148     double arg4 ;
11149     double arg5 ;
11150     double arg6 ;
11151     double arg7 ;
11152     void *argp1 = 0 ;
11153     int res1 = 0 ;
11154     double val2 ;
11155     int ecode2 = 0 ;
11156     double val3 ;
11157     int ecode3 = 0 ;
11158     double val4 ;
11159     int ecode4 = 0 ;
11160     double val5 ;
11161     int ecode5 = 0 ;
11162     double val6 ;
11163     int ecode6 = 0 ;
11164     double val7 ;
11165     int ecode7 = 0 ;
11166     int argvi = 0;
11167     OGRErr result;
11168     dXSARGS;
11169 
11170     if ((items < 7) || (items > 7)) {
11171       SWIG_croak("Usage: SpatialReference_SetVerticalPerspective(self,topoOriginLat,topoOriginLon,topoOriginHeight,viewPointHeight,fe,fn);");
11172     }
11173     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11174     if (!SWIG_IsOK(res1)) {
11175       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11176     }
11177     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11178     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
11179     if (!SWIG_IsOK(ecode2)) {
11180       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "2"" of type '" "double""'");
11181     }
11182     arg2 = static_cast< double >(val2);
11183     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
11184     if (!SWIG_IsOK(ecode3)) {
11185       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "3"" of type '" "double""'");
11186     }
11187     arg3 = static_cast< double >(val3);
11188     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
11189     if (!SWIG_IsOK(ecode4)) {
11190       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "4"" of type '" "double""'");
11191     }
11192     arg4 = static_cast< double >(val4);
11193     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
11194     if (!SWIG_IsOK(ecode5)) {
11195       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "5"" of type '" "double""'");
11196     }
11197     arg5 = static_cast< double >(val5);
11198     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
11199     if (!SWIG_IsOK(ecode6)) {
11200       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "6"" of type '" "double""'");
11201     }
11202     arg6 = static_cast< double >(val6);
11203     ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
11204     if (!SWIG_IsOK(ecode7)) {
11205       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "7"" of type '" "double""'");
11206     }
11207     arg7 = static_cast< double >(val7);
11208     {
11209       CPLErrorReset();
11210       result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
11211       CPLErr eclass = CPLGetLastErrorType();
11212       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11213         do_confess( CPLGetLastErrorMsg(), 0 );
11214 
11215 
11216 
11217 
11218 
11219       }
11220 
11221 
11222       /*
11223           Make warnings regular Perl warnings. This duplicates the warning
11224           message if DontUseExceptions() is in effect (it is not by default).
11225           */
11226       if ( eclass == CE_Warning ) {
11227         warn( CPLGetLastErrorMsg(), "%s" );
11228       }
11229 
11230 
11231     }
11232     {
11233       /* %typemap(out) OGRErr */
11234       if ( result != 0 ) {
11235         const char *err = CPLGetLastErrorMsg();
11236         if (err and *err) do_confess(err, 0); /* this is usually better */
11237         do_confess( OGRErrMessages(result), 1 );
11238       }
11239     }
11240 
11241 
11242 
11243 
11244 
11245 
11246 
11247     XSRETURN(argvi);
11248   fail:
11249 
11250 
11251 
11252 
11253 
11254 
11255 
11256     SWIG_croak_null();
11257   }
11258 }
11259 
11260 
XS(_wrap_SpatialReference_SetWellKnownGeogCS)11261 XS(_wrap_SpatialReference_SetWellKnownGeogCS) {
11262   {
11263     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11264     char *arg2 = (char *) 0 ;
11265     void *argp1 = 0 ;
11266     int res1 = 0 ;
11267     U8 *tmpbuf2 = NULL ;
11268     int argvi = 0;
11269     OGRErr result;
11270     dXSARGS;
11271 
11272     if ((items < 2) || (items > 2)) {
11273       SWIG_croak("Usage: SpatialReference_SetWellKnownGeogCS(self,name);");
11274     }
11275     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11276     if (!SWIG_IsOK(res1)) {
11277       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11278     }
11279     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11280     {
11281       /* %typemap(in,numinputs=1) (const char* name) */
11282       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
11283     }
11284     {
11285       if (!arg2) {
11286         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11287       }
11288     }
11289     {
11290       CPLErrorReset();
11291       result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
11292       CPLErr eclass = CPLGetLastErrorType();
11293       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11294         do_confess( CPLGetLastErrorMsg(), 0 );
11295 
11296 
11297 
11298 
11299 
11300       }
11301 
11302 
11303       /*
11304           Make warnings regular Perl warnings. This duplicates the warning
11305           message if DontUseExceptions() is in effect (it is not by default).
11306           */
11307       if ( eclass == CE_Warning ) {
11308         warn( CPLGetLastErrorMsg(), "%s" );
11309       }
11310 
11311 
11312     }
11313     {
11314       /* %typemap(out) OGRErr */
11315       if ( result != 0 ) {
11316         const char *err = CPLGetLastErrorMsg();
11317         if (err and *err) do_confess(err, 0); /* this is usually better */
11318         do_confess( OGRErrMessages(result), 1 );
11319       }
11320     }
11321 
11322     {
11323       /* %typemap(freearg) (const char* name) */
11324       if (tmpbuf2) Safefree(tmpbuf2);
11325     }
11326     XSRETURN(argvi);
11327   fail:
11328 
11329     {
11330       /* %typemap(freearg) (const char* name) */
11331       if (tmpbuf2) Safefree(tmpbuf2);
11332     }
11333     SWIG_croak_null();
11334   }
11335 }
11336 
11337 
XS(_wrap_SpatialReference_SetFromUserInput)11338 XS(_wrap_SpatialReference_SetFromUserInput) {
11339   {
11340     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11341     char *arg2 = (char *) 0 ;
11342     void *argp1 = 0 ;
11343     int res1 = 0 ;
11344     U8 *tmpbuf2 = NULL ;
11345     int argvi = 0;
11346     OGRErr result;
11347     dXSARGS;
11348 
11349     if ((items < 2) || (items > 2)) {
11350       SWIG_croak("Usage: SpatialReference_SetFromUserInput(self,name);");
11351     }
11352     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11353     if (!SWIG_IsOK(res1)) {
11354       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11355     }
11356     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11357     {
11358       /* %typemap(in,numinputs=1) (const char* name) */
11359       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
11360     }
11361     {
11362       if (!arg2) {
11363         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11364       }
11365     }
11366     {
11367       CPLErrorReset();
11368       result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2);
11369       CPLErr eclass = CPLGetLastErrorType();
11370       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11371         do_confess( CPLGetLastErrorMsg(), 0 );
11372 
11373 
11374 
11375 
11376 
11377       }
11378 
11379 
11380       /*
11381           Make warnings regular Perl warnings. This duplicates the warning
11382           message if DontUseExceptions() is in effect (it is not by default).
11383           */
11384       if ( eclass == CE_Warning ) {
11385         warn( CPLGetLastErrorMsg(), "%s" );
11386       }
11387 
11388 
11389     }
11390     {
11391       /* %typemap(out) OGRErr */
11392       if ( result != 0 ) {
11393         const char *err = CPLGetLastErrorMsg();
11394         if (err and *err) do_confess(err, 0); /* this is usually better */
11395         do_confess( OGRErrMessages(result), 1 );
11396       }
11397     }
11398 
11399     {
11400       /* %typemap(freearg) (const char* name) */
11401       if (tmpbuf2) Safefree(tmpbuf2);
11402     }
11403     XSRETURN(argvi);
11404   fail:
11405 
11406     {
11407       /* %typemap(freearg) (const char* name) */
11408       if (tmpbuf2) Safefree(tmpbuf2);
11409     }
11410     SWIG_croak_null();
11411   }
11412 }
11413 
11414 
XS(_wrap_SpatialReference_CopyGeogCSFrom)11415 XS(_wrap_SpatialReference_CopyGeogCSFrom) {
11416   {
11417     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11418     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
11419     void *argp1 = 0 ;
11420     int res1 = 0 ;
11421     void *argp2 = 0 ;
11422     int res2 = 0 ;
11423     int argvi = 0;
11424     OGRErr result;
11425     dXSARGS;
11426 
11427     if ((items < 2) || (items > 2)) {
11428       SWIG_croak("Usage: SpatialReference_CopyGeogCSFrom(self,rhs);");
11429     }
11430     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11431     if (!SWIG_IsOK(res1)) {
11432       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11433     }
11434     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11435     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11436     if (!SWIG_IsOK(res2)) {
11437       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
11438     }
11439     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
11440     {
11441       if (!arg2) {
11442         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11443       }
11444     }
11445     {
11446       CPLErrorReset();
11447       result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
11448       CPLErr eclass = CPLGetLastErrorType();
11449       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11450         do_confess( CPLGetLastErrorMsg(), 0 );
11451 
11452 
11453 
11454 
11455 
11456       }
11457 
11458 
11459       /*
11460           Make warnings regular Perl warnings. This duplicates the warning
11461           message if DontUseExceptions() is in effect (it is not by default).
11462           */
11463       if ( eclass == CE_Warning ) {
11464         warn( CPLGetLastErrorMsg(), "%s" );
11465       }
11466 
11467 
11468     }
11469     {
11470       /* %typemap(out) OGRErr */
11471       if ( result != 0 ) {
11472         const char *err = CPLGetLastErrorMsg();
11473         if (err and *err) do_confess(err, 0); /* this is usually better */
11474         do_confess( OGRErrMessages(result), 1 );
11475       }
11476     }
11477 
11478 
11479     XSRETURN(argvi);
11480   fail:
11481 
11482 
11483     SWIG_croak_null();
11484   }
11485 }
11486 
11487 
XS(_wrap_SpatialReference_SetTOWGS84)11488 XS(_wrap_SpatialReference_SetTOWGS84) {
11489   {
11490     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11491     double arg2 ;
11492     double arg3 ;
11493     double arg4 ;
11494     double arg5 = (double) 0.0 ;
11495     double arg6 = (double) 0.0 ;
11496     double arg7 = (double) 0.0 ;
11497     double arg8 = (double) 0.0 ;
11498     void *argp1 = 0 ;
11499     int res1 = 0 ;
11500     double val2 ;
11501     int ecode2 = 0 ;
11502     double val3 ;
11503     int ecode3 = 0 ;
11504     double val4 ;
11505     int ecode4 = 0 ;
11506     double val5 ;
11507     int ecode5 = 0 ;
11508     double val6 ;
11509     int ecode6 = 0 ;
11510     double val7 ;
11511     int ecode7 = 0 ;
11512     double val8 ;
11513     int ecode8 = 0 ;
11514     int argvi = 0;
11515     OGRErr result;
11516     dXSARGS;
11517 
11518     if ((items < 4) || (items > 8)) {
11519       SWIG_croak("Usage: SpatialReference_SetTOWGS84(self,p1,p2,p3,p4,p5,p6,p7);");
11520     }
11521     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11522     if (!SWIG_IsOK(res1)) {
11523       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11524     }
11525     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11526     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
11527     if (!SWIG_IsOK(ecode2)) {
11528       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
11529     }
11530     arg2 = static_cast< double >(val2);
11531     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
11532     if (!SWIG_IsOK(ecode3)) {
11533       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
11534     }
11535     arg3 = static_cast< double >(val3);
11536     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
11537     if (!SWIG_IsOK(ecode4)) {
11538       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
11539     }
11540     arg4 = static_cast< double >(val4);
11541     if (items > 4) {
11542       ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
11543       if (!SWIG_IsOK(ecode5)) {
11544         SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
11545       }
11546       arg5 = static_cast< double >(val5);
11547     }
11548     if (items > 5) {
11549       ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
11550       if (!SWIG_IsOK(ecode6)) {
11551         SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
11552       }
11553       arg6 = static_cast< double >(val6);
11554     }
11555     if (items > 6) {
11556       ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
11557       if (!SWIG_IsOK(ecode7)) {
11558         SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
11559       }
11560       arg7 = static_cast< double >(val7);
11561     }
11562     if (items > 7) {
11563       ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
11564       if (!SWIG_IsOK(ecode8)) {
11565         SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
11566       }
11567       arg8 = static_cast< double >(val8);
11568     }
11569     {
11570       CPLErrorReset();
11571       result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
11572       CPLErr eclass = CPLGetLastErrorType();
11573       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11574         do_confess( CPLGetLastErrorMsg(), 0 );
11575 
11576 
11577 
11578 
11579 
11580       }
11581 
11582 
11583       /*
11584           Make warnings regular Perl warnings. This duplicates the warning
11585           message if DontUseExceptions() is in effect (it is not by default).
11586           */
11587       if ( eclass == CE_Warning ) {
11588         warn( CPLGetLastErrorMsg(), "%s" );
11589       }
11590 
11591 
11592     }
11593     {
11594       /* %typemap(out) OGRErr */
11595       if ( result != 0 ) {
11596         const char *err = CPLGetLastErrorMsg();
11597         if (err and *err) do_confess(err, 0); /* this is usually better */
11598         do_confess( OGRErrMessages(result), 1 );
11599       }
11600     }
11601 
11602 
11603 
11604 
11605 
11606 
11607 
11608 
11609     XSRETURN(argvi);
11610   fail:
11611 
11612 
11613 
11614 
11615 
11616 
11617 
11618 
11619     SWIG_croak_null();
11620   }
11621 }
11622 
11623 
XS(_wrap_SpatialReference_HasTOWGS84)11624 XS(_wrap_SpatialReference_HasTOWGS84) {
11625   {
11626     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11627     void *argp1 = 0 ;
11628     int res1 = 0 ;
11629     int argvi = 0;
11630     bool result;
11631     dXSARGS;
11632 
11633     if ((items < 1) || (items > 1)) {
11634       SWIG_croak("Usage: SpatialReference_HasTOWGS84(self);");
11635     }
11636     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11637     if (!SWIG_IsOK(res1)) {
11638       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11639     }
11640     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11641     {
11642       CPLErrorReset();
11643       result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
11644       CPLErr eclass = CPLGetLastErrorType();
11645       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11646         do_confess( CPLGetLastErrorMsg(), 0 );
11647 
11648 
11649 
11650 
11651 
11652       }
11653 
11654 
11655       /*
11656           Make warnings regular Perl warnings. This duplicates the warning
11657           message if DontUseExceptions() is in effect (it is not by default).
11658           */
11659       if ( eclass == CE_Warning ) {
11660         warn( CPLGetLastErrorMsg(), "%s" );
11661       }
11662 
11663 
11664     }
11665     ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
11666 
11667     XSRETURN(argvi);
11668   fail:
11669 
11670     SWIG_croak_null();
11671   }
11672 }
11673 
11674 
XS(_wrap_SpatialReference_GetTOWGS84)11675 XS(_wrap_SpatialReference_GetTOWGS84) {
11676   {
11677     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11678     double *arg2 ;
11679     void *argp1 = 0 ;
11680     int res1 = 0 ;
11681     double argout2[7] ;
11682     int argvi = 0;
11683     OGRErr result;
11684     dXSARGS;
11685 
11686     {
11687       /* %typemap(in,numinputs=0) (double argout2[ANY]) */
11688       arg2 = argout2;
11689     }
11690     if ((items < 1) || (items > 1)) {
11691       SWIG_croak("Usage: SpatialReference_GetTOWGS84(self);");
11692     }
11693     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11694     if (!SWIG_IsOK(res1)) {
11695       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11696     }
11697     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11698     {
11699       CPLErrorReset();
11700       result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
11701       CPLErr eclass = CPLGetLastErrorType();
11702       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11703         do_confess( CPLGetLastErrorMsg(), 0 );
11704 
11705 
11706 
11707 
11708 
11709       }
11710 
11711 
11712       /*
11713           Make warnings regular Perl warnings. This duplicates the warning
11714           message if DontUseExceptions() is in effect (it is not by default).
11715           */
11716       if ( eclass == CE_Warning ) {
11717         warn( CPLGetLastErrorMsg(), "%s" );
11718       }
11719 
11720 
11721     }
11722     {
11723       /* %typemap(out) OGRErr */
11724       if ( result != 0 ) {
11725         const char *err = CPLGetLastErrorMsg();
11726         if (err and *err) do_confess(err, 0); /* this is usually better */
11727         do_confess( OGRErrMessages(result), 1 );
11728       }
11729     }
11730     {
11731       /* %typemap(argout) (double argout[ANY]) */
11732       if (GIMME_V == G_ARRAY) {
11733         /* return a list */
11734         int i;
11735         EXTEND(SP, argvi+7-items+1);
11736         for (i = 0; i < 7; i++)
11737         ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
11738       } else {
11739         ST(argvi) = CreateArrayFromDoubleArray( arg2, 7 );
11740         argvi++;
11741       }
11742     }
11743 
11744 
11745     XSRETURN(argvi);
11746   fail:
11747 
11748 
11749     SWIG_croak_null();
11750   }
11751 }
11752 
11753 
XS(_wrap_SpatialReference_AddGuessedTOWGS84)11754 XS(_wrap_SpatialReference_AddGuessedTOWGS84) {
11755   {
11756     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11757     void *argp1 = 0 ;
11758     int res1 = 0 ;
11759     int argvi = 0;
11760     OGRErr result;
11761     dXSARGS;
11762 
11763     if ((items < 1) || (items > 1)) {
11764       SWIG_croak("Usage: SpatialReference_AddGuessedTOWGS84(self);");
11765     }
11766     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11767     if (!SWIG_IsOK(res1)) {
11768       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AddGuessedTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11769     }
11770     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11771     {
11772       CPLErrorReset();
11773       result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
11774       CPLErr eclass = CPLGetLastErrorType();
11775       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11776         do_confess( CPLGetLastErrorMsg(), 0 );
11777 
11778 
11779 
11780 
11781 
11782       }
11783 
11784 
11785       /*
11786           Make warnings regular Perl warnings. This duplicates the warning
11787           message if DontUseExceptions() is in effect (it is not by default).
11788           */
11789       if ( eclass == CE_Warning ) {
11790         warn( CPLGetLastErrorMsg(), "%s" );
11791       }
11792 
11793 
11794     }
11795     {
11796       /* %typemap(out) OGRErr */
11797       if ( result != 0 ) {
11798         const char *err = CPLGetLastErrorMsg();
11799         if (err and *err) do_confess(err, 0); /* this is usually better */
11800         do_confess( OGRErrMessages(result), 1 );
11801       }
11802     }
11803 
11804     XSRETURN(argvi);
11805   fail:
11806 
11807     SWIG_croak_null();
11808   }
11809 }
11810 
11811 
XS(_wrap_SpatialReference_SetLocalCS)11812 XS(_wrap_SpatialReference_SetLocalCS) {
11813   {
11814     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11815     char *arg2 = (char *) 0 ;
11816     void *argp1 = 0 ;
11817     int res1 = 0 ;
11818     int res2 ;
11819     char *buf2 = 0 ;
11820     int alloc2 = 0 ;
11821     int argvi = 0;
11822     OGRErr result;
11823     dXSARGS;
11824 
11825     if ((items < 2) || (items > 2)) {
11826       SWIG_croak("Usage: SpatialReference_SetLocalCS(self,pszName);");
11827     }
11828     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11829     if (!SWIG_IsOK(res1)) {
11830       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11831     }
11832     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11833     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
11834     if (!SWIG_IsOK(res2)) {
11835       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
11836     }
11837     arg2 = reinterpret_cast< char * >(buf2);
11838     {
11839       CPLErrorReset();
11840       result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
11841       CPLErr eclass = CPLGetLastErrorType();
11842       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11843         do_confess( CPLGetLastErrorMsg(), 0 );
11844 
11845 
11846 
11847 
11848 
11849       }
11850 
11851 
11852       /*
11853           Make warnings regular Perl warnings. This duplicates the warning
11854           message if DontUseExceptions() is in effect (it is not by default).
11855           */
11856       if ( eclass == CE_Warning ) {
11857         warn( CPLGetLastErrorMsg(), "%s" );
11858       }
11859 
11860 
11861     }
11862     {
11863       /* %typemap(out) OGRErr */
11864       if ( result != 0 ) {
11865         const char *err = CPLGetLastErrorMsg();
11866         if (err and *err) do_confess(err, 0); /* this is usually better */
11867         do_confess( OGRErrMessages(result), 1 );
11868       }
11869     }
11870 
11871     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11872     XSRETURN(argvi);
11873   fail:
11874 
11875     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11876     SWIG_croak_null();
11877   }
11878 }
11879 
11880 
XS(_wrap_SpatialReference_SetGeogCS)11881 XS(_wrap_SpatialReference_SetGeogCS) {
11882   {
11883     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11884     char *arg2 = (char *) 0 ;
11885     char *arg3 = (char *) 0 ;
11886     char *arg4 = (char *) 0 ;
11887     double arg5 ;
11888     double arg6 ;
11889     char *arg7 = (char *) "Greenwich" ;
11890     double arg8 = (double) 0.0 ;
11891     char *arg9 = (char *) "degree" ;
11892     double arg10 = (double) 0.0174532925199433 ;
11893     void *argp1 = 0 ;
11894     int res1 = 0 ;
11895     int res2 ;
11896     char *buf2 = 0 ;
11897     int alloc2 = 0 ;
11898     int res3 ;
11899     char *buf3 = 0 ;
11900     int alloc3 = 0 ;
11901     int res4 ;
11902     char *buf4 = 0 ;
11903     int alloc4 = 0 ;
11904     double val5 ;
11905     int ecode5 = 0 ;
11906     double val6 ;
11907     int ecode6 = 0 ;
11908     int res7 ;
11909     char *buf7 = 0 ;
11910     int alloc7 = 0 ;
11911     double val8 ;
11912     int ecode8 = 0 ;
11913     int res9 ;
11914     char *buf9 = 0 ;
11915     int alloc9 = 0 ;
11916     double val10 ;
11917     int ecode10 = 0 ;
11918     int argvi = 0;
11919     OGRErr result;
11920     dXSARGS;
11921 
11922     if ((items < 6) || (items > 10)) {
11923       SWIG_croak("Usage: SpatialReference_SetGeogCS(self,pszGeogName,pszDatumName,pszEllipsoidName,dfSemiMajor,dfInvFlattening,pszPMName,dfPMOffset,pszUnits,dfConvertToRadians);");
11924     }
11925     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
11926     if (!SWIG_IsOK(res1)) {
11927       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11928     }
11929     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11930     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
11931     if (!SWIG_IsOK(res2)) {
11932       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
11933     }
11934     arg2 = reinterpret_cast< char * >(buf2);
11935     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
11936     if (!SWIG_IsOK(res3)) {
11937       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
11938     }
11939     arg3 = reinterpret_cast< char * >(buf3);
11940     res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
11941     if (!SWIG_IsOK(res4)) {
11942       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
11943     }
11944     arg4 = reinterpret_cast< char * >(buf4);
11945     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
11946     if (!SWIG_IsOK(ecode5)) {
11947       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
11948     }
11949     arg5 = static_cast< double >(val5);
11950     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
11951     if (!SWIG_IsOK(ecode6)) {
11952       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
11953     }
11954     arg6 = static_cast< double >(val6);
11955     if (items > 6) {
11956       res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7);
11957       if (!SWIG_IsOK(res7)) {
11958         SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
11959       }
11960       arg7 = reinterpret_cast< char * >(buf7);
11961     }
11962     if (items > 7) {
11963       ecode8 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
11964       if (!SWIG_IsOK(ecode8)) {
11965         SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
11966       }
11967       arg8 = static_cast< double >(val8);
11968     }
11969     if (items > 8) {
11970       res9 = SWIG_AsCharPtrAndSize(ST(8), &buf9, NULL, &alloc9);
11971       if (!SWIG_IsOK(res9)) {
11972         SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
11973       }
11974       arg9 = reinterpret_cast< char * >(buf9);
11975     }
11976     if (items > 9) {
11977       ecode10 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
11978       if (!SWIG_IsOK(ecode10)) {
11979         SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
11980       }
11981       arg10 = static_cast< double >(val10);
11982     }
11983     {
11984       CPLErrorReset();
11985       result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
11986       CPLErr eclass = CPLGetLastErrorType();
11987       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11988         do_confess( CPLGetLastErrorMsg(), 0 );
11989 
11990 
11991 
11992 
11993 
11994       }
11995 
11996 
11997       /*
11998           Make warnings regular Perl warnings. This duplicates the warning
11999           message if DontUseExceptions() is in effect (it is not by default).
12000           */
12001       if ( eclass == CE_Warning ) {
12002         warn( CPLGetLastErrorMsg(), "%s" );
12003       }
12004 
12005 
12006     }
12007     {
12008       /* %typemap(out) OGRErr */
12009       if ( result != 0 ) {
12010         const char *err = CPLGetLastErrorMsg();
12011         if (err and *err) do_confess(err, 0); /* this is usually better */
12012         do_confess( OGRErrMessages(result), 1 );
12013       }
12014     }
12015 
12016     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12017     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12018     if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
12019 
12020 
12021     if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
12022 
12023     if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
12024 
12025     XSRETURN(argvi);
12026   fail:
12027 
12028     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12029     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12030     if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
12031 
12032 
12033     if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
12034 
12035     if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
12036 
12037     SWIG_croak_null();
12038   }
12039 }
12040 
12041 
XS(_wrap_SpatialReference_SetProjCS)12042 XS(_wrap_SpatialReference_SetProjCS) {
12043   {
12044     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12045     char *arg2 = (char *) "unnamed" ;
12046     void *argp1 = 0 ;
12047     int res1 = 0 ;
12048     U8 *tmpbuf2 = NULL ;
12049     int argvi = 0;
12050     OGRErr result;
12051     dXSARGS;
12052 
12053     if ((items < 1) || (items > 2)) {
12054       SWIG_croak("Usage: SpatialReference_SetProjCS(self,name);");
12055     }
12056     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12057     if (!SWIG_IsOK(res1)) {
12058       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12059     }
12060     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12061     if (items > 1) {
12062       {
12063         /* %typemap(in,numinputs=1) (const char* name) */
12064         arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
12065       }
12066     }
12067     {
12068       if (!arg2) {
12069         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12070       }
12071     }
12072     {
12073       CPLErrorReset();
12074       result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
12075       CPLErr eclass = CPLGetLastErrorType();
12076       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12077         do_confess( CPLGetLastErrorMsg(), 0 );
12078 
12079 
12080 
12081 
12082 
12083       }
12084 
12085 
12086       /*
12087           Make warnings regular Perl warnings. This duplicates the warning
12088           message if DontUseExceptions() is in effect (it is not by default).
12089           */
12090       if ( eclass == CE_Warning ) {
12091         warn( CPLGetLastErrorMsg(), "%s" );
12092       }
12093 
12094 
12095     }
12096     {
12097       /* %typemap(out) OGRErr */
12098       if ( result != 0 ) {
12099         const char *err = CPLGetLastErrorMsg();
12100         if (err and *err) do_confess(err, 0); /* this is usually better */
12101         do_confess( OGRErrMessages(result), 1 );
12102       }
12103     }
12104 
12105     {
12106       /* %typemap(freearg) (const char* name) */
12107       if (tmpbuf2) Safefree(tmpbuf2);
12108     }
12109     XSRETURN(argvi);
12110   fail:
12111 
12112     {
12113       /* %typemap(freearg) (const char* name) */
12114       if (tmpbuf2) Safefree(tmpbuf2);
12115     }
12116     SWIG_croak_null();
12117   }
12118 }
12119 
12120 
XS(_wrap_SpatialReference_SetGeocCS)12121 XS(_wrap_SpatialReference_SetGeocCS) {
12122   {
12123     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12124     char *arg2 = (char *) "unnamed" ;
12125     void *argp1 = 0 ;
12126     int res1 = 0 ;
12127     U8 *tmpbuf2 = NULL ;
12128     int argvi = 0;
12129     OGRErr result;
12130     dXSARGS;
12131 
12132     if ((items < 1) || (items > 2)) {
12133       SWIG_croak("Usage: SpatialReference_SetGeocCS(self,name);");
12134     }
12135     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12136     if (!SWIG_IsOK(res1)) {
12137       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12138     }
12139     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12140     if (items > 1) {
12141       {
12142         /* %typemap(in,numinputs=1) (const char* name) */
12143         arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
12144       }
12145     }
12146     {
12147       if (!arg2) {
12148         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12149       }
12150     }
12151     {
12152       CPLErrorReset();
12153       result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
12154       CPLErr eclass = CPLGetLastErrorType();
12155       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12156         do_confess( CPLGetLastErrorMsg(), 0 );
12157 
12158 
12159 
12160 
12161 
12162       }
12163 
12164 
12165       /*
12166           Make warnings regular Perl warnings. This duplicates the warning
12167           message if DontUseExceptions() is in effect (it is not by default).
12168           */
12169       if ( eclass == CE_Warning ) {
12170         warn( CPLGetLastErrorMsg(), "%s" );
12171       }
12172 
12173 
12174     }
12175     {
12176       /* %typemap(out) OGRErr */
12177       if ( result != 0 ) {
12178         const char *err = CPLGetLastErrorMsg();
12179         if (err and *err) do_confess(err, 0); /* this is usually better */
12180         do_confess( OGRErrMessages(result), 1 );
12181       }
12182     }
12183 
12184     {
12185       /* %typemap(freearg) (const char* name) */
12186       if (tmpbuf2) Safefree(tmpbuf2);
12187     }
12188     XSRETURN(argvi);
12189   fail:
12190 
12191     {
12192       /* %typemap(freearg) (const char* name) */
12193       if (tmpbuf2) Safefree(tmpbuf2);
12194     }
12195     SWIG_croak_null();
12196   }
12197 }
12198 
12199 
XS(_wrap_SpatialReference_SetVertCS)12200 XS(_wrap_SpatialReference_SetVertCS) {
12201   {
12202     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12203     char *arg2 = (char *) "unnamed" ;
12204     char *arg3 = (char *) "unnamed" ;
12205     int arg4 = (int) 0 ;
12206     void *argp1 = 0 ;
12207     int res1 = 0 ;
12208     int res2 ;
12209     char *buf2 = 0 ;
12210     int alloc2 = 0 ;
12211     int res3 ;
12212     char *buf3 = 0 ;
12213     int alloc3 = 0 ;
12214     int val4 ;
12215     int ecode4 = 0 ;
12216     int argvi = 0;
12217     OGRErr result;
12218     dXSARGS;
12219 
12220     if ((items < 1) || (items > 4)) {
12221       SWIG_croak("Usage: SpatialReference_SetVertCS(self,VertCSName,VertDatumName,VertDatumType);");
12222     }
12223     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12224     if (!SWIG_IsOK(res1)) {
12225       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12226     }
12227     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12228     if (items > 1) {
12229       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
12230       if (!SWIG_IsOK(res2)) {
12231         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
12232       }
12233       arg2 = reinterpret_cast< char * >(buf2);
12234     }
12235     if (items > 2) {
12236       res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
12237       if (!SWIG_IsOK(res3)) {
12238         SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
12239       }
12240       arg3 = reinterpret_cast< char * >(buf3);
12241     }
12242     if (items > 3) {
12243       ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
12244       if (!SWIG_IsOK(ecode4)) {
12245         SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
12246       }
12247       arg4 = static_cast< int >(val4);
12248     }
12249     {
12250       CPLErrorReset();
12251       result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
12252       CPLErr eclass = CPLGetLastErrorType();
12253       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12254         do_confess( CPLGetLastErrorMsg(), 0 );
12255 
12256 
12257 
12258 
12259 
12260       }
12261 
12262 
12263       /*
12264           Make warnings regular Perl warnings. This duplicates the warning
12265           message if DontUseExceptions() is in effect (it is not by default).
12266           */
12267       if ( eclass == CE_Warning ) {
12268         warn( CPLGetLastErrorMsg(), "%s" );
12269       }
12270 
12271 
12272     }
12273     {
12274       /* %typemap(out) OGRErr */
12275       if ( result != 0 ) {
12276         const char *err = CPLGetLastErrorMsg();
12277         if (err and *err) do_confess(err, 0); /* this is usually better */
12278         do_confess( OGRErrMessages(result), 1 );
12279       }
12280     }
12281 
12282     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12283     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12284 
12285     XSRETURN(argvi);
12286   fail:
12287 
12288     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12289     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12290 
12291     SWIG_croak_null();
12292   }
12293 }
12294 
12295 
XS(_wrap_SpatialReference_SetCompoundCS)12296 XS(_wrap_SpatialReference_SetCompoundCS) {
12297   {
12298     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12299     char *arg2 = (char *) 0 ;
12300     OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
12301     OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
12302     void *argp1 = 0 ;
12303     int res1 = 0 ;
12304     U8 *tmpbuf2 = NULL ;
12305     void *argp3 = 0 ;
12306     int res3 = 0 ;
12307     void *argp4 = 0 ;
12308     int res4 = 0 ;
12309     int argvi = 0;
12310     OGRErr result;
12311     dXSARGS;
12312 
12313     if ((items < 4) || (items > 4)) {
12314       SWIG_croak("Usage: SpatialReference_SetCompoundCS(self,name,horizcs,vertcs);");
12315     }
12316     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12317     if (!SWIG_IsOK(res1)) {
12318       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12319     }
12320     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12321     {
12322       /* %typemap(in,numinputs=1) (const char* name) */
12323       arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
12324     }
12325     res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12326     if (!SWIG_IsOK(res3)) {
12327       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
12328     }
12329     arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
12330     res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12331     if (!SWIG_IsOK(res4)) {
12332       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
12333     }
12334     arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
12335     {
12336       if (!arg2) {
12337         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12338       }
12339     }
12340     {
12341       if (!arg3) {
12342         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12343       }
12344     }
12345     {
12346       if (!arg4) {
12347         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12348       }
12349     }
12350     {
12351       CPLErrorReset();
12352       result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
12353       CPLErr eclass = CPLGetLastErrorType();
12354       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12355         do_confess( CPLGetLastErrorMsg(), 0 );
12356 
12357 
12358 
12359 
12360 
12361       }
12362 
12363 
12364       /*
12365           Make warnings regular Perl warnings. This duplicates the warning
12366           message if DontUseExceptions() is in effect (it is not by default).
12367           */
12368       if ( eclass == CE_Warning ) {
12369         warn( CPLGetLastErrorMsg(), "%s" );
12370       }
12371 
12372 
12373     }
12374     {
12375       /* %typemap(out) OGRErr */
12376       if ( result != 0 ) {
12377         const char *err = CPLGetLastErrorMsg();
12378         if (err and *err) do_confess(err, 0); /* this is usually better */
12379         do_confess( OGRErrMessages(result), 1 );
12380       }
12381     }
12382 
12383     {
12384       /* %typemap(freearg) (const char* name) */
12385       if (tmpbuf2) Safefree(tmpbuf2);
12386     }
12387 
12388 
12389     XSRETURN(argvi);
12390   fail:
12391 
12392     {
12393       /* %typemap(freearg) (const char* name) */
12394       if (tmpbuf2) Safefree(tmpbuf2);
12395     }
12396 
12397 
12398     SWIG_croak_null();
12399   }
12400 }
12401 
12402 
XS(_wrap_SpatialReference_ImportFromWkt)12403 XS(_wrap_SpatialReference_ImportFromWkt) {
12404   {
12405     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12406     char **arg2 = (char **) 0 ;
12407     void *argp1 = 0 ;
12408     int res1 = 0 ;
12409     char *val2 ;
12410     U8 *tmpbuf2 = NULL ;
12411     int argvi = 0;
12412     OGRErr result;
12413     dXSARGS;
12414 
12415     if ((items < 2) || (items > 2)) {
12416       SWIG_croak("Usage: SpatialReference_ImportFromWkt(self,ppszInput);");
12417     }
12418     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12419     if (!SWIG_IsOK(res1)) {
12420       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12421     }
12422     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12423     {
12424       /* %typemap(in) (char **ignorechange) */
12425       val2 = sv_to_utf8_string(ST(1), &tmpbuf2);
12426       arg2 = &val2;
12427     }
12428     {
12429       CPLErrorReset();
12430       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
12431       CPLErr eclass = CPLGetLastErrorType();
12432       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12433         do_confess( CPLGetLastErrorMsg(), 0 );
12434 
12435 
12436 
12437 
12438 
12439       }
12440 
12441 
12442       /*
12443           Make warnings regular Perl warnings. This duplicates the warning
12444           message if DontUseExceptions() is in effect (it is not by default).
12445           */
12446       if ( eclass == CE_Warning ) {
12447         warn( CPLGetLastErrorMsg(), "%s" );
12448       }
12449 
12450 
12451     }
12452     {
12453       /* %typemap(out) OGRErr */
12454       if ( result != 0 ) {
12455         const char *err = CPLGetLastErrorMsg();
12456         if (err and *err) do_confess(err, 0); /* this is usually better */
12457         do_confess( OGRErrMessages(result), 1 );
12458       }
12459     }
12460 
12461     {
12462       /* %typemap(freearg) (char **ignorechange) */
12463       if (tmpbuf2) Safefree(tmpbuf2);
12464     }
12465     XSRETURN(argvi);
12466   fail:
12467 
12468     {
12469       /* %typemap(freearg) (char **ignorechange) */
12470       if (tmpbuf2) Safefree(tmpbuf2);
12471     }
12472     SWIG_croak_null();
12473   }
12474 }
12475 
12476 
XS(_wrap_SpatialReference_ImportFromProj4)12477 XS(_wrap_SpatialReference_ImportFromProj4) {
12478   {
12479     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12480     char *arg2 = (char *) 0 ;
12481     void *argp1 = 0 ;
12482     int res1 = 0 ;
12483     int res2 ;
12484     char *buf2 = 0 ;
12485     int alloc2 = 0 ;
12486     int argvi = 0;
12487     OGRErr result;
12488     dXSARGS;
12489 
12490     if ((items < 2) || (items > 2)) {
12491       SWIG_croak("Usage: SpatialReference_ImportFromProj4(self,ppszInput);");
12492     }
12493     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12494     if (!SWIG_IsOK(res1)) {
12495       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12496     }
12497     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12498     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
12499     if (!SWIG_IsOK(res2)) {
12500       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
12501     }
12502     arg2 = reinterpret_cast< char * >(buf2);
12503     {
12504       CPLErrorReset();
12505       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
12506       CPLErr eclass = CPLGetLastErrorType();
12507       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12508         do_confess( CPLGetLastErrorMsg(), 0 );
12509 
12510 
12511 
12512 
12513 
12514       }
12515 
12516 
12517       /*
12518           Make warnings regular Perl warnings. This duplicates the warning
12519           message if DontUseExceptions() is in effect (it is not by default).
12520           */
12521       if ( eclass == CE_Warning ) {
12522         warn( CPLGetLastErrorMsg(), "%s" );
12523       }
12524 
12525 
12526     }
12527     {
12528       /* %typemap(out) OGRErr */
12529       if ( result != 0 ) {
12530         const char *err = CPLGetLastErrorMsg();
12531         if (err and *err) do_confess(err, 0); /* this is usually better */
12532         do_confess( OGRErrMessages(result), 1 );
12533       }
12534     }
12535 
12536     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12537     XSRETURN(argvi);
12538   fail:
12539 
12540     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12541     SWIG_croak_null();
12542   }
12543 }
12544 
12545 
XS(_wrap_SpatialReference_ImportFromUrl)12546 XS(_wrap_SpatialReference_ImportFromUrl) {
12547   {
12548     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12549     char *arg2 = (char *) 0 ;
12550     void *argp1 = 0 ;
12551     int res1 = 0 ;
12552     int res2 ;
12553     char *buf2 = 0 ;
12554     int alloc2 = 0 ;
12555     int argvi = 0;
12556     OGRErr result;
12557     dXSARGS;
12558 
12559     if ((items < 2) || (items > 2)) {
12560       SWIG_croak("Usage: SpatialReference_ImportFromUrl(self,url);");
12561     }
12562     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12563     if (!SWIG_IsOK(res1)) {
12564       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12565     }
12566     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12567     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
12568     if (!SWIG_IsOK(res2)) {
12569       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
12570     }
12571     arg2 = reinterpret_cast< char * >(buf2);
12572     {
12573       if (!arg2) {
12574         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12575       }
12576     }
12577     {
12578       CPLErrorReset();
12579       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
12580       CPLErr eclass = CPLGetLastErrorType();
12581       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12582         do_confess( CPLGetLastErrorMsg(), 0 );
12583 
12584 
12585 
12586 
12587 
12588       }
12589 
12590 
12591       /*
12592           Make warnings regular Perl warnings. This duplicates the warning
12593           message if DontUseExceptions() is in effect (it is not by default).
12594           */
12595       if ( eclass == CE_Warning ) {
12596         warn( CPLGetLastErrorMsg(), "%s" );
12597       }
12598 
12599 
12600     }
12601     {
12602       /* %typemap(out) OGRErr */
12603       if ( result != 0 ) {
12604         const char *err = CPLGetLastErrorMsg();
12605         if (err and *err) do_confess(err, 0); /* this is usually better */
12606         do_confess( OGRErrMessages(result), 1 );
12607       }
12608     }
12609 
12610     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12611     XSRETURN(argvi);
12612   fail:
12613 
12614     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12615     SWIG_croak_null();
12616   }
12617 }
12618 
12619 
XS(_wrap_SpatialReference_ImportFromESRI)12620 XS(_wrap_SpatialReference_ImportFromESRI) {
12621   {
12622     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12623     char **arg2 = (char **) 0 ;
12624     void *argp1 = 0 ;
12625     int res1 = 0 ;
12626     int argvi = 0;
12627     OGRErr result;
12628     dXSARGS;
12629 
12630     if ((items < 2) || (items > 2)) {
12631       SWIG_croak("Usage: SpatialReference_ImportFromESRI(self,ppszInput);");
12632     }
12633     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12634     if (!SWIG_IsOK(res1)) {
12635       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12636     }
12637     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12638     {
12639       /* %typemap(in) char **options */
12640       if (SvOK(ST(1))) {
12641         if (SvROK(ST(1))) {
12642           if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
12643             AV *av = (AV*)(SvRV(ST(1)));
12644             for (int i = 0; i < av_len(av)+1; i++) {
12645               SV *sv = *(av_fetch(av, i, 0));
12646               bool sf;
12647               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
12648               arg2 = CSLAddString(arg2, tmp);
12649               if (sf) Safefree(tmp); else free(tmp);
12650             }
12651           } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
12652             HV *hv = (HV*)SvRV(ST(1));
12653             SV *sv;
12654             char *key;
12655             I32 klen;
12656             arg2 = NULL;
12657             hv_iterinit(hv);
12658             while(sv = hv_iternextsv(hv, &key, &klen)) {
12659               bool sf;
12660               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
12661               arg2 = CSLAddNameValue(arg2, key, tmp);
12662               if (sf) Safefree(tmp); else free(tmp);
12663             }
12664           } else
12665           do_confess(NEED_REF, 1);
12666         } else
12667         do_confess(NEED_REF, 1);
12668       }
12669     }
12670     {
12671       CPLErrorReset();
12672       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
12673       CPLErr eclass = CPLGetLastErrorType();
12674       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12675         do_confess( CPLGetLastErrorMsg(), 0 );
12676 
12677 
12678 
12679 
12680 
12681       }
12682 
12683 
12684       /*
12685           Make warnings regular Perl warnings. This duplicates the warning
12686           message if DontUseExceptions() is in effect (it is not by default).
12687           */
12688       if ( eclass == CE_Warning ) {
12689         warn( CPLGetLastErrorMsg(), "%s" );
12690       }
12691 
12692 
12693     }
12694     {
12695       /* %typemap(out) OGRErr */
12696       if ( result != 0 ) {
12697         const char *err = CPLGetLastErrorMsg();
12698         if (err and *err) do_confess(err, 0); /* this is usually better */
12699         do_confess( OGRErrMessages(result), 1 );
12700       }
12701     }
12702 
12703     {
12704       /* %typemap(freearg) char **options */
12705       if (arg2) CSLDestroy( arg2 );
12706     }
12707     XSRETURN(argvi);
12708   fail:
12709 
12710     {
12711       /* %typemap(freearg) char **options */
12712       if (arg2) CSLDestroy( arg2 );
12713     }
12714     SWIG_croak_null();
12715   }
12716 }
12717 
12718 
XS(_wrap_SpatialReference_ImportFromEPSG)12719 XS(_wrap_SpatialReference_ImportFromEPSG) {
12720   {
12721     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12722     int arg2 ;
12723     void *argp1 = 0 ;
12724     int res1 = 0 ;
12725     int val2 ;
12726     int ecode2 = 0 ;
12727     int argvi = 0;
12728     OGRErr result;
12729     dXSARGS;
12730 
12731     if ((items < 2) || (items > 2)) {
12732       SWIG_croak("Usage: SpatialReference_ImportFromEPSG(self,arg);");
12733     }
12734     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12735     if (!SWIG_IsOK(res1)) {
12736       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12737     }
12738     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12739     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
12740     if (!SWIG_IsOK(ecode2)) {
12741       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
12742     }
12743     arg2 = static_cast< int >(val2);
12744     {
12745       CPLErrorReset();
12746       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
12747       CPLErr eclass = CPLGetLastErrorType();
12748       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12749         do_confess( CPLGetLastErrorMsg(), 0 );
12750 
12751 
12752 
12753 
12754 
12755       }
12756 
12757 
12758       /*
12759           Make warnings regular Perl warnings. This duplicates the warning
12760           message if DontUseExceptions() is in effect (it is not by default).
12761           */
12762       if ( eclass == CE_Warning ) {
12763         warn( CPLGetLastErrorMsg(), "%s" );
12764       }
12765 
12766 
12767     }
12768     {
12769       /* %typemap(out) OGRErr */
12770       if ( result != 0 ) {
12771         const char *err = CPLGetLastErrorMsg();
12772         if (err and *err) do_confess(err, 0); /* this is usually better */
12773         do_confess( OGRErrMessages(result), 1 );
12774       }
12775     }
12776 
12777 
12778     XSRETURN(argvi);
12779   fail:
12780 
12781 
12782     SWIG_croak_null();
12783   }
12784 }
12785 
12786 
XS(_wrap_SpatialReference_ImportFromEPSGA)12787 XS(_wrap_SpatialReference_ImportFromEPSGA) {
12788   {
12789     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12790     int arg2 ;
12791     void *argp1 = 0 ;
12792     int res1 = 0 ;
12793     int val2 ;
12794     int ecode2 = 0 ;
12795     int argvi = 0;
12796     OGRErr result;
12797     dXSARGS;
12798 
12799     if ((items < 2) || (items > 2)) {
12800       SWIG_croak("Usage: SpatialReference_ImportFromEPSGA(self,arg);");
12801     }
12802     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12803     if (!SWIG_IsOK(res1)) {
12804       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12805     }
12806     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12807     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
12808     if (!SWIG_IsOK(ecode2)) {
12809       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
12810     }
12811     arg2 = static_cast< int >(val2);
12812     {
12813       CPLErrorReset();
12814       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
12815       CPLErr eclass = CPLGetLastErrorType();
12816       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12817         do_confess( CPLGetLastErrorMsg(), 0 );
12818 
12819 
12820 
12821 
12822 
12823       }
12824 
12825 
12826       /*
12827           Make warnings regular Perl warnings. This duplicates the warning
12828           message if DontUseExceptions() is in effect (it is not by default).
12829           */
12830       if ( eclass == CE_Warning ) {
12831         warn( CPLGetLastErrorMsg(), "%s" );
12832       }
12833 
12834 
12835     }
12836     {
12837       /* %typemap(out) OGRErr */
12838       if ( result != 0 ) {
12839         const char *err = CPLGetLastErrorMsg();
12840         if (err and *err) do_confess(err, 0); /* this is usually better */
12841         do_confess( OGRErrMessages(result), 1 );
12842       }
12843     }
12844 
12845 
12846     XSRETURN(argvi);
12847   fail:
12848 
12849 
12850     SWIG_croak_null();
12851   }
12852 }
12853 
12854 
XS(_wrap_SpatialReference_ImportFromPCI)12855 XS(_wrap_SpatialReference_ImportFromPCI) {
12856   {
12857     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12858     char *arg2 = (char *) 0 ;
12859     char *arg3 = (char *) "METRE" ;
12860     double *arg4 = (double *) (double *)0 ;
12861     void *argp1 = 0 ;
12862     int res1 = 0 ;
12863     int res2 ;
12864     char *buf2 = 0 ;
12865     int alloc2 = 0 ;
12866     int res3 ;
12867     char *buf3 = 0 ;
12868     int alloc3 = 0 ;
12869     double argin4[17] ;
12870     int argvi = 0;
12871     OGRErr result;
12872     dXSARGS;
12873 
12874     if ((items < 2) || (items > 4)) {
12875       SWIG_croak("Usage: SpatialReference_ImportFromPCI(self,proj,units,argin);");
12876     }
12877     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12878     if (!SWIG_IsOK(res1)) {
12879       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12880     }
12881     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12882     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
12883     if (!SWIG_IsOK(res2)) {
12884       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
12885     }
12886     arg2 = reinterpret_cast< char * >(buf2);
12887     if (items > 2) {
12888       res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
12889       if (!SWIG_IsOK(res3)) {
12890         SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
12891       }
12892       arg3 = reinterpret_cast< char * >(buf3);
12893     }
12894     if (items > 3) {
12895       {
12896         /* %typemap(in) (double argin4[ANY]) */
12897         if (!(SvROK(ST(3)) && (SvTYPE(SvRV(ST(3)))==SVt_PVAV)))
12898         do_confess(NEED_ARRAY_REF, 1);
12899         arg4 = argin4;
12900         AV *av = (AV*)(SvRV(ST(3)));
12901         if (av_len(av)+1 < 17)
12902         do_confess(NOT_ENOUGH_ELEMENTS, 1);
12903         for (unsigned int i=0; i<17; i++) {
12904           SV *sv = *av_fetch(av, i, 0);
12905           if (!SvOK(sv))
12906           do_confess(NEED_DEF, 1);
12907           arg4[i] =  SvNV(sv);
12908         }
12909       }
12910     }
12911     {
12912       CPLErrorReset();
12913       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
12914       CPLErr eclass = CPLGetLastErrorType();
12915       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12916         do_confess( CPLGetLastErrorMsg(), 0 );
12917 
12918 
12919 
12920 
12921 
12922       }
12923 
12924 
12925       /*
12926           Make warnings regular Perl warnings. This duplicates the warning
12927           message if DontUseExceptions() is in effect (it is not by default).
12928           */
12929       if ( eclass == CE_Warning ) {
12930         warn( CPLGetLastErrorMsg(), "%s" );
12931       }
12932 
12933 
12934     }
12935     {
12936       /* %typemap(out) OGRErr */
12937       if ( result != 0 ) {
12938         const char *err = CPLGetLastErrorMsg();
12939         if (err and *err) do_confess(err, 0); /* this is usually better */
12940         do_confess( OGRErrMessages(result), 1 );
12941       }
12942     }
12943 
12944     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12945     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12946 
12947     XSRETURN(argvi);
12948   fail:
12949 
12950     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12951     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12952 
12953     SWIG_croak_null();
12954   }
12955 }
12956 
12957 
XS(_wrap_SpatialReference_ImportFromUSGS)12958 XS(_wrap_SpatialReference_ImportFromUSGS) {
12959   {
12960     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12961     long arg2 ;
12962     long arg3 = (long) 0 ;
12963     double *arg4 = (double *) (double *)0 ;
12964     long arg5 = (long) 0 ;
12965     void *argp1 = 0 ;
12966     int res1 = 0 ;
12967     long val2 ;
12968     int ecode2 = 0 ;
12969     long val3 ;
12970     int ecode3 = 0 ;
12971     double argin4[15] ;
12972     long val5 ;
12973     int ecode5 = 0 ;
12974     int argvi = 0;
12975     OGRErr result;
12976     dXSARGS;
12977 
12978     if ((items < 2) || (items > 5)) {
12979       SWIG_croak("Usage: SpatialReference_ImportFromUSGS(self,proj_code,zone,argin,datum_code);");
12980     }
12981     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
12982     if (!SWIG_IsOK(res1)) {
12983       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12984     }
12985     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12986     ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
12987     if (!SWIG_IsOK(ecode2)) {
12988       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
12989     }
12990     arg2 = static_cast< long >(val2);
12991     if (items > 2) {
12992       ecode3 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
12993       if (!SWIG_IsOK(ecode3)) {
12994         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
12995       }
12996       arg3 = static_cast< long >(val3);
12997     }
12998     if (items > 3) {
12999       {
13000         /* %typemap(in) (double argin4[ANY]) */
13001         if (!(SvROK(ST(3)) && (SvTYPE(SvRV(ST(3)))==SVt_PVAV)))
13002         do_confess(NEED_ARRAY_REF, 1);
13003         arg4 = argin4;
13004         AV *av = (AV*)(SvRV(ST(3)));
13005         if (av_len(av)+1 < 15)
13006         do_confess(NOT_ENOUGH_ELEMENTS, 1);
13007         for (unsigned int i=0; i<15; i++) {
13008           SV *sv = *av_fetch(av, i, 0);
13009           if (!SvOK(sv))
13010           do_confess(NEED_DEF, 1);
13011           arg4[i] =  SvNV(sv);
13012         }
13013       }
13014     }
13015     if (items > 4) {
13016       ecode5 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
13017       if (!SWIG_IsOK(ecode5)) {
13018         SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
13019       }
13020       arg5 = static_cast< long >(val5);
13021     }
13022     {
13023       CPLErrorReset();
13024       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
13025       CPLErr eclass = CPLGetLastErrorType();
13026       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13027         do_confess( CPLGetLastErrorMsg(), 0 );
13028 
13029 
13030 
13031 
13032 
13033       }
13034 
13035 
13036       /*
13037           Make warnings regular Perl warnings. This duplicates the warning
13038           message if DontUseExceptions() is in effect (it is not by default).
13039           */
13040       if ( eclass == CE_Warning ) {
13041         warn( CPLGetLastErrorMsg(), "%s" );
13042       }
13043 
13044 
13045     }
13046     {
13047       /* %typemap(out) OGRErr */
13048       if ( result != 0 ) {
13049         const char *err = CPLGetLastErrorMsg();
13050         if (err and *err) do_confess(err, 0); /* this is usually better */
13051         do_confess( OGRErrMessages(result), 1 );
13052       }
13053     }
13054 
13055 
13056 
13057 
13058 
13059     XSRETURN(argvi);
13060   fail:
13061 
13062 
13063 
13064 
13065 
13066     SWIG_croak_null();
13067   }
13068 }
13069 
13070 
XS(_wrap_SpatialReference_ImportFromXML)13071 XS(_wrap_SpatialReference_ImportFromXML) {
13072   {
13073     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13074     char *arg2 = (char *) 0 ;
13075     void *argp1 = 0 ;
13076     int res1 = 0 ;
13077     int res2 ;
13078     char *buf2 = 0 ;
13079     int alloc2 = 0 ;
13080     int argvi = 0;
13081     OGRErr result;
13082     dXSARGS;
13083 
13084     if ((items < 2) || (items > 2)) {
13085       SWIG_croak("Usage: SpatialReference_ImportFromXML(self,xmlString);");
13086     }
13087     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13088     if (!SWIG_IsOK(res1)) {
13089       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13090     }
13091     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13092     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
13093     if (!SWIG_IsOK(res2)) {
13094       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
13095     }
13096     arg2 = reinterpret_cast< char * >(buf2);
13097     {
13098       CPLErrorReset();
13099       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
13100       CPLErr eclass = CPLGetLastErrorType();
13101       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13102         do_confess( CPLGetLastErrorMsg(), 0 );
13103 
13104 
13105 
13106 
13107 
13108       }
13109 
13110 
13111       /*
13112           Make warnings regular Perl warnings. This duplicates the warning
13113           message if DontUseExceptions() is in effect (it is not by default).
13114           */
13115       if ( eclass == CE_Warning ) {
13116         warn( CPLGetLastErrorMsg(), "%s" );
13117       }
13118 
13119 
13120     }
13121     {
13122       /* %typemap(out) OGRErr */
13123       if ( result != 0 ) {
13124         const char *err = CPLGetLastErrorMsg();
13125         if (err and *err) do_confess(err, 0); /* this is usually better */
13126         do_confess( OGRErrMessages(result), 1 );
13127       }
13128     }
13129 
13130     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13131     XSRETURN(argvi);
13132   fail:
13133 
13134     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13135     SWIG_croak_null();
13136   }
13137 }
13138 
13139 
XS(_wrap_SpatialReference_ImportFromERM)13140 XS(_wrap_SpatialReference_ImportFromERM) {
13141   {
13142     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13143     char *arg2 = (char *) 0 ;
13144     char *arg3 = (char *) 0 ;
13145     char *arg4 = (char *) 0 ;
13146     void *argp1 = 0 ;
13147     int res1 = 0 ;
13148     int res2 ;
13149     char *buf2 = 0 ;
13150     int alloc2 = 0 ;
13151     int res3 ;
13152     char *buf3 = 0 ;
13153     int alloc3 = 0 ;
13154     int res4 ;
13155     char *buf4 = 0 ;
13156     int alloc4 = 0 ;
13157     int argvi = 0;
13158     OGRErr result;
13159     dXSARGS;
13160 
13161     if ((items < 4) || (items > 4)) {
13162       SWIG_croak("Usage: SpatialReference_ImportFromERM(self,proj,datum,units);");
13163     }
13164     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13165     if (!SWIG_IsOK(res1)) {
13166       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13167     }
13168     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13169     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
13170     if (!SWIG_IsOK(res2)) {
13171       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
13172     }
13173     arg2 = reinterpret_cast< char * >(buf2);
13174     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
13175     if (!SWIG_IsOK(res3)) {
13176       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
13177     }
13178     arg3 = reinterpret_cast< char * >(buf3);
13179     res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
13180     if (!SWIG_IsOK(res4)) {
13181       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
13182     }
13183     arg4 = reinterpret_cast< char * >(buf4);
13184     {
13185       if (!arg2) {
13186         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13187       }
13188     }
13189     {
13190       if (!arg3) {
13191         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13192       }
13193     }
13194     {
13195       CPLErrorReset();
13196       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
13197       CPLErr eclass = CPLGetLastErrorType();
13198       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13199         do_confess( CPLGetLastErrorMsg(), 0 );
13200 
13201 
13202 
13203 
13204 
13205       }
13206 
13207 
13208       /*
13209           Make warnings regular Perl warnings. This duplicates the warning
13210           message if DontUseExceptions() is in effect (it is not by default).
13211           */
13212       if ( eclass == CE_Warning ) {
13213         warn( CPLGetLastErrorMsg(), "%s" );
13214       }
13215 
13216 
13217     }
13218     {
13219       /* %typemap(out) OGRErr */
13220       if ( result != 0 ) {
13221         const char *err = CPLGetLastErrorMsg();
13222         if (err and *err) do_confess(err, 0); /* this is usually better */
13223         do_confess( OGRErrMessages(result), 1 );
13224       }
13225     }
13226 
13227     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13228     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13229     if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13230     XSRETURN(argvi);
13231   fail:
13232 
13233     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13234     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13235     if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13236     SWIG_croak_null();
13237   }
13238 }
13239 
13240 
XS(_wrap_SpatialReference_ImportFromMICoordSys)13241 XS(_wrap_SpatialReference_ImportFromMICoordSys) {
13242   {
13243     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13244     char *arg2 = (char *) 0 ;
13245     void *argp1 = 0 ;
13246     int res1 = 0 ;
13247     int res2 ;
13248     char *buf2 = 0 ;
13249     int alloc2 = 0 ;
13250     int argvi = 0;
13251     OGRErr result;
13252     dXSARGS;
13253 
13254     if ((items < 2) || (items > 2)) {
13255       SWIG_croak("Usage: SpatialReference_ImportFromMICoordSys(self,pszCoordSys);");
13256     }
13257     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13258     if (!SWIG_IsOK(res1)) {
13259       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13260     }
13261     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13262     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
13263     if (!SWIG_IsOK(res2)) {
13264       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
13265     }
13266     arg2 = reinterpret_cast< char * >(buf2);
13267     {
13268       CPLErrorReset();
13269       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
13270       CPLErr eclass = CPLGetLastErrorType();
13271       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13272         do_confess( CPLGetLastErrorMsg(), 0 );
13273 
13274 
13275 
13276 
13277 
13278       }
13279 
13280 
13281       /*
13282           Make warnings regular Perl warnings. This duplicates the warning
13283           message if DontUseExceptions() is in effect (it is not by default).
13284           */
13285       if ( eclass == CE_Warning ) {
13286         warn( CPLGetLastErrorMsg(), "%s" );
13287       }
13288 
13289 
13290     }
13291     {
13292       /* %typemap(out) OGRErr */
13293       if ( result != 0 ) {
13294         const char *err = CPLGetLastErrorMsg();
13295         if (err and *err) do_confess(err, 0); /* this is usually better */
13296         do_confess( OGRErrMessages(result), 1 );
13297       }
13298     }
13299 
13300     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13301     XSRETURN(argvi);
13302   fail:
13303 
13304     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13305     SWIG_croak_null();
13306   }
13307 }
13308 
13309 
XS(_wrap_SpatialReference_ImportFromOzi)13310 XS(_wrap_SpatialReference_ImportFromOzi) {
13311   {
13312     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13313     char **arg2 = (char **) 0 ;
13314     void *argp1 = 0 ;
13315     int res1 = 0 ;
13316     int argvi = 0;
13317     OGRErr result;
13318     dXSARGS;
13319 
13320     if ((items < 2) || (items > 2)) {
13321       SWIG_croak("Usage: SpatialReference_ImportFromOzi(self,papszLines);");
13322     }
13323     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13324     if (!SWIG_IsOK(res1)) {
13325       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13326     }
13327     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13328     {
13329       /* %typemap(in) char **options */
13330       if (SvOK(ST(1))) {
13331         if (SvROK(ST(1))) {
13332           if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
13333             AV *av = (AV*)(SvRV(ST(1)));
13334             for (int i = 0; i < av_len(av)+1; i++) {
13335               SV *sv = *(av_fetch(av, i, 0));
13336               bool sf;
13337               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
13338               arg2 = CSLAddString(arg2, tmp);
13339               if (sf) Safefree(tmp); else free(tmp);
13340             }
13341           } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
13342             HV *hv = (HV*)SvRV(ST(1));
13343             SV *sv;
13344             char *key;
13345             I32 klen;
13346             arg2 = NULL;
13347             hv_iterinit(hv);
13348             while(sv = hv_iternextsv(hv, &key, &klen)) {
13349               bool sf;
13350               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
13351               arg2 = CSLAddNameValue(arg2, key, tmp);
13352               if (sf) Safefree(tmp); else free(tmp);
13353             }
13354           } else
13355           do_confess(NEED_REF, 1);
13356         } else
13357         do_confess(NEED_REF, 1);
13358       }
13359     }
13360     {
13361       if (!arg2) {
13362         SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13363       }
13364     }
13365     {
13366       CPLErrorReset();
13367       result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
13368       CPLErr eclass = CPLGetLastErrorType();
13369       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13370         do_confess( CPLGetLastErrorMsg(), 0 );
13371 
13372 
13373 
13374 
13375 
13376       }
13377 
13378 
13379       /*
13380           Make warnings regular Perl warnings. This duplicates the warning
13381           message if DontUseExceptions() is in effect (it is not by default).
13382           */
13383       if ( eclass == CE_Warning ) {
13384         warn( CPLGetLastErrorMsg(), "%s" );
13385       }
13386 
13387 
13388     }
13389     {
13390       /* %typemap(out) OGRErr */
13391       if ( result != 0 ) {
13392         const char *err = CPLGetLastErrorMsg();
13393         if (err and *err) do_confess(err, 0); /* this is usually better */
13394         do_confess( OGRErrMessages(result), 1 );
13395       }
13396     }
13397 
13398     {
13399       /* %typemap(freearg) char **options */
13400       if (arg2) CSLDestroy( arg2 );
13401     }
13402     XSRETURN(argvi);
13403   fail:
13404 
13405     {
13406       /* %typemap(freearg) char **options */
13407       if (arg2) CSLDestroy( arg2 );
13408     }
13409     SWIG_croak_null();
13410   }
13411 }
13412 
13413 
XS(_wrap_SpatialReference_ExportToWkt)13414 XS(_wrap_SpatialReference_ExportToWkt) {
13415   {
13416     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13417     char **arg2 = (char **) 0 ;
13418     char **arg3 = (char **) NULL ;
13419     void *argp1 = 0 ;
13420     int res1 = 0 ;
13421     char *argout2 = 0 ;
13422     int argvi = 0;
13423     OGRErr result;
13424     dXSARGS;
13425 
13426     {
13427       /* %typemap(in,numinputs=0) (char **argout2) */
13428       arg2 = &argout2;
13429     }
13430     if ((items < 1) || (items > 2)) {
13431       SWIG_croak("Usage: SpatialReference_ExportToWkt(self,options);");
13432     }
13433     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13434     if (!SWIG_IsOK(res1)) {
13435       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13436     }
13437     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13438     if (items > 1) {
13439       {
13440         /* %typemap(in) char **options */
13441         if (SvOK(ST(1))) {
13442           if (SvROK(ST(1))) {
13443             if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
13444               AV *av = (AV*)(SvRV(ST(1)));
13445               for (int i = 0; i < av_len(av)+1; i++) {
13446                 SV *sv = *(av_fetch(av, i, 0));
13447                 bool sf;
13448                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
13449                 arg3 = CSLAddString(arg3, tmp);
13450                 if (sf) Safefree(tmp); else free(tmp);
13451               }
13452             } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
13453               HV *hv = (HV*)SvRV(ST(1));
13454               SV *sv;
13455               char *key;
13456               I32 klen;
13457               arg3 = NULL;
13458               hv_iterinit(hv);
13459               while(sv = hv_iternextsv(hv, &key, &klen)) {
13460                 bool sf;
13461                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
13462                 arg3 = CSLAddNameValue(arg3, key, tmp);
13463                 if (sf) Safefree(tmp); else free(tmp);
13464               }
13465             } else
13466             do_confess(NEED_REF, 1);
13467           } else
13468           do_confess(NEED_REF, 1);
13469         }
13470       }
13471     }
13472     {
13473       CPLErrorReset();
13474       result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2,arg3);
13475       CPLErr eclass = CPLGetLastErrorType();
13476       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13477         do_confess( CPLGetLastErrorMsg(), 0 );
13478 
13479 
13480 
13481 
13482 
13483       }
13484 
13485 
13486       /*
13487           Make warnings regular Perl warnings. This duplicates the warning
13488           message if DontUseExceptions() is in effect (it is not by default).
13489           */
13490       if ( eclass == CE_Warning ) {
13491         warn( CPLGetLastErrorMsg(), "%s" );
13492       }
13493 
13494 
13495     }
13496     {
13497       /* %typemap(out) OGRErr */
13498       if ( result != 0 ) {
13499         const char *err = CPLGetLastErrorMsg();
13500         if (err and *err) do_confess(err, 0); /* this is usually better */
13501         do_confess( OGRErrMessages(result), 1 );
13502       }
13503     }
13504     {
13505       /* %typemap(argout) (char **argout) */
13506       ST(argvi) = sv_newmortal();
13507       if ( arg2 ) {
13508         sv_setpv(ST(argvi), *arg2);
13509         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
13510       }
13511       argvi++;
13512     }
13513 
13514     {
13515       /* %typemap(freearg) (char **argout) */
13516       if ( *arg2 )
13517       CPLFree( *arg2 );
13518     }
13519     {
13520       /* %typemap(freearg) char **options */
13521       if (arg3) CSLDestroy( arg3 );
13522     }
13523     XSRETURN(argvi);
13524   fail:
13525 
13526     {
13527       /* %typemap(freearg) (char **argout) */
13528       if ( *arg2 )
13529       CPLFree( *arg2 );
13530     }
13531     {
13532       /* %typemap(freearg) char **options */
13533       if (arg3) CSLDestroy( arg3 );
13534     }
13535     SWIG_croak_null();
13536   }
13537 }
13538 
13539 
XS(_wrap_SpatialReference_ExportToPrettyWkt)13540 XS(_wrap_SpatialReference_ExportToPrettyWkt) {
13541   {
13542     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13543     char **arg2 = (char **) 0 ;
13544     int arg3 = (int) 0 ;
13545     void *argp1 = 0 ;
13546     int res1 = 0 ;
13547     char *argout2 = 0 ;
13548     int val3 ;
13549     int ecode3 = 0 ;
13550     int argvi = 0;
13551     OGRErr result;
13552     dXSARGS;
13553 
13554     {
13555       /* %typemap(in,numinputs=0) (char **argout2) */
13556       arg2 = &argout2;
13557     }
13558     if ((items < 1) || (items > 2)) {
13559       SWIG_croak("Usage: SpatialReference_ExportToPrettyWkt(self,simplify);");
13560     }
13561     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13562     if (!SWIG_IsOK(res1)) {
13563       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13564     }
13565     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13566     if (items > 1) {
13567       ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val3);
13568       if (!SWIG_IsOK(ecode3)) {
13569         SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
13570       }
13571       arg3 = static_cast< int >(val3);
13572     }
13573     {
13574       CPLErrorReset();
13575       result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
13576       CPLErr eclass = CPLGetLastErrorType();
13577       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13578         do_confess( CPLGetLastErrorMsg(), 0 );
13579 
13580 
13581 
13582 
13583 
13584       }
13585 
13586 
13587       /*
13588           Make warnings regular Perl warnings. This duplicates the warning
13589           message if DontUseExceptions() is in effect (it is not by default).
13590           */
13591       if ( eclass == CE_Warning ) {
13592         warn( CPLGetLastErrorMsg(), "%s" );
13593       }
13594 
13595 
13596     }
13597     {
13598       /* %typemap(out) OGRErr */
13599       if ( result != 0 ) {
13600         const char *err = CPLGetLastErrorMsg();
13601         if (err and *err) do_confess(err, 0); /* this is usually better */
13602         do_confess( OGRErrMessages(result), 1 );
13603       }
13604     }
13605     {
13606       /* %typemap(argout) (char **argout) */
13607       ST(argvi) = sv_newmortal();
13608       if ( arg2 ) {
13609         sv_setpv(ST(argvi), *arg2);
13610         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
13611       }
13612       argvi++;
13613     }
13614 
13615     {
13616       /* %typemap(freearg) (char **argout) */
13617       if ( *arg2 )
13618       CPLFree( *arg2 );
13619     }
13620 
13621     XSRETURN(argvi);
13622   fail:
13623 
13624     {
13625       /* %typemap(freearg) (char **argout) */
13626       if ( *arg2 )
13627       CPLFree( *arg2 );
13628     }
13629 
13630     SWIG_croak_null();
13631   }
13632 }
13633 
13634 
XS(_wrap_SpatialReference_ExportToPROJJSON)13635 XS(_wrap_SpatialReference_ExportToPROJJSON) {
13636   {
13637     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13638     char **arg2 = (char **) 0 ;
13639     char **arg3 = (char **) NULL ;
13640     void *argp1 = 0 ;
13641     int res1 = 0 ;
13642     char *argout2 = 0 ;
13643     int argvi = 0;
13644     OGRErr result;
13645     dXSARGS;
13646 
13647     {
13648       /* %typemap(in,numinputs=0) (char **argout2) */
13649       arg2 = &argout2;
13650     }
13651     if ((items < 1) || (items > 2)) {
13652       SWIG_croak("Usage: SpatialReference_ExportToPROJJSON(self,options);");
13653     }
13654     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13655     if (!SWIG_IsOK(res1)) {
13656       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPROJJSON" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13657     }
13658     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13659     if (items > 1) {
13660       {
13661         /* %typemap(in) char **options */
13662         if (SvOK(ST(1))) {
13663           if (SvROK(ST(1))) {
13664             if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
13665               AV *av = (AV*)(SvRV(ST(1)));
13666               for (int i = 0; i < av_len(av)+1; i++) {
13667                 SV *sv = *(av_fetch(av, i, 0));
13668                 bool sf;
13669                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
13670                 arg3 = CSLAddString(arg3, tmp);
13671                 if (sf) Safefree(tmp); else free(tmp);
13672               }
13673             } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
13674               HV *hv = (HV*)SvRV(ST(1));
13675               SV *sv;
13676               char *key;
13677               I32 klen;
13678               arg3 = NULL;
13679               hv_iterinit(hv);
13680               while(sv = hv_iternextsv(hv, &key, &klen)) {
13681                 bool sf;
13682                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
13683                 arg3 = CSLAddNameValue(arg3, key, tmp);
13684                 if (sf) Safefree(tmp); else free(tmp);
13685               }
13686             } else
13687             do_confess(NEED_REF, 1);
13688           } else
13689           do_confess(NEED_REF, 1);
13690         }
13691       }
13692     }
13693     {
13694       CPLErrorReset();
13695       result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON(arg1,arg2,arg3);
13696       CPLErr eclass = CPLGetLastErrorType();
13697       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13698         do_confess( CPLGetLastErrorMsg(), 0 );
13699 
13700 
13701 
13702 
13703 
13704       }
13705 
13706 
13707       /*
13708           Make warnings regular Perl warnings. This duplicates the warning
13709           message if DontUseExceptions() is in effect (it is not by default).
13710           */
13711       if ( eclass == CE_Warning ) {
13712         warn( CPLGetLastErrorMsg(), "%s" );
13713       }
13714 
13715 
13716     }
13717     {
13718       /* %typemap(out) OGRErr */
13719       if ( result != 0 ) {
13720         const char *err = CPLGetLastErrorMsg();
13721         if (err and *err) do_confess(err, 0); /* this is usually better */
13722         do_confess( OGRErrMessages(result), 1 );
13723       }
13724     }
13725     {
13726       /* %typemap(argout) (char **argout) */
13727       ST(argvi) = sv_newmortal();
13728       if ( arg2 ) {
13729         sv_setpv(ST(argvi), *arg2);
13730         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
13731       }
13732       argvi++;
13733     }
13734 
13735     {
13736       /* %typemap(freearg) (char **argout) */
13737       if ( *arg2 )
13738       CPLFree( *arg2 );
13739     }
13740     {
13741       /* %typemap(freearg) char **options */
13742       if (arg3) CSLDestroy( arg3 );
13743     }
13744     XSRETURN(argvi);
13745   fail:
13746 
13747     {
13748       /* %typemap(freearg) (char **argout) */
13749       if ( *arg2 )
13750       CPLFree( *arg2 );
13751     }
13752     {
13753       /* %typemap(freearg) char **options */
13754       if (arg3) CSLDestroy( arg3 );
13755     }
13756     SWIG_croak_null();
13757   }
13758 }
13759 
13760 
XS(_wrap_SpatialReference_ExportToProj4)13761 XS(_wrap_SpatialReference_ExportToProj4) {
13762   {
13763     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13764     char **arg2 = (char **) 0 ;
13765     void *argp1 = 0 ;
13766     int res1 = 0 ;
13767     char *argout2 = 0 ;
13768     int argvi = 0;
13769     OGRErr result;
13770     dXSARGS;
13771 
13772     {
13773       /* %typemap(in,numinputs=0) (char **argout2) */
13774       arg2 = &argout2;
13775     }
13776     if ((items < 1) || (items > 1)) {
13777       SWIG_croak("Usage: SpatialReference_ExportToProj4(self);");
13778     }
13779     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13780     if (!SWIG_IsOK(res1)) {
13781       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13782     }
13783     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13784     {
13785       CPLErrorReset();
13786       result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
13787       CPLErr eclass = CPLGetLastErrorType();
13788       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13789         do_confess( CPLGetLastErrorMsg(), 0 );
13790 
13791 
13792 
13793 
13794 
13795       }
13796 
13797 
13798       /*
13799           Make warnings regular Perl warnings. This duplicates the warning
13800           message if DontUseExceptions() is in effect (it is not by default).
13801           */
13802       if ( eclass == CE_Warning ) {
13803         warn( CPLGetLastErrorMsg(), "%s" );
13804       }
13805 
13806 
13807     }
13808     {
13809       /* %typemap(out) OGRErr */
13810       if ( result != 0 ) {
13811         const char *err = CPLGetLastErrorMsg();
13812         if (err and *err) do_confess(err, 0); /* this is usually better */
13813         do_confess( OGRErrMessages(result), 1 );
13814       }
13815     }
13816     {
13817       /* %typemap(argout) (char **argout) */
13818       ST(argvi) = sv_newmortal();
13819       if ( arg2 ) {
13820         sv_setpv(ST(argvi), *arg2);
13821         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
13822       }
13823       argvi++;
13824     }
13825 
13826     {
13827       /* %typemap(freearg) (char **argout) */
13828       if ( *arg2 )
13829       CPLFree( *arg2 );
13830     }
13831     XSRETURN(argvi);
13832   fail:
13833 
13834     {
13835       /* %typemap(freearg) (char **argout) */
13836       if ( *arg2 )
13837       CPLFree( *arg2 );
13838     }
13839     SWIG_croak_null();
13840   }
13841 }
13842 
13843 
XS(_wrap_SpatialReference_ExportToPCI)13844 XS(_wrap_SpatialReference_ExportToPCI) {
13845   {
13846     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13847     char **arg2 = (char **) 0 ;
13848     char **arg3 = (char **) 0 ;
13849     double **arg4 ;
13850     void *argp1 = 0 ;
13851     int res1 = 0 ;
13852     char *argout2 = 0 ;
13853     char *argout3 = 0 ;
13854     double *argout4 ;
13855     int argvi = 0;
13856     OGRErr result;
13857     dXSARGS;
13858 
13859     {
13860       /* %typemap(in,numinputs=0) (char **argout2) */
13861       arg2 = &argout2;
13862     }
13863     {
13864       /* %typemap(in,numinputs=0) (char **argout3) */
13865       arg3 = &argout3;
13866     }
13867     {
13868       /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
13869       arg4 = &argout4;
13870     }
13871     if ((items < 1) || (items > 1)) {
13872       SWIG_croak("Usage: SpatialReference_ExportToPCI(self);");
13873     }
13874     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
13875     if (!SWIG_IsOK(res1)) {
13876       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13877     }
13878     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13879     {
13880       CPLErrorReset();
13881       result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
13882       CPLErr eclass = CPLGetLastErrorType();
13883       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13884         do_confess( CPLGetLastErrorMsg(), 0 );
13885 
13886 
13887 
13888 
13889 
13890       }
13891 
13892 
13893       /*
13894           Make warnings regular Perl warnings. This duplicates the warning
13895           message if DontUseExceptions() is in effect (it is not by default).
13896           */
13897       if ( eclass == CE_Warning ) {
13898         warn( CPLGetLastErrorMsg(), "%s" );
13899       }
13900 
13901 
13902     }
13903     {
13904       /* %typemap(out) OGRErr */
13905       if ( result != 0 ) {
13906         const char *err = CPLGetLastErrorMsg();
13907         if (err and *err) do_confess(err, 0); /* this is usually better */
13908         do_confess( OGRErrMessages(result), 1 );
13909       }
13910     }
13911     {
13912       /* %typemap(argout) (char **argout) */
13913       ST(argvi) = sv_newmortal();
13914       if ( arg2 ) {
13915         sv_setpv(ST(argvi), *arg2);
13916         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
13917       }
13918       argvi++;
13919     }
13920     {
13921       /* %typemap(argout) (char **argout) */
13922       ST(argvi) = sv_newmortal();
13923       if ( arg3 ) {
13924         sv_setpv(ST(argvi), *arg3);
13925         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
13926       }
13927       argvi++;
13928     }
13929     {
13930       /* %typemap(argout) (double *argout[ANY]) */
13931       ST(argvi) = CreateArrayFromDoubleArray( *arg4, 17 );
13932       argvi++;
13933     }
13934 
13935     {
13936       /* %typemap(freearg) (char **argout) */
13937       if ( *arg2 )
13938       CPLFree( *arg2 );
13939     }
13940     {
13941       /* %typemap(freearg) (char **argout) */
13942       if ( *arg3 )
13943       CPLFree( *arg3 );
13944     }
13945     {
13946       /* %typemap(freearg) (double *argout[ANY]) */
13947       CPLFree(*arg4);
13948     }
13949     XSRETURN(argvi);
13950   fail:
13951 
13952     {
13953       /* %typemap(freearg) (char **argout) */
13954       if ( *arg2 )
13955       CPLFree( *arg2 );
13956     }
13957     {
13958       /* %typemap(freearg) (char **argout) */
13959       if ( *arg3 )
13960       CPLFree( *arg3 );
13961     }
13962     {
13963       /* %typemap(freearg) (double *argout[ANY]) */
13964       CPLFree(*arg4);
13965     }
13966     SWIG_croak_null();
13967   }
13968 }
13969 
13970 
XS(_wrap_SpatialReference_ExportToUSGS)13971 XS(_wrap_SpatialReference_ExportToUSGS) {
13972   {
13973     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13974     long *arg2 = (long *) 0 ;
13975     long *arg3 = (long *) 0 ;
13976     double **arg4 ;
13977     long *arg5 = (long *) 0 ;
13978     void *argp1 = 0 ;
13979     int res1 = 0 ;
13980     long temp2 ;
13981     int res2 = SWIG_TMPOBJ ;
13982     long temp3 ;
13983     int res3 = SWIG_TMPOBJ ;
13984     double *argout4 ;
13985     long temp5 ;
13986     int res5 = SWIG_TMPOBJ ;
13987     int argvi = 0;
13988     OGRErr result;
13989     dXSARGS;
13990 
13991     arg2 = &temp2;
13992     arg3 = &temp3;
13993     {
13994       /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
13995       arg4 = &argout4;
13996     }
13997     arg5 = &temp5;
13998     if ((items < 1) || (items > 1)) {
13999       SWIG_croak("Usage: SpatialReference_ExportToUSGS(self);");
14000     }
14001     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14002     if (!SWIG_IsOK(res1)) {
14003       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14004     }
14005     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14006     {
14007       CPLErrorReset();
14008       result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
14009       CPLErr eclass = CPLGetLastErrorType();
14010       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14011         do_confess( CPLGetLastErrorMsg(), 0 );
14012 
14013 
14014 
14015 
14016 
14017       }
14018 
14019 
14020       /*
14021           Make warnings regular Perl warnings. This duplicates the warning
14022           message if DontUseExceptions() is in effect (it is not by default).
14023           */
14024       if ( eclass == CE_Warning ) {
14025         warn( CPLGetLastErrorMsg(), "%s" );
14026       }
14027 
14028 
14029     }
14030     {
14031       /* %typemap(out) OGRErr */
14032       if ( result != 0 ) {
14033         const char *err = CPLGetLastErrorMsg();
14034         if (err and *err) do_confess(err, 0); /* this is usually better */
14035         do_confess( OGRErrMessages(result), 1 );
14036       }
14037     }
14038     if (SWIG_IsTmpObj(res2)) {
14039       if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1((*arg2)); argvi++  ;
14040     } else {
14041       int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0) : 0;
14042       if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags); argvi++  ;
14043     }
14044     if (SWIG_IsTmpObj(res3)) {
14045       if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1((*arg3)); argvi++  ;
14046     } else {
14047       int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0) : 0;
14048       if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags); argvi++  ;
14049     }
14050     {
14051       /* %typemap(argout) (double *argout[ANY]) */
14052       ST(argvi) = CreateArrayFromDoubleArray( *arg4, 15 );
14053       argvi++;
14054     }
14055     if (SWIG_IsTmpObj(res5)) {
14056       if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_long  SWIG_PERL_CALL_ARGS_1((*arg5)); argvi++  ;
14057     } else {
14058       int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0) : 0;
14059       if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags); argvi++  ;
14060     }
14061 
14062 
14063 
14064     {
14065       /* %typemap(freearg) (double *argout[ANY]) */
14066       CPLFree(*arg4);
14067     }
14068 
14069     XSRETURN(argvi);
14070   fail:
14071 
14072 
14073 
14074     {
14075       /* %typemap(freearg) (double *argout[ANY]) */
14076       CPLFree(*arg4);
14077     }
14078 
14079     SWIG_croak_null();
14080   }
14081 }
14082 
14083 
XS(_wrap_SpatialReference_ExportToXML)14084 XS(_wrap_SpatialReference_ExportToXML) {
14085   {
14086     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14087     char **arg2 = (char **) 0 ;
14088     char *arg3 = (char *) "" ;
14089     void *argp1 = 0 ;
14090     int res1 = 0 ;
14091     char *argout2 = 0 ;
14092     int res3 ;
14093     char *buf3 = 0 ;
14094     int alloc3 = 0 ;
14095     int argvi = 0;
14096     OGRErr result;
14097     dXSARGS;
14098 
14099     {
14100       /* %typemap(in,numinputs=0) (char **argout2) */
14101       arg2 = &argout2;
14102     }
14103     if ((items < 1) || (items > 2)) {
14104       SWIG_croak("Usage: SpatialReference_ExportToXML(self,dialect);");
14105     }
14106     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14107     if (!SWIG_IsOK(res1)) {
14108       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14109     }
14110     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14111     if (items > 1) {
14112       res3 = SWIG_AsCharPtrAndSize(ST(1), &buf3, NULL, &alloc3);
14113       if (!SWIG_IsOK(res3)) {
14114         SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
14115       }
14116       arg3 = reinterpret_cast< char * >(buf3);
14117     }
14118     {
14119       CPLErrorReset();
14120       result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
14121       CPLErr eclass = CPLGetLastErrorType();
14122       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14123         do_confess( CPLGetLastErrorMsg(), 0 );
14124 
14125 
14126 
14127 
14128 
14129       }
14130 
14131 
14132       /*
14133           Make warnings regular Perl warnings. This duplicates the warning
14134           message if DontUseExceptions() is in effect (it is not by default).
14135           */
14136       if ( eclass == CE_Warning ) {
14137         warn( CPLGetLastErrorMsg(), "%s" );
14138       }
14139 
14140 
14141     }
14142     {
14143       /* %typemap(out) OGRErr */
14144       if ( result != 0 ) {
14145         const char *err = CPLGetLastErrorMsg();
14146         if (err and *err) do_confess(err, 0); /* this is usually better */
14147         do_confess( OGRErrMessages(result), 1 );
14148       }
14149     }
14150     {
14151       /* %typemap(argout) (char **argout) */
14152       ST(argvi) = sv_newmortal();
14153       if ( arg2 ) {
14154         sv_setpv(ST(argvi), *arg2);
14155         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
14156       }
14157       argvi++;
14158     }
14159 
14160     {
14161       /* %typemap(freearg) (char **argout) */
14162       if ( *arg2 )
14163       CPLFree( *arg2 );
14164     }
14165     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14166     XSRETURN(argvi);
14167   fail:
14168 
14169     {
14170       /* %typemap(freearg) (char **argout) */
14171       if ( *arg2 )
14172       CPLFree( *arg2 );
14173     }
14174     if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14175     SWIG_croak_null();
14176   }
14177 }
14178 
14179 
XS(_wrap_SpatialReference_ExportToMICoordSys)14180 XS(_wrap_SpatialReference_ExportToMICoordSys) {
14181   {
14182     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14183     char **arg2 = (char **) 0 ;
14184     void *argp1 = 0 ;
14185     int res1 = 0 ;
14186     char *argout2 = 0 ;
14187     int argvi = 0;
14188     OGRErr result;
14189     dXSARGS;
14190 
14191     {
14192       /* %typemap(in,numinputs=0) (char **argout2) */
14193       arg2 = &argout2;
14194     }
14195     if ((items < 1) || (items > 1)) {
14196       SWIG_croak("Usage: SpatialReference_ExportToMICoordSys(self);");
14197     }
14198     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14199     if (!SWIG_IsOK(res1)) {
14200       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14201     }
14202     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14203     {
14204       CPLErrorReset();
14205       result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
14206       CPLErr eclass = CPLGetLastErrorType();
14207       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14208         do_confess( CPLGetLastErrorMsg(), 0 );
14209 
14210 
14211 
14212 
14213 
14214       }
14215 
14216 
14217       /*
14218           Make warnings regular Perl warnings. This duplicates the warning
14219           message if DontUseExceptions() is in effect (it is not by default).
14220           */
14221       if ( eclass == CE_Warning ) {
14222         warn( CPLGetLastErrorMsg(), "%s" );
14223       }
14224 
14225 
14226     }
14227     {
14228       /* %typemap(out) OGRErr */
14229       if ( result != 0 ) {
14230         const char *err = CPLGetLastErrorMsg();
14231         if (err and *err) do_confess(err, 0); /* this is usually better */
14232         do_confess( OGRErrMessages(result), 1 );
14233       }
14234     }
14235     {
14236       /* %typemap(argout) (char **argout) */
14237       ST(argvi) = sv_newmortal();
14238       if ( arg2 ) {
14239         sv_setpv(ST(argvi), *arg2);
14240         SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
14241       }
14242       argvi++;
14243     }
14244 
14245     {
14246       /* %typemap(freearg) (char **argout) */
14247       if ( *arg2 )
14248       CPLFree( *arg2 );
14249     }
14250     XSRETURN(argvi);
14251   fail:
14252 
14253     {
14254       /* %typemap(freearg) (char **argout) */
14255       if ( *arg2 )
14256       CPLFree( *arg2 );
14257     }
14258     SWIG_croak_null();
14259   }
14260 }
14261 
14262 
XS(_wrap_SpatialReference_CloneGeogCS)14263 XS(_wrap_SpatialReference_CloneGeogCS) {
14264   {
14265     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14266     void *argp1 = 0 ;
14267     int res1 = 0 ;
14268     int argvi = 0;
14269     OSRSpatialReferenceShadow *result = 0 ;
14270     dXSARGS;
14271 
14272     if ((items < 1) || (items > 1)) {
14273       SWIG_croak("Usage: SpatialReference_CloneGeogCS(self);");
14274     }
14275     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14276     if (!SWIG_IsOK(res1)) {
14277       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14278     }
14279     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14280     {
14281       CPLErrorReset();
14282       result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
14283       CPLErr eclass = CPLGetLastErrorType();
14284       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14285         do_confess( CPLGetLastErrorMsg(), 0 );
14286 
14287 
14288 
14289 
14290 
14291       }
14292 
14293 
14294       /*
14295           Make warnings regular Perl warnings. This duplicates the warning
14296           message if DontUseExceptions() is in effect (it is not by default).
14297           */
14298       if ( eclass == CE_Warning ) {
14299         warn( CPLGetLastErrorMsg(), "%s" );
14300       }
14301 
14302 
14303     }
14304     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
14305 
14306     XSRETURN(argvi);
14307   fail:
14308 
14309     SWIG_croak_null();
14310   }
14311 }
14312 
14313 
XS(_wrap_SpatialReference_Clone)14314 XS(_wrap_SpatialReference_Clone) {
14315   {
14316     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14317     void *argp1 = 0 ;
14318     int res1 = 0 ;
14319     int argvi = 0;
14320     OSRSpatialReferenceShadow *result = 0 ;
14321     dXSARGS;
14322 
14323     if ((items < 1) || (items > 1)) {
14324       SWIG_croak("Usage: SpatialReference_Clone(self);");
14325     }
14326     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14327     if (!SWIG_IsOK(res1)) {
14328       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14329     }
14330     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14331     {
14332       CPLErrorReset();
14333       result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
14334       CPLErr eclass = CPLGetLastErrorType();
14335       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14336         do_confess( CPLGetLastErrorMsg(), 0 );
14337 
14338 
14339 
14340 
14341 
14342       }
14343 
14344 
14345       /*
14346           Make warnings regular Perl warnings. This duplicates the warning
14347           message if DontUseExceptions() is in effect (it is not by default).
14348           */
14349       if ( eclass == CE_Warning ) {
14350         warn( CPLGetLastErrorMsg(), "%s" );
14351       }
14352 
14353 
14354     }
14355     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
14356 
14357     XSRETURN(argvi);
14358   fail:
14359 
14360     SWIG_croak_null();
14361   }
14362 }
14363 
14364 
XS(_wrap_SpatialReference_Validate)14365 XS(_wrap_SpatialReference_Validate) {
14366   {
14367     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14368     void *argp1 = 0 ;
14369     int res1 = 0 ;
14370     int argvi = 0;
14371     OGRErr result;
14372     dXSARGS;
14373 
14374     if ((items < 1) || (items > 1)) {
14375       SWIG_croak("Usage: SpatialReference_Validate(self);");
14376     }
14377     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14378     if (!SWIG_IsOK(res1)) {
14379       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14380     }
14381     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14382     {
14383       CPLErrorReset();
14384       result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
14385       CPLErr eclass = CPLGetLastErrorType();
14386       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14387         do_confess( CPLGetLastErrorMsg(), 0 );
14388 
14389 
14390 
14391 
14392 
14393       }
14394 
14395 
14396       /*
14397           Make warnings regular Perl warnings. This duplicates the warning
14398           message if DontUseExceptions() is in effect (it is not by default).
14399           */
14400       if ( eclass == CE_Warning ) {
14401         warn( CPLGetLastErrorMsg(), "%s" );
14402       }
14403 
14404 
14405     }
14406     {
14407       /* %typemap(out) OGRErr */
14408       if ( result != 0 ) {
14409         const char *err = CPLGetLastErrorMsg();
14410         if (err and *err) do_confess(err, 0); /* this is usually better */
14411         do_confess( OGRErrMessages(result), 1 );
14412       }
14413     }
14414 
14415     XSRETURN(argvi);
14416   fail:
14417 
14418     SWIG_croak_null();
14419   }
14420 }
14421 
14422 
XS(_wrap_SpatialReference_MorphToESRI)14423 XS(_wrap_SpatialReference_MorphToESRI) {
14424   {
14425     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14426     void *argp1 = 0 ;
14427     int res1 = 0 ;
14428     int argvi = 0;
14429     OGRErr result;
14430     dXSARGS;
14431 
14432     if ((items < 1) || (items > 1)) {
14433       SWIG_croak("Usage: SpatialReference_MorphToESRI(self);");
14434     }
14435     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14436     if (!SWIG_IsOK(res1)) {
14437       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14438     }
14439     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14440     {
14441       CPLErrorReset();
14442       result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
14443       CPLErr eclass = CPLGetLastErrorType();
14444       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14445         do_confess( CPLGetLastErrorMsg(), 0 );
14446 
14447 
14448 
14449 
14450 
14451       }
14452 
14453 
14454       /*
14455           Make warnings regular Perl warnings. This duplicates the warning
14456           message if DontUseExceptions() is in effect (it is not by default).
14457           */
14458       if ( eclass == CE_Warning ) {
14459         warn( CPLGetLastErrorMsg(), "%s" );
14460       }
14461 
14462 
14463     }
14464     {
14465       /* %typemap(out) OGRErr */
14466       if ( result != 0 ) {
14467         const char *err = CPLGetLastErrorMsg();
14468         if (err and *err) do_confess(err, 0); /* this is usually better */
14469         do_confess( OGRErrMessages(result), 1 );
14470       }
14471     }
14472 
14473     XSRETURN(argvi);
14474   fail:
14475 
14476     SWIG_croak_null();
14477   }
14478 }
14479 
14480 
XS(_wrap_SpatialReference_MorphFromESRI)14481 XS(_wrap_SpatialReference_MorphFromESRI) {
14482   {
14483     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14484     void *argp1 = 0 ;
14485     int res1 = 0 ;
14486     int argvi = 0;
14487     OGRErr result;
14488     dXSARGS;
14489 
14490     if ((items < 1) || (items > 1)) {
14491       SWIG_croak("Usage: SpatialReference_MorphFromESRI(self);");
14492     }
14493     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14494     if (!SWIG_IsOK(res1)) {
14495       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14496     }
14497     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14498     {
14499       CPLErrorReset();
14500       result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
14501       CPLErr eclass = CPLGetLastErrorType();
14502       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14503         do_confess( CPLGetLastErrorMsg(), 0 );
14504 
14505 
14506 
14507 
14508 
14509       }
14510 
14511 
14512       /*
14513           Make warnings regular Perl warnings. This duplicates the warning
14514           message if DontUseExceptions() is in effect (it is not by default).
14515           */
14516       if ( eclass == CE_Warning ) {
14517         warn( CPLGetLastErrorMsg(), "%s" );
14518       }
14519 
14520 
14521     }
14522     {
14523       /* %typemap(out) OGRErr */
14524       if ( result != 0 ) {
14525         const char *err = CPLGetLastErrorMsg();
14526         if (err and *err) do_confess(err, 0); /* this is usually better */
14527         do_confess( OGRErrMessages(result), 1 );
14528       }
14529     }
14530 
14531     XSRETURN(argvi);
14532   fail:
14533 
14534     SWIG_croak_null();
14535   }
14536 }
14537 
14538 
XS(_wrap_SpatialReference_ConvertToOtherProjection)14539 XS(_wrap_SpatialReference_ConvertToOtherProjection) {
14540   {
14541     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14542     char *arg2 = (char *) 0 ;
14543     char **arg3 = (char **) NULL ;
14544     void *argp1 = 0 ;
14545     int res1 = 0 ;
14546     int res2 ;
14547     char *buf2 = 0 ;
14548     int alloc2 = 0 ;
14549     int argvi = 0;
14550     OSRSpatialReferenceShadow *result = 0 ;
14551     dXSARGS;
14552 
14553     if ((items < 2) || (items > 3)) {
14554       SWIG_croak("Usage: SpatialReference_ConvertToOtherProjection(self,other_projection,options);");
14555     }
14556     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14557     if (!SWIG_IsOK(res1)) {
14558       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14559     }
14560     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14561     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
14562     if (!SWIG_IsOK(res2)) {
14563       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "2"" of type '" "char const *""'");
14564     }
14565     arg2 = reinterpret_cast< char * >(buf2);
14566     if (items > 2) {
14567       {
14568         /* %typemap(in) char **options */
14569         if (SvOK(ST(2))) {
14570           if (SvROK(ST(2))) {
14571             if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
14572               AV *av = (AV*)(SvRV(ST(2)));
14573               for (int i = 0; i < av_len(av)+1; i++) {
14574                 SV *sv = *(av_fetch(av, i, 0));
14575                 bool sf;
14576                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
14577                 arg3 = CSLAddString(arg3, tmp);
14578                 if (sf) Safefree(tmp); else free(tmp);
14579               }
14580             } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
14581               HV *hv = (HV*)SvRV(ST(2));
14582               SV *sv;
14583               char *key;
14584               I32 klen;
14585               arg3 = NULL;
14586               hv_iterinit(hv);
14587               while(sv = hv_iternextsv(hv, &key, &klen)) {
14588                 bool sf;
14589                 char *tmp = sv_to_utf8_string(sv, NULL, &sf);
14590                 arg3 = CSLAddNameValue(arg3, key, tmp);
14591                 if (sf) Safefree(tmp); else free(tmp);
14592               }
14593             } else
14594             do_confess(NEED_REF, 1);
14595           } else
14596           do_confess(NEED_REF, 1);
14597         }
14598       }
14599     }
14600     {
14601       CPLErrorReset();
14602       result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection(arg1,(char const *)arg2,arg3);
14603       CPLErr eclass = CPLGetLastErrorType();
14604       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14605         do_confess( CPLGetLastErrorMsg(), 0 );
14606 
14607 
14608 
14609 
14610 
14611       }
14612 
14613 
14614       /*
14615           Make warnings regular Perl warnings. This duplicates the warning
14616           message if DontUseExceptions() is in effect (it is not by default).
14617           */
14618       if ( eclass == CE_Warning ) {
14619         warn( CPLGetLastErrorMsg(), "%s" );
14620       }
14621 
14622 
14623     }
14624     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
14625 
14626     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14627     {
14628       /* %typemap(freearg) char **options */
14629       if (arg3) CSLDestroy( arg3 );
14630     }
14631     XSRETURN(argvi);
14632   fail:
14633 
14634     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14635     {
14636       /* %typemap(freearg) char **options */
14637       if (arg3) CSLDestroy( arg3 );
14638     }
14639     SWIG_croak_null();
14640   }
14641 }
14642 
14643 
XS(_wrap_SpatialReference_PromoteTo3D)14644 XS(_wrap_SpatialReference_PromoteTo3D) {
14645   {
14646     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14647     char *arg2 = (char *) NULL ;
14648     void *argp1 = 0 ;
14649     int res1 = 0 ;
14650     int res2 ;
14651     char *buf2 = 0 ;
14652     int alloc2 = 0 ;
14653     int argvi = 0;
14654     OGRErr result;
14655     dXSARGS;
14656 
14657     if ((items < 1) || (items > 2)) {
14658       SWIG_croak("Usage: SpatialReference_PromoteTo3D(self,name);");
14659     }
14660     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14661     if (!SWIG_IsOK(res1)) {
14662       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_PromoteTo3D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14663     }
14664     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14665     if (items > 1) {
14666       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
14667       if (!SWIG_IsOK(res2)) {
14668         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_PromoteTo3D" "', argument " "2"" of type '" "char const *""'");
14669       }
14670       arg2 = reinterpret_cast< char * >(buf2);
14671     }
14672     {
14673       CPLErrorReset();
14674       result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D(arg1,(char const *)arg2);
14675       CPLErr eclass = CPLGetLastErrorType();
14676       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14677         do_confess( CPLGetLastErrorMsg(), 0 );
14678 
14679 
14680 
14681 
14682 
14683       }
14684 
14685 
14686       /*
14687           Make warnings regular Perl warnings. This duplicates the warning
14688           message if DontUseExceptions() is in effect (it is not by default).
14689           */
14690       if ( eclass == CE_Warning ) {
14691         warn( CPLGetLastErrorMsg(), "%s" );
14692       }
14693 
14694 
14695     }
14696     {
14697       /* %typemap(out) OGRErr */
14698       if ( result != 0 ) {
14699         const char *err = CPLGetLastErrorMsg();
14700         if (err and *err) do_confess(err, 0); /* this is usually better */
14701         do_confess( OGRErrMessages(result), 1 );
14702       }
14703     }
14704 
14705     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14706     XSRETURN(argvi);
14707   fail:
14708 
14709     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14710     SWIG_croak_null();
14711   }
14712 }
14713 
14714 
XS(_wrap_SpatialReference_DemoteTo2D)14715 XS(_wrap_SpatialReference_DemoteTo2D) {
14716   {
14717     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14718     char *arg2 = (char *) NULL ;
14719     void *argp1 = 0 ;
14720     int res1 = 0 ;
14721     int res2 ;
14722     char *buf2 = 0 ;
14723     int alloc2 = 0 ;
14724     int argvi = 0;
14725     OGRErr result;
14726     dXSARGS;
14727 
14728     if ((items < 1) || (items > 2)) {
14729       SWIG_croak("Usage: SpatialReference_DemoteTo2D(self,name);");
14730     }
14731     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
14732     if (!SWIG_IsOK(res1)) {
14733       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_DemoteTo2D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14734     }
14735     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14736     if (items > 1) {
14737       res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
14738       if (!SWIG_IsOK(res2)) {
14739         SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_DemoteTo2D" "', argument " "2"" of type '" "char const *""'");
14740       }
14741       arg2 = reinterpret_cast< char * >(buf2);
14742     }
14743     {
14744       CPLErrorReset();
14745       result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D(arg1,(char const *)arg2);
14746       CPLErr eclass = CPLGetLastErrorType();
14747       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14748         do_confess( CPLGetLastErrorMsg(), 0 );
14749 
14750 
14751 
14752 
14753 
14754       }
14755 
14756 
14757       /*
14758           Make warnings regular Perl warnings. This duplicates the warning
14759           message if DontUseExceptions() is in effect (it is not by default).
14760           */
14761       if ( eclass == CE_Warning ) {
14762         warn( CPLGetLastErrorMsg(), "%s" );
14763       }
14764 
14765 
14766     }
14767     {
14768       /* %typemap(out) OGRErr */
14769       if ( result != 0 ) {
14770         const char *err = CPLGetLastErrorMsg();
14771         if (err and *err) do_confess(err, 0); /* this is usually better */
14772         do_confess( OGRErrMessages(result), 1 );
14773       }
14774     }
14775 
14776     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14777     XSRETURN(argvi);
14778   fail:
14779 
14780     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14781     SWIG_croak_null();
14782   }
14783 }
14784 
14785 
XS(_wrap_new_CoordinateTransformationOptions)14786 XS(_wrap_new_CoordinateTransformationOptions) {
14787   {
14788     int argvi = 0;
14789     OGRCoordinateTransformationOptions *result = 0 ;
14790     dXSARGS;
14791 
14792     if ((items < 0) || (items > 0)) {
14793       SWIG_croak("Usage: new_CoordinateTransformationOptions();");
14794     }
14795     {
14796       CPLErrorReset();
14797       result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
14798       CPLErr eclass = CPLGetLastErrorType();
14799       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14800         do_confess( CPLGetLastErrorMsg(), 0 );
14801 
14802 
14803 
14804 
14805 
14806       }
14807 
14808 
14809       /*
14810           Make warnings regular Perl warnings. This duplicates the warning
14811           message if DontUseExceptions() is in effect (it is not by default).
14812           */
14813       if ( eclass == CE_Warning ) {
14814         warn( CPLGetLastErrorMsg(), "%s" );
14815       }
14816 
14817 
14818     }
14819     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
14820     XSRETURN(argvi);
14821   fail:
14822     SWIG_croak_null();
14823   }
14824 }
14825 
14826 
XS(_wrap_delete_CoordinateTransformationOptions)14827 XS(_wrap_delete_CoordinateTransformationOptions) {
14828   {
14829     OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
14830     void *argp1 = 0 ;
14831     int res1 = 0 ;
14832     int argvi = 0;
14833     dXSARGS;
14834 
14835     if ((items < 1) || (items > 1)) {
14836       SWIG_croak("Usage: delete_CoordinateTransformationOptions(self);");
14837     }
14838     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_DISOWN |  0 );
14839     if (!SWIG_IsOK(res1)) {
14840       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformationOptions" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
14841     }
14842     arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
14843     {
14844       CPLErrorReset();
14845       delete_OGRCoordinateTransformationOptions(arg1);
14846       CPLErr eclass = CPLGetLastErrorType();
14847       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14848         do_confess( CPLGetLastErrorMsg(), 0 );
14849 
14850 
14851 
14852 
14853 
14854       }
14855 
14856 
14857       /*
14858           Make warnings regular Perl warnings. This duplicates the warning
14859           message if DontUseExceptions() is in effect (it is not by default).
14860           */
14861       if ( eclass == CE_Warning ) {
14862         warn( CPLGetLastErrorMsg(), "%s" );
14863       }
14864 
14865 
14866     }
14867     {
14868       /* %typemap(out) void */
14869     }
14870 
14871     XSRETURN(argvi);
14872   fail:
14873 
14874     SWIG_croak_null();
14875   }
14876 }
14877 
14878 
XS(_wrap_CoordinateTransformationOptions_SetAreaOfInterest)14879 XS(_wrap_CoordinateTransformationOptions_SetAreaOfInterest) {
14880   {
14881     OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
14882     double arg2 ;
14883     double arg3 ;
14884     double arg4 ;
14885     double arg5 ;
14886     void *argp1 = 0 ;
14887     int res1 = 0 ;
14888     double val2 ;
14889     int ecode2 = 0 ;
14890     double val3 ;
14891     int ecode3 = 0 ;
14892     double val4 ;
14893     int ecode4 = 0 ;
14894     double val5 ;
14895     int ecode5 = 0 ;
14896     int argvi = 0;
14897     bool result;
14898     dXSARGS;
14899 
14900     if ((items < 5) || (items > 5)) {
14901       SWIG_croak("Usage: CoordinateTransformationOptions_SetAreaOfInterest(self,westLongitudeDeg,southLatitudeDeg,eastLongitudeDeg,northLatitudeDeg);");
14902     }
14903     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 |  0 );
14904     if (!SWIG_IsOK(res1)) {
14905       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
14906     }
14907     arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
14908     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
14909     if (!SWIG_IsOK(ecode2)) {
14910       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "2"" of type '" "double""'");
14911     }
14912     arg2 = static_cast< double >(val2);
14913     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
14914     if (!SWIG_IsOK(ecode3)) {
14915       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "3"" of type '" "double""'");
14916     }
14917     arg3 = static_cast< double >(val3);
14918     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
14919     if (!SWIG_IsOK(ecode4)) {
14920       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "4"" of type '" "double""'");
14921     }
14922     arg4 = static_cast< double >(val4);
14923     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
14924     if (!SWIG_IsOK(ecode5)) {
14925       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "5"" of type '" "double""'");
14926     }
14927     arg5 = static_cast< double >(val5);
14928     {
14929       CPLErrorReset();
14930       result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
14931       CPLErr eclass = CPLGetLastErrorType();
14932       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14933         do_confess( CPLGetLastErrorMsg(), 0 );
14934 
14935 
14936 
14937 
14938 
14939       }
14940 
14941 
14942       /*
14943           Make warnings regular Perl warnings. This duplicates the warning
14944           message if DontUseExceptions() is in effect (it is not by default).
14945           */
14946       if ( eclass == CE_Warning ) {
14947         warn( CPLGetLastErrorMsg(), "%s" );
14948       }
14949 
14950 
14951     }
14952     ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
14953 
14954 
14955 
14956 
14957 
14958     XSRETURN(argvi);
14959   fail:
14960 
14961 
14962 
14963 
14964 
14965     SWIG_croak_null();
14966   }
14967 }
14968 
14969 
XS(_wrap_CoordinateTransformationOptions_SetOperation)14970 XS(_wrap_CoordinateTransformationOptions_SetOperation) {
14971   {
14972     OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
14973     char *arg2 = (char *) 0 ;
14974     void *argp1 = 0 ;
14975     int res1 = 0 ;
14976     int res2 ;
14977     char *buf2 = 0 ;
14978     int alloc2 = 0 ;
14979     int argvi = 0;
14980     bool result;
14981     dXSARGS;
14982 
14983     if ((items < 2) || (items > 2)) {
14984       SWIG_croak("Usage: CoordinateTransformationOptions_SetOperation(self,operation);");
14985     }
14986     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 |  0 );
14987     if (!SWIG_IsOK(res1)) {
14988       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
14989     }
14990     arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
14991     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
14992     if (!SWIG_IsOK(res2)) {
14993       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "2"" of type '" "char const *""'");
14994     }
14995     arg2 = reinterpret_cast< char * >(buf2);
14996     {
14997       CPLErrorReset();
14998       result = (bool)OGRCoordinateTransformationOptions_SetOperation(arg1,(char const *)arg2);
14999       CPLErr eclass = CPLGetLastErrorType();
15000       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15001         do_confess( CPLGetLastErrorMsg(), 0 );
15002 
15003 
15004 
15005 
15006 
15007       }
15008 
15009 
15010       /*
15011           Make warnings regular Perl warnings. This duplicates the warning
15012           message if DontUseExceptions() is in effect (it is not by default).
15013           */
15014       if ( eclass == CE_Warning ) {
15015         warn( CPLGetLastErrorMsg(), "%s" );
15016       }
15017 
15018 
15019     }
15020     ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
15021 
15022     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
15023     XSRETURN(argvi);
15024   fail:
15025 
15026     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
15027     SWIG_croak_null();
15028   }
15029 }
15030 
15031 
XS(_wrap_CoordinateTransformationOptions_SetDesiredAccuracy)15032 XS(_wrap_CoordinateTransformationOptions_SetDesiredAccuracy) {
15033   {
15034     OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
15035     double arg2 ;
15036     void *argp1 = 0 ;
15037     int res1 = 0 ;
15038     double val2 ;
15039     int ecode2 = 0 ;
15040     int argvi = 0;
15041     bool result;
15042     dXSARGS;
15043 
15044     if ((items < 2) || (items > 2)) {
15045       SWIG_croak("Usage: CoordinateTransformationOptions_SetDesiredAccuracy(self,accuracy);");
15046     }
15047     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 |  0 );
15048     if (!SWIG_IsOK(res1)) {
15049       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
15050     }
15051     arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
15052     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
15053     if (!SWIG_IsOK(ecode2)) {
15054       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "2"" of type '" "double""'");
15055     }
15056     arg2 = static_cast< double >(val2);
15057     {
15058       CPLErrorReset();
15059       result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
15060       CPLErr eclass = CPLGetLastErrorType();
15061       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15062         do_confess( CPLGetLastErrorMsg(), 0 );
15063 
15064 
15065 
15066 
15067 
15068       }
15069 
15070 
15071       /*
15072           Make warnings regular Perl warnings. This duplicates the warning
15073           message if DontUseExceptions() is in effect (it is not by default).
15074           */
15075       if ( eclass == CE_Warning ) {
15076         warn( CPLGetLastErrorMsg(), "%s" );
15077       }
15078 
15079 
15080     }
15081     ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
15082 
15083 
15084     XSRETURN(argvi);
15085   fail:
15086 
15087 
15088     SWIG_croak_null();
15089   }
15090 }
15091 
15092 
XS(_wrap_CoordinateTransformationOptions_SetBallparkAllowed)15093 XS(_wrap_CoordinateTransformationOptions_SetBallparkAllowed) {
15094   {
15095     OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
15096     bool arg2 ;
15097     void *argp1 = 0 ;
15098     int res1 = 0 ;
15099     bool val2 ;
15100     int ecode2 = 0 ;
15101     int argvi = 0;
15102     bool result;
15103     dXSARGS;
15104 
15105     if ((items < 2) || (items > 2)) {
15106       SWIG_croak("Usage: CoordinateTransformationOptions_SetBallparkAllowed(self,allowBallpark);");
15107     }
15108     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 |  0 );
15109     if (!SWIG_IsOK(res1)) {
15110       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
15111     }
15112     arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
15113     ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
15114     if (!SWIG_IsOK(ecode2)) {
15115       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "2"" of type '" "bool""'");
15116     }
15117     arg2 = static_cast< bool >(val2);
15118     {
15119       CPLErrorReset();
15120       result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
15121       CPLErr eclass = CPLGetLastErrorType();
15122       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15123         do_confess( CPLGetLastErrorMsg(), 0 );
15124 
15125 
15126 
15127 
15128 
15129       }
15130 
15131 
15132       /*
15133           Make warnings regular Perl warnings. This duplicates the warning
15134           message if DontUseExceptions() is in effect (it is not by default).
15135           */
15136       if ( eclass == CE_Warning ) {
15137         warn( CPLGetLastErrorMsg(), "%s" );
15138       }
15139 
15140 
15141     }
15142     ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
15143 
15144 
15145     XSRETURN(argvi);
15146   fail:
15147 
15148 
15149     SWIG_croak_null();
15150   }
15151 }
15152 
15153 
XS(_wrap_new_CoordinateTransformation__SWIG_0)15154 XS(_wrap_new_CoordinateTransformation__SWIG_0) {
15155   {
15156     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15157     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
15158     void *argp1 = 0 ;
15159     int res1 = 0 ;
15160     void *argp2 = 0 ;
15161     int res2 = 0 ;
15162     int argvi = 0;
15163     OSRCoordinateTransformationShadow *result = 0 ;
15164     dXSARGS;
15165 
15166     if ((items < 2) || (items > 2)) {
15167       SWIG_croak("Usage: new_CoordinateTransformation(src,dst);");
15168     }
15169     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
15170     if (!SWIG_IsOK(res1)) {
15171       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15172     }
15173     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15174     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
15175     if (!SWIG_IsOK(res2)) {
15176       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
15177     }
15178     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
15179     {
15180       CPLErrorReset();
15181       result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
15182       CPLErr eclass = CPLGetLastErrorType();
15183       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15184         do_confess( CPLGetLastErrorMsg(), 0 );
15185 
15186 
15187 
15188 
15189 
15190       }
15191 
15192 
15193       /*
15194           Make warnings regular Perl warnings. This duplicates the warning
15195           message if DontUseExceptions() is in effect (it is not by default).
15196           */
15197       if ( eclass == CE_Warning ) {
15198         warn( CPLGetLastErrorMsg(), "%s" );
15199       }
15200 
15201 
15202     }
15203     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
15204 
15205 
15206     XSRETURN(argvi);
15207   fail:
15208 
15209 
15210     SWIG_croak_null();
15211   }
15212 }
15213 
15214 
XS(_wrap_new_CoordinateTransformation__SWIG_1)15215 XS(_wrap_new_CoordinateTransformation__SWIG_1) {
15216   {
15217     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15218     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
15219     OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
15220     void *argp1 = 0 ;
15221     int res1 = 0 ;
15222     void *argp2 = 0 ;
15223     int res2 = 0 ;
15224     void *argp3 = 0 ;
15225     int res3 = 0 ;
15226     int argvi = 0;
15227     OSRCoordinateTransformationShadow *result = 0 ;
15228     dXSARGS;
15229 
15230     if ((items < 3) || (items > 3)) {
15231       SWIG_croak("Usage: new_CoordinateTransformation(src,dst,options);");
15232     }
15233     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
15234     if (!SWIG_IsOK(res1)) {
15235       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15236     }
15237     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15238     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
15239     if (!SWIG_IsOK(res2)) {
15240       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
15241     }
15242     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
15243     res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 |  0 );
15244     if (!SWIG_IsOK(res3)) {
15245       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
15246     }
15247     arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
15248     {
15249       CPLErrorReset();
15250       result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
15251       CPLErr eclass = CPLGetLastErrorType();
15252       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15253         do_confess( CPLGetLastErrorMsg(), 0 );
15254 
15255 
15256 
15257 
15258 
15259       }
15260 
15261 
15262       /*
15263           Make warnings regular Perl warnings. This duplicates the warning
15264           message if DontUseExceptions() is in effect (it is not by default).
15265           */
15266       if ( eclass == CE_Warning ) {
15267         warn( CPLGetLastErrorMsg(), "%s" );
15268       }
15269 
15270 
15271     }
15272     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
15273 
15274 
15275 
15276     XSRETURN(argvi);
15277   fail:
15278 
15279 
15280 
15281     SWIG_croak_null();
15282   }
15283 }
15284 
15285 
XS(_wrap_new_CoordinateTransformation)15286 XS(_wrap_new_CoordinateTransformation) {
15287   dXSARGS;
15288 
15289   {
15290     unsigned long _index = 0;
15291     SWIG_TypeRank _rank = 0;
15292     if (items == 2) {
15293       SWIG_TypeRank _ranki = 0;
15294       SWIG_TypeRank _rankm = 0;
15295       SWIG_TypeRank _pi = 1;
15296       int _v = 0;
15297       {
15298         void *vptr = 0;
15299         int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
15300         _v = SWIG_CheckState(res);
15301       }
15302       if (!_v) goto check_1;
15303       _ranki += _v*_pi;
15304       _rankm += _pi;
15305       _pi *= SWIG_MAXCASTRANK;
15306       {
15307         void *vptr = 0;
15308         int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
15309         _v = SWIG_CheckState(res);
15310       }
15311       if (!_v) goto check_1;
15312       _ranki += _v*_pi;
15313       _rankm += _pi;
15314       _pi *= SWIG_MAXCASTRANK;
15315       if (!_index || (_ranki < _rank)) {
15316         _rank = _ranki; _index = 1;
15317         if (_rank == _rankm) goto dispatch;
15318       }
15319     }
15320   check_1:
15321 
15322     if (items == 3) {
15323       SWIG_TypeRank _ranki = 0;
15324       SWIG_TypeRank _rankm = 0;
15325       SWIG_TypeRank _pi = 1;
15326       int _v = 0;
15327       {
15328         void *vptr = 0;
15329         int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
15330         _v = SWIG_CheckState(res);
15331       }
15332       if (!_v) goto check_2;
15333       _ranki += _v*_pi;
15334       _rankm += _pi;
15335       _pi *= SWIG_MAXCASTRANK;
15336       {
15337         void *vptr = 0;
15338         int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
15339         _v = SWIG_CheckState(res);
15340       }
15341       if (!_v) goto check_2;
15342       _ranki += _v*_pi;
15343       _rankm += _pi;
15344       _pi *= SWIG_MAXCASTRANK;
15345       {
15346         void *vptr = 0;
15347         int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OGRCoordinateTransformationOptions, 0);
15348         _v = SWIG_CheckState(res);
15349       }
15350       if (!_v) goto check_2;
15351       _ranki += _v*_pi;
15352       _rankm += _pi;
15353       _pi *= SWIG_MAXCASTRANK;
15354       if (!_index || (_ranki < _rank)) {
15355         _rank = _ranki; _index = 2;
15356         if (_rank == _rankm) goto dispatch;
15357       }
15358     }
15359   check_2:
15360 
15361   dispatch:
15362     switch(_index) {
15363     case 1:
15364       PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CoordinateTransformation__SWIG_0); return;
15365     case 2:
15366       PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_CoordinateTransformation__SWIG_1); return;
15367     }
15368   }
15369 
15370   croak("No matching function for overloaded 'new_CoordinateTransformation'");
15371   XSRETURN(0);
15372 }
15373 
15374 
XS(_wrap_delete_CoordinateTransformation)15375 XS(_wrap_delete_CoordinateTransformation) {
15376   {
15377     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
15378     void *argp1 = 0 ;
15379     int res1 = 0 ;
15380     int argvi = 0;
15381     dXSARGS;
15382 
15383     if ((items < 1) || (items > 1)) {
15384       SWIG_croak("Usage: delete_CoordinateTransformation(self);");
15385     }
15386     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN |  0 );
15387     if (!SWIG_IsOK(res1)) {
15388       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
15389     }
15390     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
15391     {
15392       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
15393       if (!arg1)
15394       do_confess(NEED_DEF, 1);
15395     }
15396     {
15397       CPLErrorReset();
15398       delete_OSRCoordinateTransformationShadow(arg1);
15399       CPLErr eclass = CPLGetLastErrorType();
15400       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15401         do_confess( CPLGetLastErrorMsg(), 0 );
15402 
15403 
15404 
15405 
15406 
15407       }
15408 
15409 
15410       /*
15411           Make warnings regular Perl warnings. This duplicates the warning
15412           message if DontUseExceptions() is in effect (it is not by default).
15413           */
15414       if ( eclass == CE_Warning ) {
15415         warn( CPLGetLastErrorMsg(), "%s" );
15416       }
15417 
15418 
15419     }
15420     {
15421       /* %typemap(out) void */
15422     }
15423 
15424     XSRETURN(argvi);
15425   fail:
15426 
15427     SWIG_croak_null();
15428   }
15429 }
15430 
15431 
XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_0)15432 XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_0) {
15433   {
15434     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
15435     double *arg2 ;
15436     void *argp1 = 0 ;
15437     int res1 = 0 ;
15438     double argin2[3] ;
15439     int argvi = 0;
15440     SV * _saved[1] ;
15441     dXSARGS;
15442 
15443     if ((items < 2) || (items > 2)) {
15444       SWIG_croak("Usage: CoordinateTransformation_TransformPoint(self,inout);");
15445     }
15446     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
15447     if (!SWIG_IsOK(res1)) {
15448       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
15449     }
15450     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
15451     {
15452       /* %typemap(in) (double argin2[ANY]) */
15453       if (!(SvROK(ST(1)) && (SvTYPE(SvRV(ST(1)))==SVt_PVAV)))
15454       do_confess(NEED_ARRAY_REF, 1);
15455       arg2 = argin2;
15456       AV *av = (AV*)(SvRV(ST(1)));
15457       if (av_len(av)+1 < 3)
15458       do_confess(NOT_ENOUGH_ELEMENTS, 1);
15459       for (unsigned int i=0; i<3; i++) {
15460         SV *sv = *av_fetch(av, i, 0);
15461         if (!SvOK(sv))
15462         do_confess(NEED_DEF, 1);
15463         arg2[i] =  SvNV(sv);
15464       }
15465     }
15466     {
15467       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
15468       if (!arg1)
15469       do_confess(NEED_DEF, 1);
15470     }
15471     _saved[0] = ST(1);
15472     {
15473       CPLErrorReset();
15474       OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
15475       CPLErr eclass = CPLGetLastErrorType();
15476       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15477         do_confess( CPLGetLastErrorMsg(), 0 );
15478 
15479 
15480 
15481 
15482 
15483       }
15484 
15485 
15486       /*
15487           Make warnings regular Perl warnings. This duplicates the warning
15488           message if DontUseExceptions() is in effect (it is not by default).
15489           */
15490       if ( eclass == CE_Warning ) {
15491         warn( CPLGetLastErrorMsg(), "%s" );
15492       }
15493 
15494 
15495     }
15496     {
15497       /* %typemap(out) void */
15498     }
15499     {
15500       /* %typemap(argout) (double argout[ANY]) */
15501       if (GIMME_V == G_ARRAY) {
15502         /* return a list */
15503         int i;
15504         EXTEND(SP, argvi+3-items+1);
15505         for (i = 0; i < 3; i++)
15506         ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
15507       } else {
15508         ST(argvi) = CreateArrayFromDoubleArray( arg2, 3 );
15509         argvi++;
15510       }
15511     }
15512 
15513 
15514     XSRETURN(argvi);
15515   fail:
15516 
15517 
15518     SWIG_croak_null();
15519   }
15520 }
15521 
15522 
XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_1)15523 XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_1) {
15524   {
15525     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
15526     double *arg2 ;
15527     void *argp1 = 0 ;
15528     int res1 = 0 ;
15529     double argin2[4] ;
15530     int argvi = 0;
15531     SV * _saved[1] ;
15532     dXSARGS;
15533 
15534     if ((items < 2) || (items > 2)) {
15535       SWIG_croak("Usage: CoordinateTransformation_TransformPoint(self,inout);");
15536     }
15537     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
15538     if (!SWIG_IsOK(res1)) {
15539       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
15540     }
15541     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
15542     {
15543       /* %typemap(in) (double argin2[ANY]) */
15544       if (!(SvROK(ST(1)) && (SvTYPE(SvRV(ST(1)))==SVt_PVAV)))
15545       do_confess(NEED_ARRAY_REF, 1);
15546       arg2 = argin2;
15547       AV *av = (AV*)(SvRV(ST(1)));
15548       if (av_len(av)+1 < 4)
15549       do_confess(NOT_ENOUGH_ELEMENTS, 1);
15550       for (unsigned int i=0; i<4; i++) {
15551         SV *sv = *av_fetch(av, i, 0);
15552         if (!SvOK(sv))
15553         do_confess(NEED_DEF, 1);
15554         arg2[i] =  SvNV(sv);
15555       }
15556     }
15557     {
15558       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
15559       if (!arg1)
15560       do_confess(NEED_DEF, 1);
15561     }
15562     _saved[0] = ST(1);
15563     {
15564       CPLErrorReset();
15565       OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2);
15566       CPLErr eclass = CPLGetLastErrorType();
15567       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15568         do_confess( CPLGetLastErrorMsg(), 0 );
15569 
15570 
15571 
15572 
15573 
15574       }
15575 
15576 
15577       /*
15578           Make warnings regular Perl warnings. This duplicates the warning
15579           message if DontUseExceptions() is in effect (it is not by default).
15580           */
15581       if ( eclass == CE_Warning ) {
15582         warn( CPLGetLastErrorMsg(), "%s" );
15583       }
15584 
15585 
15586     }
15587     {
15588       /* %typemap(out) void */
15589     }
15590     {
15591       /* %typemap(argout) (double argout[ANY]) */
15592       if (GIMME_V == G_ARRAY) {
15593         /* return a list */
15594         int i;
15595         EXTEND(SP, argvi+4-items+1);
15596         for (i = 0; i < 4; i++)
15597         ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
15598       } else {
15599         ST(argvi) = CreateArrayFromDoubleArray( arg2, 4 );
15600         argvi++;
15601       }
15602     }
15603 
15604 
15605     XSRETURN(argvi);
15606   fail:
15607 
15608 
15609     SWIG_croak_null();
15610   }
15611 }
15612 
15613 
XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_2)15614 XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_2) {
15615   {
15616     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
15617     double *arg2 ;
15618     double arg3 ;
15619     double arg4 ;
15620     double arg5 = (double) 0.0 ;
15621     void *argp1 = 0 ;
15622     int res1 = 0 ;
15623     double argout2[3] ;
15624     double val3 ;
15625     int ecode3 = 0 ;
15626     double val4 ;
15627     int ecode4 = 0 ;
15628     double val5 ;
15629     int ecode5 = 0 ;
15630     int argvi = 0;
15631     dXSARGS;
15632 
15633     {
15634       /* %typemap(in,numinputs=0) (double argout2[ANY]) */
15635       arg2 = argout2;
15636     }
15637     if ((items < 3) || (items > 4)) {
15638       SWIG_croak("Usage: CoordinateTransformation_TransformPoint(self,x,y,z);");
15639     }
15640     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
15641     if (!SWIG_IsOK(res1)) {
15642       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
15643     }
15644     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
15645     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val3);
15646     if (!SWIG_IsOK(ecode3)) {
15647       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
15648     }
15649     arg3 = static_cast< double >(val3);
15650     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val4);
15651     if (!SWIG_IsOK(ecode4)) {
15652       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
15653     }
15654     arg4 = static_cast< double >(val4);
15655     if (items > 3) {
15656       ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val5);
15657       if (!SWIG_IsOK(ecode5)) {
15658         SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
15659       }
15660       arg5 = static_cast< double >(val5);
15661     }
15662     {
15663       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
15664       if (!arg1)
15665       do_confess(NEED_DEF, 1);
15666     }
15667     {
15668       CPLErrorReset();
15669       OSRCoordinateTransformationShadow_TransformPoint__SWIG_2(arg1,arg2,arg3,arg4,arg5);
15670       CPLErr eclass = CPLGetLastErrorType();
15671       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15672         do_confess( CPLGetLastErrorMsg(), 0 );
15673 
15674 
15675 
15676 
15677 
15678       }
15679 
15680 
15681       /*
15682           Make warnings regular Perl warnings. This duplicates the warning
15683           message if DontUseExceptions() is in effect (it is not by default).
15684           */
15685       if ( eclass == CE_Warning ) {
15686         warn( CPLGetLastErrorMsg(), "%s" );
15687       }
15688 
15689 
15690     }
15691     {
15692       /* %typemap(out) void */
15693     }
15694     {
15695       /* %typemap(argout) (double argout[ANY]) */
15696       if (GIMME_V == G_ARRAY) {
15697         /* return a list */
15698         int i;
15699         EXTEND(SP, argvi+3-items+1);
15700         for (i = 0; i < 3; i++)
15701         ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
15702       } else {
15703         ST(argvi) = CreateArrayFromDoubleArray( arg2, 3 );
15704         argvi++;
15705       }
15706     }
15707 
15708 
15709 
15710 
15711 
15712     XSRETURN(argvi);
15713   fail:
15714 
15715 
15716 
15717 
15718 
15719     SWIG_croak_null();
15720   }
15721 }
15722 
15723 
XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_3)15724 XS(_wrap_CoordinateTransformation_TransformPoint__SWIG_3) {
15725   {
15726     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
15727     double *arg2 ;
15728     double arg3 ;
15729     double arg4 ;
15730     double arg5 ;
15731     double arg6 ;
15732     void *argp1 = 0 ;
15733     int res1 = 0 ;
15734     double argout2[4] ;
15735     double val3 ;
15736     int ecode3 = 0 ;
15737     double val4 ;
15738     int ecode4 = 0 ;
15739     double val5 ;
15740     int ecode5 = 0 ;
15741     double val6 ;
15742     int ecode6 = 0 ;
15743     int argvi = 0;
15744     dXSARGS;
15745 
15746     {
15747       /* %typemap(in,numinputs=0) (double argout2[ANY]) */
15748       arg2 = argout2;
15749     }
15750     if ((items < 5) || (items > 5)) {
15751       SWIG_croak("Usage: CoordinateTransformation_TransformPoint(self,x,y,z,t);");
15752     }
15753     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
15754     if (!SWIG_IsOK(res1)) {
15755       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
15756     }
15757     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
15758     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val3);
15759     if (!SWIG_IsOK(ecode3)) {
15760       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
15761     }
15762     arg3 = static_cast< double >(val3);
15763     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val4);
15764     if (!SWIG_IsOK(ecode4)) {
15765       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
15766     }
15767     arg4 = static_cast< double >(val4);
15768     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val5);
15769     if (!SWIG_IsOK(ecode5)) {
15770       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
15771     }
15772     arg5 = static_cast< double >(val5);
15773     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val6);
15774     if (!SWIG_IsOK(ecode6)) {
15775       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "6"" of type '" "double""'");
15776     }
15777     arg6 = static_cast< double >(val6);
15778     {
15779       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
15780       if (!arg1)
15781       do_confess(NEED_DEF, 1);
15782     }
15783     {
15784       CPLErrorReset();
15785       OSRCoordinateTransformationShadow_TransformPoint__SWIG_3(arg1,arg2,arg3,arg4,arg5,arg6);
15786       CPLErr eclass = CPLGetLastErrorType();
15787       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15788         do_confess( CPLGetLastErrorMsg(), 0 );
15789 
15790 
15791 
15792 
15793 
15794       }
15795 
15796 
15797       /*
15798           Make warnings regular Perl warnings. This duplicates the warning
15799           message if DontUseExceptions() is in effect (it is not by default).
15800           */
15801       if ( eclass == CE_Warning ) {
15802         warn( CPLGetLastErrorMsg(), "%s" );
15803       }
15804 
15805 
15806     }
15807     {
15808       /* %typemap(out) void */
15809     }
15810     {
15811       /* %typemap(argout) (double argout[ANY]) */
15812       if (GIMME_V == G_ARRAY) {
15813         /* return a list */
15814         int i;
15815         EXTEND(SP, argvi+4-items+1);
15816         for (i = 0; i < 4; i++)
15817         ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
15818       } else {
15819         ST(argvi) = CreateArrayFromDoubleArray( arg2, 4 );
15820         argvi++;
15821       }
15822     }
15823 
15824 
15825 
15826 
15827 
15828 
15829     XSRETURN(argvi);
15830   fail:
15831 
15832 
15833 
15834 
15835 
15836 
15837     SWIG_croak_null();
15838   }
15839 }
15840 
15841 
XS(_wrap_CoordinateTransformation_TransformPoint)15842 XS(_wrap_CoordinateTransformation_TransformPoint) {
15843   dXSARGS;
15844 
15845   {
15846     unsigned long _index = 0;
15847     SWIG_TypeRank _rank = 0;
15848     if (items == 2) {
15849       SWIG_TypeRank _ranki = 0;
15850       SWIG_TypeRank _rankm = 0;
15851       SWIG_TypeRank _pi = 1;
15852       int _v = 0;
15853       {
15854         void *vptr = 0;
15855         int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
15856         _v = SWIG_CheckState(res);
15857       }
15858       if (!_v) goto check_1;
15859       _ranki += _v*_pi;
15860       _rankm += _pi;
15861       _pi *= SWIG_MAXCASTRANK;
15862       {
15863         void *vptr = 0;
15864         int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_double, 0);
15865         _v = SWIG_CheckState(res);
15866       }
15867       if (!_v) goto check_1;
15868       _ranki += _v*_pi;
15869       _rankm += _pi;
15870       _pi *= SWIG_MAXCASTRANK;
15871       if (!_index || (_ranki < _rank)) {
15872         _rank = _ranki; _index = 1;
15873         if (_rank == _rankm) goto dispatch;
15874       }
15875     }
15876   check_1:
15877 
15878     if (items == 2) {
15879       SWIG_TypeRank _ranki = 0;
15880       SWIG_TypeRank _rankm = 0;
15881       SWIG_TypeRank _pi = 1;
15882       int _v = 0;
15883       {
15884         void *vptr = 0;
15885         int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
15886         _v = SWIG_CheckState(res);
15887       }
15888       if (!_v) goto check_2;
15889       _ranki += _v*_pi;
15890       _rankm += _pi;
15891       _pi *= SWIG_MAXCASTRANK;
15892       {
15893         void *vptr = 0;
15894         int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_double, 0);
15895         _v = SWIG_CheckState(res);
15896       }
15897       if (!_v) goto check_2;
15898       _ranki += _v*_pi;
15899       _rankm += _pi;
15900       _pi *= SWIG_MAXCASTRANK;
15901       if (!_index || (_ranki < _rank)) {
15902         _rank = _ranki; _index = 2;
15903         if (_rank == _rankm) goto dispatch;
15904       }
15905     }
15906   check_2:
15907 
15908     if ((items >= 3) && (items <= 4)) {
15909       SWIG_TypeRank _ranki = 0;
15910       SWIG_TypeRank _rankm = 0;
15911       SWIG_TypeRank _pi = 1;
15912       int _v = 0;
15913       {
15914         void *vptr = 0;
15915         int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
15916         _v = SWIG_CheckState(res);
15917       }
15918       if (!_v) goto check_3;
15919       _ranki += _v*_pi;
15920       _rankm += _pi;
15921       _pi *= SWIG_MAXCASTRANK;
15922       {
15923         {
15924           int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
15925           _v = SWIG_CheckState(res);
15926         }
15927       }
15928       if (!_v) goto check_3;
15929       _ranki += _v*_pi;
15930       _rankm += _pi;
15931       _pi *= SWIG_MAXCASTRANK;
15932       {
15933         {
15934           int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
15935           _v = SWIG_CheckState(res);
15936         }
15937       }
15938       if (!_v) goto check_3;
15939       _ranki += _v*_pi;
15940       _rankm += _pi;
15941       _pi *= SWIG_MAXCASTRANK;
15942       if (items > 3) {
15943         {
15944           {
15945             int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
15946             _v = SWIG_CheckState(res);
15947           }
15948         }
15949         if (!_v) goto check_3;
15950         _ranki += _v*_pi;
15951         _rankm += _pi;
15952         _pi *= SWIG_MAXCASTRANK;
15953       }
15954       if (!_index || (_ranki < _rank)) {
15955         _rank = _ranki; _index = 3;
15956         if (_rank == _rankm) goto dispatch;
15957       }
15958     }
15959   check_3:
15960 
15961     if (items == 5) {
15962       SWIG_TypeRank _ranki = 0;
15963       SWIG_TypeRank _rankm = 0;
15964       SWIG_TypeRank _pi = 1;
15965       int _v = 0;
15966       {
15967         void *vptr = 0;
15968         int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
15969         _v = SWIG_CheckState(res);
15970       }
15971       if (!_v) goto check_4;
15972       _ranki += _v*_pi;
15973       _rankm += _pi;
15974       _pi *= SWIG_MAXCASTRANK;
15975       {
15976         {
15977           int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
15978           _v = SWIG_CheckState(res);
15979         }
15980       }
15981       if (!_v) goto check_4;
15982       _ranki += _v*_pi;
15983       _rankm += _pi;
15984       _pi *= SWIG_MAXCASTRANK;
15985       {
15986         {
15987           int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
15988           _v = SWIG_CheckState(res);
15989         }
15990       }
15991       if (!_v) goto check_4;
15992       _ranki += _v*_pi;
15993       _rankm += _pi;
15994       _pi *= SWIG_MAXCASTRANK;
15995       {
15996         {
15997           int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
15998           _v = SWIG_CheckState(res);
15999         }
16000       }
16001       if (!_v) goto check_4;
16002       _ranki += _v*_pi;
16003       _rankm += _pi;
16004       _pi *= SWIG_MAXCASTRANK;
16005       {
16006         {
16007           int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
16008           _v = SWIG_CheckState(res);
16009         }
16010       }
16011       if (!_v) goto check_4;
16012       _ranki += _v*_pi;
16013       _rankm += _pi;
16014       _pi *= SWIG_MAXCASTRANK;
16015       if (!_index || (_ranki < _rank)) {
16016         _rank = _ranki; _index = 4;
16017         if (_rank == _rankm) goto dispatch;
16018       }
16019     }
16020   check_4:
16021 
16022   dispatch:
16023     switch(_index) {
16024     case 1:
16025       PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoordinateTransformation_TransformPoint__SWIG_0); return;
16026     case 2:
16027       PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoordinateTransformation_TransformPoint__SWIG_1); return;
16028     case 3:
16029       PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoordinateTransformation_TransformPoint__SWIG_2); return;
16030     case 4:
16031       PUSHMARK(MARK); SWIG_CALLXS(_wrap_CoordinateTransformation_TransformPoint__SWIG_3); return;
16032     }
16033   }
16034 
16035   croak("No matching function for overloaded 'CoordinateTransformation_TransformPoint'");
16036   XSRETURN(0);
16037 }
16038 
16039 
XS(_wrap_CoordinateTransformation_TransformPointWithErrorCode)16040 XS(_wrap_CoordinateTransformation_TransformPointWithErrorCode) {
16041   {
16042     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
16043     double *arg2 ;
16044     double arg3 ;
16045     double arg4 ;
16046     double arg5 ;
16047     double arg6 ;
16048     void *argp1 = 0 ;
16049     int res1 = 0 ;
16050     double argout2[4] ;
16051     double val3 ;
16052     int ecode3 = 0 ;
16053     double val4 ;
16054     int ecode4 = 0 ;
16055     double val5 ;
16056     int ecode5 = 0 ;
16057     double val6 ;
16058     int ecode6 = 0 ;
16059     int argvi = 0;
16060     int result;
16061     dXSARGS;
16062 
16063     {
16064       /* %typemap(in,numinputs=0) (double argout2[ANY]) */
16065       arg2 = argout2;
16066     }
16067     if ((items < 5) || (items > 5)) {
16068       SWIG_croak("Usage: CoordinateTransformation_TransformPointWithErrorCode(self,x,y,z,t);");
16069     }
16070     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
16071     if (!SWIG_IsOK(res1)) {
16072       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
16073     }
16074     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
16075     ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val3);
16076     if (!SWIG_IsOK(ecode3)) {
16077       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "3"" of type '" "double""'");
16078     }
16079     arg3 = static_cast< double >(val3);
16080     ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val4);
16081     if (!SWIG_IsOK(ecode4)) {
16082       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "4"" of type '" "double""'");
16083     }
16084     arg4 = static_cast< double >(val4);
16085     ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val5);
16086     if (!SWIG_IsOK(ecode5)) {
16087       SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "5"" of type '" "double""'");
16088     }
16089     arg5 = static_cast< double >(val5);
16090     ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val6);
16091     if (!SWIG_IsOK(ecode6)) {
16092       SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "6"" of type '" "double""'");
16093     }
16094     arg6 = static_cast< double >(val6);
16095     {
16096       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
16097       if (!arg1)
16098       do_confess(NEED_DEF, 1);
16099     }
16100     {
16101       CPLErrorReset();
16102       result = (int)OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6);
16103       CPLErr eclass = CPLGetLastErrorType();
16104       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16105         do_confess( CPLGetLastErrorMsg(), 0 );
16106 
16107 
16108 
16109 
16110 
16111       }
16112 
16113 
16114       /*
16115           Make warnings regular Perl warnings. This duplicates the warning
16116           message if DontUseExceptions() is in effect (it is not by default).
16117           */
16118       if ( eclass == CE_Warning ) {
16119         warn( CPLGetLastErrorMsg(), "%s" );
16120       }
16121 
16122 
16123     }
16124     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
16125     {
16126       /* %typemap(argout) (double argout[ANY]) */
16127       if (GIMME_V == G_ARRAY) {
16128         /* return a list */
16129         int i;
16130         EXTEND(SP, argvi+4-items+1);
16131         for (i = 0; i < 4; i++)
16132         ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
16133       } else {
16134         ST(argvi) = CreateArrayFromDoubleArray( arg2, 4 );
16135         argvi++;
16136       }
16137     }
16138 
16139 
16140 
16141 
16142 
16143 
16144     XSRETURN(argvi);
16145   fail:
16146 
16147 
16148 
16149 
16150 
16151 
16152     SWIG_croak_null();
16153   }
16154 }
16155 
16156 
XS(_wrap_CoordinateTransformation__TransformPoints)16157 XS(_wrap_CoordinateTransformation__TransformPoints) {
16158   {
16159     OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
16160     int arg2 ;
16161     double *arg3 = (double *) 0 ;
16162     double *arg4 = (double *) 0 ;
16163     double *arg5 = (double *) 0 ;
16164     void *argp1 = 0 ;
16165     int res1 = 0 ;
16166     int argvi = 0;
16167     SV * _saved[1] ;
16168     dXSARGS;
16169 
16170     if ((items < 2) || (items > 2)) {
16171       SWIG_croak("Usage: CoordinateTransformation__TransformPoints(self,nCount,x,y,z);");
16172     }
16173     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
16174     if (!SWIG_IsOK(res1)) {
16175       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
16176     }
16177     arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
16178     {
16179       /* %typemap(in) (int nCount, double *x, double *y, double *z) */
16180       /* ST(1) is a ref to a list of refs to point lists */
16181       if (! (SvROK(ST(1)) && (SvTYPE(SvRV(ST(1)))==SVt_PVAV)))
16182       do_confess(NEED_ARRAY_REF, 1);
16183       AV *av = (AV*)(SvRV(ST(1)));
16184       arg2 = av_len(av)+1;
16185       arg3 = (double*)CPLMalloc(arg2*sizeof(double));
16186       if (arg3)
16187       arg4 = (double*)CPLMalloc(arg2*sizeof(double));
16188       if (arg3 && arg4)
16189       arg5 = (double*)CPLMalloc(arg2*sizeof(double));
16190       if (!arg3 or !arg4 or !arg5)
16191       SWIG_fail;
16192       for (int i = 0; i < arg2; i++) {
16193         SV **sv = av_fetch(av, i, 0); /* ref to one point list */
16194         if (!(SvROK(*sv) && (SvTYPE(SvRV(*sv))==SVt_PVAV)))
16195         do_confess(WRONG_ITEM_IN_ARRAY, 1);
16196         AV *ac = (AV*)(SvRV(*sv));
16197         int n = av_len(ac)+1;
16198         SV **c = av_fetch(ac, 0, 0);
16199         arg3[i] = SvNV(*c);
16200         c = av_fetch(ac, 1, 0);
16201         arg4[i] = SvNV(*c);
16202         if (n < 3) {
16203           arg5[i] = 0;
16204         } else {
16205           c = av_fetch(ac, 2, 0);
16206           arg5[i] = SvNV(*c);
16207         }
16208       }
16209     }
16210     {
16211       /* %typemap(check) (OSRCoordinateTransformationShadow *) */
16212       if (!arg1)
16213       do_confess(NEED_DEF, 1);
16214     }
16215     _saved[0] = ST(1);
16216     {
16217       CPLErrorReset();
16218       OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5);
16219       CPLErr eclass = CPLGetLastErrorType();
16220       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16221         do_confess( CPLGetLastErrorMsg(), 0 );
16222 
16223 
16224 
16225 
16226 
16227       }
16228 
16229 
16230       /*
16231           Make warnings regular Perl warnings. This duplicates the warning
16232           message if DontUseExceptions() is in effect (it is not by default).
16233           */
16234       if ( eclass == CE_Warning ) {
16235         warn( CPLGetLastErrorMsg(), "%s" );
16236       }
16237 
16238 
16239     }
16240     {
16241       /* %typemap(out) void */
16242     }
16243     {
16244       /* %typemap(argout) (int nCount, double *x, double *y, double *z) */
16245       AV *av = (AV*)(SvRV(_saved[0]));
16246       for (int i = 0; i < arg2; i++) {
16247         SV **sv = av_fetch(av, i, 0);
16248         AV *ac = (AV*)(SvRV(*sv));
16249         int n = av_len(ac)+1;
16250         SV *c = newSVnv(arg3[i]);
16251         if (!av_store(ac, 0, c))
16252         SvREFCNT_dec(c);
16253         c = newSVnv(arg4[i]);
16254         if (!av_store(ac, 1, c))
16255         SvREFCNT_dec(c);
16256         c = newSVnv(arg5[i]);
16257         if (!av_store(ac, 2, c))
16258         SvREFCNT_dec(c);
16259       }
16260     }
16261 
16262     {
16263       /* %typemap(freearg) (int nCount, double *x, double *y, double *z) */
16264       CPLFree(arg3);
16265       CPLFree(arg4);
16266       CPLFree(arg5);
16267     }
16268     XSRETURN(argvi);
16269   fail:
16270 
16271     {
16272       /* %typemap(freearg) (int nCount, double *x, double *y, double *z) */
16273       CPLFree(arg3);
16274       CPLFree(arg4);
16275       CPLFree(arg5);
16276     }
16277     SWIG_croak_null();
16278   }
16279 }
16280 
16281 
XS(_wrap_CreateCoordinateTransformation)16282 XS(_wrap_CreateCoordinateTransformation) {
16283   {
16284     OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16285     OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
16286     OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) NULL ;
16287     void *argp1 = 0 ;
16288     int res1 = 0 ;
16289     void *argp2 = 0 ;
16290     int res2 = 0 ;
16291     void *argp3 = 0 ;
16292     int res3 = 0 ;
16293     int argvi = 0;
16294     OSRCoordinateTransformationShadow *result = 0 ;
16295     dXSARGS;
16296 
16297     if ((items < 2) || (items > 3)) {
16298       SWIG_croak("Usage: CreateCoordinateTransformation(src,dst,options);");
16299     }
16300     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
16301     if (!SWIG_IsOK(res1)) {
16302       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16303     }
16304     arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16305     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
16306     if (!SWIG_IsOK(res2)) {
16307       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
16308     }
16309     arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
16310     if (items > 2) {
16311       res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 |  0 );
16312       if (!SWIG_IsOK(res3)) {
16313         SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateCoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
16314       }
16315       arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
16316     }
16317     {
16318       CPLErrorReset();
16319       result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
16320       CPLErr eclass = CPLGetLastErrorType();
16321       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16322         do_confess( CPLGetLastErrorMsg(), 0 );
16323 
16324 
16325 
16326 
16327 
16328       }
16329 
16330 
16331       /*
16332           Make warnings regular Perl warnings. This duplicates the warning
16333           message if DontUseExceptions() is in effect (it is not by default).
16334           */
16335       if ( eclass == CE_Warning ) {
16336         warn( CPLGetLastErrorMsg(), "%s" );
16337       }
16338 
16339 
16340     }
16341     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
16342 
16343 
16344 
16345     XSRETURN(argvi);
16346   fail:
16347 
16348 
16349 
16350     SWIG_croak_null();
16351   }
16352 }
16353 
16354 
XS(_wrap_SetPROJSearchPath)16355 XS(_wrap_SetPROJSearchPath) {
16356   {
16357     char *arg1 = (char *) 0 ;
16358     U8 *tmpbuf1 = NULL ;
16359     int argvi = 0;
16360     dXSARGS;
16361 
16362     {
16363       /* %typemap(default) const char * utf8_path */
16364       arg1 = (char *)"";
16365     }
16366     if ((items < 0) || (items > 1)) {
16367       SWIG_croak("Usage: SetPROJSearchPath(utf8_path);");
16368     }
16369     if (items > 0) {
16370       {
16371         /* %typemap(in,numinputs=1) (const char* utf8_path) (U8 *tmpbuf1) */
16372         arg1 = sv_to_utf8_string(ST(0), &tmpbuf1);
16373       }
16374     }
16375     {
16376       CPLErrorReset();
16377       SetPROJSearchPath((char const *)arg1);
16378       CPLErr eclass = CPLGetLastErrorType();
16379       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16380         do_confess( CPLGetLastErrorMsg(), 0 );
16381 
16382 
16383 
16384 
16385 
16386       }
16387 
16388 
16389       /*
16390           Make warnings regular Perl warnings. This duplicates the warning
16391           message if DontUseExceptions() is in effect (it is not by default).
16392           */
16393       if ( eclass == CE_Warning ) {
16394         warn( CPLGetLastErrorMsg(), "%s" );
16395       }
16396 
16397 
16398     }
16399     {
16400       /* %typemap(out) void */
16401     }
16402     {
16403       /* %typemap(freearg) (const char* utf8_path) */
16404       if (tmpbuf1) Safefree(tmpbuf1);
16405     }
16406     XSRETURN(argvi);
16407   fail:
16408     {
16409       /* %typemap(freearg) (const char* utf8_path) */
16410       if (tmpbuf1) Safefree(tmpbuf1);
16411     }
16412     SWIG_croak_null();
16413   }
16414 }
16415 
16416 
XS(_wrap_SetPROJSearchPaths)16417 XS(_wrap_SetPROJSearchPaths) {
16418   {
16419     char **arg1 = (char **) 0 ;
16420     int argvi = 0;
16421     dXSARGS;
16422 
16423     if ((items < 1) || (items > 1)) {
16424       SWIG_croak("Usage: SetPROJSearchPaths(paths);");
16425     }
16426     {
16427       /* %typemap(in) char **options */
16428       if (SvOK(ST(0))) {
16429         if (SvROK(ST(0))) {
16430           if (SvTYPE(SvRV(ST(0)))==SVt_PVAV) {
16431             AV *av = (AV*)(SvRV(ST(0)));
16432             for (int i = 0; i < av_len(av)+1; i++) {
16433               SV *sv = *(av_fetch(av, i, 0));
16434               bool sf;
16435               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
16436               arg1 = CSLAddString(arg1, tmp);
16437               if (sf) Safefree(tmp); else free(tmp);
16438             }
16439           } else if (SvTYPE(SvRV(ST(0)))==SVt_PVHV) {
16440             HV *hv = (HV*)SvRV(ST(0));
16441             SV *sv;
16442             char *key;
16443             I32 klen;
16444             arg1 = NULL;
16445             hv_iterinit(hv);
16446             while(sv = hv_iternextsv(hv, &key, &klen)) {
16447               bool sf;
16448               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
16449               arg1 = CSLAddNameValue(arg1, key, tmp);
16450               if (sf) Safefree(tmp); else free(tmp);
16451             }
16452           } else
16453           do_confess(NEED_REF, 1);
16454         } else
16455         do_confess(NEED_REF, 1);
16456       }
16457     }
16458     {
16459       CPLErrorReset();
16460       SetPROJSearchPaths(arg1);
16461       CPLErr eclass = CPLGetLastErrorType();
16462       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16463         do_confess( CPLGetLastErrorMsg(), 0 );
16464 
16465 
16466 
16467 
16468 
16469       }
16470 
16471 
16472       /*
16473           Make warnings regular Perl warnings. This duplicates the warning
16474           message if DontUseExceptions() is in effect (it is not by default).
16475           */
16476       if ( eclass == CE_Warning ) {
16477         warn( CPLGetLastErrorMsg(), "%s" );
16478       }
16479 
16480 
16481     }
16482     {
16483       /* %typemap(out) void */
16484     }
16485     {
16486       /* %typemap(freearg) char **options */
16487       if (arg1) CSLDestroy( arg1 );
16488     }
16489     XSRETURN(argvi);
16490   fail:
16491     {
16492       /* %typemap(freearg) char **options */
16493       if (arg1) CSLDestroy( arg1 );
16494     }
16495     SWIG_croak_null();
16496   }
16497 }
16498 
16499 
XS(_wrap_GetPROJSearchPaths)16500 XS(_wrap_GetPROJSearchPaths) {
16501   {
16502     int argvi = 0;
16503     char **result = 0 ;
16504     dXSARGS;
16505 
16506     if ((items < 0) || (items > 0)) {
16507       SWIG_croak("Usage: GetPROJSearchPaths();");
16508     }
16509     {
16510       CPLErrorReset();
16511       result = (char **)GetPROJSearchPaths();
16512       CPLErr eclass = CPLGetLastErrorType();
16513       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16514         do_confess( CPLGetLastErrorMsg(), 0 );
16515 
16516 
16517 
16518 
16519 
16520       }
16521 
16522 
16523       /*
16524           Make warnings regular Perl warnings. This duplicates the warning
16525           message if DontUseExceptions() is in effect (it is not by default).
16526           */
16527       if ( eclass == CE_Warning ) {
16528         warn( CPLGetLastErrorMsg(), "%s" );
16529       }
16530 
16531 
16532     }
16533     {
16534       /* %typemap(out) char **CSL */
16535       if (GIMME_V == G_ARRAY) {
16536         if (result) {
16537           int n = CSLCount(result);
16538           EXTEND(SP, argvi+n-items+1);
16539           int i;
16540           for (i = 0; result[i]; i++) {
16541             SV *sv = newSVpv(result[i], 0);
16542             SvUTF8_on(sv); /* expecting GDAL to give us UTF-8 */
16543             ST(argvi++) = sv_2mortal(sv);
16544           }
16545           CSLDestroy(result);
16546         }
16547       } else {
16548         AV *av = (AV*)sv_2mortal((SV*)newAV());
16549         if (result) {
16550           int i;
16551           for (i = 0; result[i]; i++) {
16552             SV *sv = newSVpv(result[i], 0);
16553             SvUTF8_on(sv); /* expecting GDAL to give us UTF-8 */
16554             av_push(av, sv);
16555           }
16556           CSLDestroy(result);
16557         }
16558         ST(argvi) = newRV((SV*)av);
16559         sv_2mortal(ST(argvi));
16560         argvi++;
16561       }
16562     }
16563     XSRETURN(argvi);
16564   fail:
16565     SWIG_croak_null();
16566   }
16567 }
16568 
16569 
XS(_wrap_GetPROJVersionMajor)16570 XS(_wrap_GetPROJVersionMajor) {
16571   {
16572     int argvi = 0;
16573     int result;
16574     dXSARGS;
16575 
16576     if ((items < 0) || (items > 0)) {
16577       SWIG_croak("Usage: GetPROJVersionMajor();");
16578     }
16579     {
16580       CPLErrorReset();
16581       result = (int)GetPROJVersionMajor();
16582       CPLErr eclass = CPLGetLastErrorType();
16583       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16584         do_confess( CPLGetLastErrorMsg(), 0 );
16585 
16586 
16587 
16588 
16589 
16590       }
16591 
16592 
16593       /*
16594           Make warnings regular Perl warnings. This duplicates the warning
16595           message if DontUseExceptions() is in effect (it is not by default).
16596           */
16597       if ( eclass == CE_Warning ) {
16598         warn( CPLGetLastErrorMsg(), "%s" );
16599       }
16600 
16601 
16602     }
16603     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
16604     XSRETURN(argvi);
16605   fail:
16606     SWIG_croak_null();
16607   }
16608 }
16609 
16610 
XS(_wrap_GetPROJVersionMinor)16611 XS(_wrap_GetPROJVersionMinor) {
16612   {
16613     int argvi = 0;
16614     int result;
16615     dXSARGS;
16616 
16617     if ((items < 0) || (items > 0)) {
16618       SWIG_croak("Usage: GetPROJVersionMinor();");
16619     }
16620     {
16621       CPLErrorReset();
16622       result = (int)GetPROJVersionMinor();
16623       CPLErr eclass = CPLGetLastErrorType();
16624       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16625         do_confess( CPLGetLastErrorMsg(), 0 );
16626 
16627 
16628 
16629 
16630 
16631       }
16632 
16633 
16634       /*
16635           Make warnings regular Perl warnings. This duplicates the warning
16636           message if DontUseExceptions() is in effect (it is not by default).
16637           */
16638       if ( eclass == CE_Warning ) {
16639         warn( CPLGetLastErrorMsg(), "%s" );
16640       }
16641 
16642 
16643     }
16644     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
16645     XSRETURN(argvi);
16646   fail:
16647     SWIG_croak_null();
16648   }
16649 }
16650 
16651 
XS(_wrap_GetPROJVersionMicro)16652 XS(_wrap_GetPROJVersionMicro) {
16653   {
16654     int argvi = 0;
16655     int result;
16656     dXSARGS;
16657 
16658     if ((items < 0) || (items > 0)) {
16659       SWIG_croak("Usage: GetPROJVersionMicro();");
16660     }
16661     {
16662       CPLErrorReset();
16663       result = (int)GetPROJVersionMicro();
16664       CPLErr eclass = CPLGetLastErrorType();
16665       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16666         do_confess( CPLGetLastErrorMsg(), 0 );
16667 
16668 
16669 
16670 
16671 
16672       }
16673 
16674 
16675       /*
16676           Make warnings regular Perl warnings. This duplicates the warning
16677           message if DontUseExceptions() is in effect (it is not by default).
16678           */
16679       if ( eclass == CE_Warning ) {
16680         warn( CPLGetLastErrorMsg(), "%s" );
16681       }
16682 
16683 
16684     }
16685     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
16686     XSRETURN(argvi);
16687   fail:
16688     SWIG_croak_null();
16689   }
16690 }
16691 
16692 
XS(_wrap_SetPROJAuxDbPath)16693 XS(_wrap_SetPROJAuxDbPath) {
16694   {
16695     char *arg1 = (char *) 0 ;
16696     U8 *tmpbuf1 = NULL ;
16697     int argvi = 0;
16698     dXSARGS;
16699 
16700     {
16701       /* %typemap(default) const char * utf8_path */
16702       arg1 = (char *)"";
16703     }
16704     if ((items < 0) || (items > 1)) {
16705       SWIG_croak("Usage: SetPROJAuxDbPath(utf8_path);");
16706     }
16707     if (items > 0) {
16708       {
16709         /* %typemap(in,numinputs=1) (const char* utf8_path) (U8 *tmpbuf1) */
16710         arg1 = sv_to_utf8_string(ST(0), &tmpbuf1);
16711       }
16712     }
16713     {
16714       CPLErrorReset();
16715       SetPROJAuxDbPath((char const *)arg1);
16716       CPLErr eclass = CPLGetLastErrorType();
16717       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16718         do_confess( CPLGetLastErrorMsg(), 0 );
16719 
16720 
16721 
16722 
16723 
16724       }
16725 
16726 
16727       /*
16728           Make warnings regular Perl warnings. This duplicates the warning
16729           message if DontUseExceptions() is in effect (it is not by default).
16730           */
16731       if ( eclass == CE_Warning ) {
16732         warn( CPLGetLastErrorMsg(), "%s" );
16733       }
16734 
16735 
16736     }
16737     {
16738       /* %typemap(out) void */
16739     }
16740     {
16741       /* %typemap(freearg) (const char* utf8_path) */
16742       if (tmpbuf1) Safefree(tmpbuf1);
16743     }
16744     XSRETURN(argvi);
16745   fail:
16746     {
16747       /* %typemap(freearg) (const char* utf8_path) */
16748       if (tmpbuf1) Safefree(tmpbuf1);
16749     }
16750     SWIG_croak_null();
16751   }
16752 }
16753 
16754 
XS(_wrap_SetPROJAuxDbPaths)16755 XS(_wrap_SetPROJAuxDbPaths) {
16756   {
16757     char **arg1 = (char **) 0 ;
16758     int argvi = 0;
16759     dXSARGS;
16760 
16761     if ((items < 1) || (items > 1)) {
16762       SWIG_croak("Usage: SetPROJAuxDbPaths(paths);");
16763     }
16764     {
16765       /* %typemap(in) char **options */
16766       if (SvOK(ST(0))) {
16767         if (SvROK(ST(0))) {
16768           if (SvTYPE(SvRV(ST(0)))==SVt_PVAV) {
16769             AV *av = (AV*)(SvRV(ST(0)));
16770             for (int i = 0; i < av_len(av)+1; i++) {
16771               SV *sv = *(av_fetch(av, i, 0));
16772               bool sf;
16773               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
16774               arg1 = CSLAddString(arg1, tmp);
16775               if (sf) Safefree(tmp); else free(tmp);
16776             }
16777           } else if (SvTYPE(SvRV(ST(0)))==SVt_PVHV) {
16778             HV *hv = (HV*)SvRV(ST(0));
16779             SV *sv;
16780             char *key;
16781             I32 klen;
16782             arg1 = NULL;
16783             hv_iterinit(hv);
16784             while(sv = hv_iternextsv(hv, &key, &klen)) {
16785               bool sf;
16786               char *tmp = sv_to_utf8_string(sv, NULL, &sf);
16787               arg1 = CSLAddNameValue(arg1, key, tmp);
16788               if (sf) Safefree(tmp); else free(tmp);
16789             }
16790           } else
16791           do_confess(NEED_REF, 1);
16792         } else
16793         do_confess(NEED_REF, 1);
16794       }
16795     }
16796     {
16797       CPLErrorReset();
16798       SetPROJAuxDbPaths(arg1);
16799       CPLErr eclass = CPLGetLastErrorType();
16800       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16801         do_confess( CPLGetLastErrorMsg(), 0 );
16802 
16803 
16804 
16805 
16806 
16807       }
16808 
16809 
16810       /*
16811           Make warnings regular Perl warnings. This duplicates the warning
16812           message if DontUseExceptions() is in effect (it is not by default).
16813           */
16814       if ( eclass == CE_Warning ) {
16815         warn( CPLGetLastErrorMsg(), "%s" );
16816       }
16817 
16818 
16819     }
16820     {
16821       /* %typemap(out) void */
16822     }
16823     {
16824       /* %typemap(freearg) char **options */
16825       if (arg1) CSLDestroy( arg1 );
16826     }
16827     XSRETURN(argvi);
16828   fail:
16829     {
16830       /* %typemap(freearg) char **options */
16831       if (arg1) CSLDestroy( arg1 );
16832     }
16833     SWIG_croak_null();
16834   }
16835 }
16836 
16837 
XS(_wrap_GetPROJAuxDbPaths)16838 XS(_wrap_GetPROJAuxDbPaths) {
16839   {
16840     int argvi = 0;
16841     char **result = 0 ;
16842     dXSARGS;
16843 
16844     if ((items < 0) || (items > 0)) {
16845       SWIG_croak("Usage: GetPROJAuxDbPaths();");
16846     }
16847     {
16848       CPLErrorReset();
16849       result = (char **)GetPROJAuxDbPaths();
16850       CPLErr eclass = CPLGetLastErrorType();
16851       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16852         do_confess( CPLGetLastErrorMsg(), 0 );
16853 
16854 
16855 
16856 
16857 
16858       }
16859 
16860 
16861       /*
16862           Make warnings regular Perl warnings. This duplicates the warning
16863           message if DontUseExceptions() is in effect (it is not by default).
16864           */
16865       if ( eclass == CE_Warning ) {
16866         warn( CPLGetLastErrorMsg(), "%s" );
16867       }
16868 
16869 
16870     }
16871     {
16872       /* %typemap(out) char **CSL */
16873       if (GIMME_V == G_ARRAY) {
16874         if (result) {
16875           int n = CSLCount(result);
16876           EXTEND(SP, argvi+n-items+1);
16877           int i;
16878           for (i = 0; result[i]; i++) {
16879             SV *sv = newSVpv(result[i], 0);
16880             SvUTF8_on(sv); /* expecting GDAL to give us UTF-8 */
16881             ST(argvi++) = sv_2mortal(sv);
16882           }
16883           CSLDestroy(result);
16884         }
16885       } else {
16886         AV *av = (AV*)sv_2mortal((SV*)newAV());
16887         if (result) {
16888           int i;
16889           for (i = 0; result[i]; i++) {
16890             SV *sv = newSVpv(result[i], 0);
16891             SvUTF8_on(sv); /* expecting GDAL to give us UTF-8 */
16892             av_push(av, sv);
16893           }
16894           CSLDestroy(result);
16895         }
16896         ST(argvi) = newRV((SV*)av);
16897         sv_2mortal(ST(argvi));
16898         argvi++;
16899       }
16900     }
16901     XSRETURN(argvi);
16902   fail:
16903     SWIG_croak_null();
16904   }
16905 }
16906 
16907 
16908 
16909 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
16910 
16911 static swig_type_info _swigt__p_OGRCoordinateTransformationOptions = {"_p_OGRCoordinateTransformationOptions", "OGRCoordinateTransformationOptions *", 0, 0, (void*)"Geo::OSR::CoordinateTransformationOptions", 0};
16912 static swig_type_info _swigt__p_OSRAreaOfUse = {"_p_OSRAreaOfUse", "OSRAreaOfUse *", 0, 0, (void*)"Geo::OSR::AreaOfUse", 0};
16913 static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)"Geo::OSR::CoordinateTransformation", 0};
16914 static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)"Geo::OSR::SpatialReference", 0};
16915 static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
16916 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
16917 static swig_type_info _swigt__p_int = {"_p_int", "OSRAxisMappingStrategy *|int *|OGRAxisOrientation *|OGRErr *", 0, 0, (void*)0, 0};
16918 static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
16919 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
16920 static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
16921 static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
16922 
16923 static swig_type_info *swig_type_initial[] = {
16924   &_swigt__p_OGRCoordinateTransformationOptions,
16925   &_swigt__p_OSRAreaOfUse,
16926   &_swigt__p_OSRCoordinateTransformationShadow,
16927   &_swigt__p_OSRSpatialReferenceShadow,
16928   &_swigt__p_char,
16929   &_swigt__p_double,
16930   &_swigt__p_int,
16931   &_swigt__p_long,
16932   &_swigt__p_p_char,
16933   &_swigt__p_p_double,
16934   &_swigt__p_p_int,
16935 };
16936 
16937 static swig_cast_info _swigc__p_OGRCoordinateTransformationOptions[] = {  {&_swigt__p_OGRCoordinateTransformationOptions, 0, 0, 0},{0, 0, 0, 0}};
16938 static swig_cast_info _swigc__p_OSRAreaOfUse[] = {  {&_swigt__p_OSRAreaOfUse, 0, 0, 0},{0, 0, 0, 0}};
16939 static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
16940 static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
16941 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
16942 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
16943 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
16944 static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
16945 static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
16946 static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
16947 static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
16948 
16949 static swig_cast_info *swig_cast_initial[] = {
16950   _swigc__p_OGRCoordinateTransformationOptions,
16951   _swigc__p_OSRAreaOfUse,
16952   _swigc__p_OSRCoordinateTransformationShadow,
16953   _swigc__p_OSRSpatialReferenceShadow,
16954   _swigc__p_char,
16955   _swigc__p_double,
16956   _swigc__p_int,
16957   _swigc__p_long,
16958   _swigc__p_p_char,
16959   _swigc__p_p_double,
16960   _swigc__p_p_int,
16961 };
16962 
16963 
16964 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
16965 
16966 static swig_constant_info swig_constants[] = {
16967 {0,0,0,0,0,0}
16968 };
16969 #ifdef __cplusplus
16970 }
16971 #endif
16972 static swig_variable_info swig_variables[] = {
16973 {0,0,0,0}
16974 };
16975 static swig_command_info swig_commands[] = {
16976 {"Geo::OSRc::UseExceptions", _wrap_UseExceptions},
16977 {"Geo::OSRc::DontUseExceptions", _wrap_DontUseExceptions},
16978 {"Geo::OSRc::GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT},
16979 {"Geo::OSRc::GetUserInputAsWKT", _wrap_GetUserInputAsWKT},
16980 {"Geo::OSRc::AreaOfUse_west_lon_degree_get", _wrap_AreaOfUse_west_lon_degree_get},
16981 {"Geo::OSRc::AreaOfUse_south_lat_degree_get", _wrap_AreaOfUse_south_lat_degree_get},
16982 {"Geo::OSRc::AreaOfUse_east_lon_degree_get", _wrap_AreaOfUse_east_lon_degree_get},
16983 {"Geo::OSRc::AreaOfUse_north_lat_degree_get", _wrap_AreaOfUse_north_lat_degree_get},
16984 {"Geo::OSRc::AreaOfUse_name_get", _wrap_AreaOfUse_name_get},
16985 {"Geo::OSRc::new_AreaOfUse", _wrap_new_AreaOfUse},
16986 {"Geo::OSRc::delete_AreaOfUse", _wrap_delete_AreaOfUse},
16987 {"Geo::OSRc::OSRAreaOfUse_west_lon_degree_get", _wrap_OSRAreaOfUse_west_lon_degree_get},
16988 {"Geo::OSRc::OSRAreaOfUse_south_lat_degree_get", _wrap_OSRAreaOfUse_south_lat_degree_get},
16989 {"Geo::OSRc::OSRAreaOfUse_east_lon_degree_get", _wrap_OSRAreaOfUse_east_lon_degree_get},
16990 {"Geo::OSRc::OSRAreaOfUse_north_lat_degree_get", _wrap_OSRAreaOfUse_north_lat_degree_get},
16991 {"Geo::OSRc::OSRAreaOfUse_name_get", _wrap_OSRAreaOfUse_name_get},
16992 {"Geo::OSRc::new_SpatialReference", _wrap_new_SpatialReference},
16993 {"Geo::OSRc::delete_SpatialReference", _wrap_delete_SpatialReference},
16994 {"Geo::OSRc::SpatialReference_GetName", _wrap_SpatialReference_GetName},
16995 {"Geo::OSRc::SpatialReference_IsSame", _wrap_SpatialReference_IsSame},
16996 {"Geo::OSRc::SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS},
16997 {"Geo::OSRc::SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS},
16998 {"Geo::OSRc::SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic},
16999 {"Geo::OSRc::SpatialReference_IsDerivedGeographic", _wrap_SpatialReference_IsDerivedGeographic},
17000 {"Geo::OSRc::SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected},
17001 {"Geo::OSRc::SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound},
17002 {"Geo::OSRc::SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric},
17003 {"Geo::OSRc::SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal},
17004 {"Geo::OSRc::SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical},
17005 {"Geo::OSRc::SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong},
17006 {"Geo::OSRc::SpatialReference_EPSGTreatsAsNorthingEasting", _wrap_SpatialReference_EPSGTreatsAsNorthingEasting},
17007 {"Geo::OSRc::SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority},
17008 {"Geo::OSRc::SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue},
17009 {"Geo::OSRc::SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue},
17010 {"Geo::OSRc::SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits},
17011 {"Geo::OSRc::SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits},
17012 {"Geo::OSRc::SpatialReference_GetAngularUnitsName", _wrap_SpatialReference_GetAngularUnitsName},
17013 {"Geo::OSRc::SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits},
17014 {"Geo::OSRc::SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits},
17015 {"Geo::OSRc::SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters},
17016 {"Geo::OSRc::SpatialReference_GetTargetLinearUnits", _wrap_SpatialReference_GetTargetLinearUnits},
17017 {"Geo::OSRc::SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits},
17018 {"Geo::OSRc::SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName},
17019 {"Geo::OSRc::SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode},
17020 {"Geo::OSRc::SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName},
17021 {"Geo::OSRc::SpatialReference_GetAreaOfUse", _wrap_SpatialReference_GetAreaOfUse},
17022 {"Geo::OSRc::SpatialReference_GetAxisName", _wrap_SpatialReference_GetAxisName},
17023 {"Geo::OSRc::SpatialReference_GetAxesCount", _wrap_SpatialReference_GetAxesCount},
17024 {"Geo::OSRc::SpatialReference_GetAxisOrientation", _wrap_SpatialReference_GetAxisOrientation},
17025 {"Geo::OSRc::SpatialReference_GetAxisMappingStrategy", _wrap_SpatialReference_GetAxisMappingStrategy},
17026 {"Geo::OSRc::SpatialReference_SetAxisMappingStrategy", _wrap_SpatialReference_SetAxisMappingStrategy},
17027 {"Geo::OSRc::SpatialReference_GetDataAxisToSRSAxisMapping", _wrap_SpatialReference_GetDataAxisToSRSAxisMapping},
17028 {"Geo::OSRc::SpatialReference_SetDataAxisToSRSAxisMapping", _wrap_SpatialReference_SetDataAxisToSRSAxisMapping},
17029 {"Geo::OSRc::SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM},
17030 {"Geo::OSRc::SpatialReference__GetUTMZone", _wrap_SpatialReference__GetUTMZone},
17031 {"Geo::OSRc::SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane},
17032 {"Geo::OSRc::SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG},
17033 {"Geo::OSRc::SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection},
17034 {"Geo::OSRc::SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm},
17035 {"Geo::OSRc::SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm},
17036 {"Geo::OSRc::SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm},
17037 {"Geo::OSRc::SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm},
17038 {"Geo::OSRc::SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor},
17039 {"Geo::OSRc::SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor},
17040 {"Geo::OSRc::SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening},
17041 {"Geo::OSRc::SpatialReference_SetACEA", _wrap_SpatialReference_SetACEA},
17042 {"Geo::OSRc::SpatialReference_SetAE", _wrap_SpatialReference_SetAE},
17043 {"Geo::OSRc::SpatialReference_SetBonne", _wrap_SpatialReference_SetBonne},
17044 {"Geo::OSRc::SpatialReference_SetCEA", _wrap_SpatialReference_SetCEA},
17045 {"Geo::OSRc::SpatialReference_SetCS", _wrap_SpatialReference_SetCS},
17046 {"Geo::OSRc::SpatialReference_SetEC", _wrap_SpatialReference_SetEC},
17047 {"Geo::OSRc::SpatialReference_SetEckertIV", _wrap_SpatialReference_SetEckertIV},
17048 {"Geo::OSRc::SpatialReference_SetEckertVI", _wrap_SpatialReference_SetEckertVI},
17049 {"Geo::OSRc::SpatialReference_SetEquirectangular", _wrap_SpatialReference_SetEquirectangular},
17050 {"Geo::OSRc::SpatialReference_SetEquirectangular2", _wrap_SpatialReference_SetEquirectangular2},
17051 {"Geo::OSRc::SpatialReference_SetGaussSchreiberTMercator", _wrap_SpatialReference_SetGaussSchreiberTMercator},
17052 {"Geo::OSRc::SpatialReference_SetGS", _wrap_SpatialReference_SetGS},
17053 {"Geo::OSRc::SpatialReference_SetGH", _wrap_SpatialReference_SetGH},
17054 {"Geo::OSRc::SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH},
17055 {"Geo::OSRc::SpatialReference_SetGEOS", _wrap_SpatialReference_SetGEOS},
17056 {"Geo::OSRc::SpatialReference_SetGnomonic", _wrap_SpatialReference_SetGnomonic},
17057 {"Geo::OSRc::SpatialReference_SetHOM", _wrap_SpatialReference_SetHOM},
17058 {"Geo::OSRc::SpatialReference_SetHOM2PNO", _wrap_SpatialReference_SetHOM2PNO},
17059 {"Geo::OSRc::SpatialReference_SetKrovak", _wrap_SpatialReference_SetKrovak},
17060 {"Geo::OSRc::SpatialReference_SetLAEA", _wrap_SpatialReference_SetLAEA},
17061 {"Geo::OSRc::SpatialReference_SetLCC", _wrap_SpatialReference_SetLCC},
17062 {"Geo::OSRc::SpatialReference_SetLCC1SP", _wrap_SpatialReference_SetLCC1SP},
17063 {"Geo::OSRc::SpatialReference_SetLCCB", _wrap_SpatialReference_SetLCCB},
17064 {"Geo::OSRc::SpatialReference_SetMC", _wrap_SpatialReference_SetMC},
17065 {"Geo::OSRc::SpatialReference_SetMercator", _wrap_SpatialReference_SetMercator},
17066 {"Geo::OSRc::SpatialReference_SetMercator2SP", _wrap_SpatialReference_SetMercator2SP},
17067 {"Geo::OSRc::SpatialReference_SetMollweide", _wrap_SpatialReference_SetMollweide},
17068 {"Geo::OSRc::SpatialReference_SetNZMG", _wrap_SpatialReference_SetNZMG},
17069 {"Geo::OSRc::SpatialReference_SetOS", _wrap_SpatialReference_SetOS},
17070 {"Geo::OSRc::SpatialReference_SetOrthographic", _wrap_SpatialReference_SetOrthographic},
17071 {"Geo::OSRc::SpatialReference_SetPolyconic", _wrap_SpatialReference_SetPolyconic},
17072 {"Geo::OSRc::SpatialReference_SetPS", _wrap_SpatialReference_SetPS},
17073 {"Geo::OSRc::SpatialReference_SetRobinson", _wrap_SpatialReference_SetRobinson},
17074 {"Geo::OSRc::SpatialReference_SetSinusoidal", _wrap_SpatialReference_SetSinusoidal},
17075 {"Geo::OSRc::SpatialReference_SetStereographic", _wrap_SpatialReference_SetStereographic},
17076 {"Geo::OSRc::SpatialReference_SetSOC", _wrap_SpatialReference_SetSOC},
17077 {"Geo::OSRc::SpatialReference_SetTM", _wrap_SpatialReference_SetTM},
17078 {"Geo::OSRc::SpatialReference_SetTMVariant", _wrap_SpatialReference_SetTMVariant},
17079 {"Geo::OSRc::SpatialReference_SetTMG", _wrap_SpatialReference_SetTMG},
17080 {"Geo::OSRc::SpatialReference_SetTMSO", _wrap_SpatialReference_SetTMSO},
17081 {"Geo::OSRc::SpatialReference_SetVDG", _wrap_SpatialReference_SetVDG},
17082 {"Geo::OSRc::SpatialReference_SetVerticalPerspective", _wrap_SpatialReference_SetVerticalPerspective},
17083 {"Geo::OSRc::SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS},
17084 {"Geo::OSRc::SpatialReference_SetFromUserInput", _wrap_SpatialReference_SetFromUserInput},
17085 {"Geo::OSRc::SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom},
17086 {"Geo::OSRc::SpatialReference_SetTOWGS84", _wrap_SpatialReference_SetTOWGS84},
17087 {"Geo::OSRc::SpatialReference_HasTOWGS84", _wrap_SpatialReference_HasTOWGS84},
17088 {"Geo::OSRc::SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84},
17089 {"Geo::OSRc::SpatialReference_AddGuessedTOWGS84", _wrap_SpatialReference_AddGuessedTOWGS84},
17090 {"Geo::OSRc::SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS},
17091 {"Geo::OSRc::SpatialReference_SetGeogCS", _wrap_SpatialReference_SetGeogCS},
17092 {"Geo::OSRc::SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS},
17093 {"Geo::OSRc::SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS},
17094 {"Geo::OSRc::SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS},
17095 {"Geo::OSRc::SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS},
17096 {"Geo::OSRc::SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt},
17097 {"Geo::OSRc::SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4},
17098 {"Geo::OSRc::SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl},
17099 {"Geo::OSRc::SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI},
17100 {"Geo::OSRc::SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG},
17101 {"Geo::OSRc::SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA},
17102 {"Geo::OSRc::SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI},
17103 {"Geo::OSRc::SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS},
17104 {"Geo::OSRc::SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML},
17105 {"Geo::OSRc::SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM},
17106 {"Geo::OSRc::SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys},
17107 {"Geo::OSRc::SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi},
17108 {"Geo::OSRc::SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt},
17109 {"Geo::OSRc::SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt},
17110 {"Geo::OSRc::SpatialReference_ExportToPROJJSON", _wrap_SpatialReference_ExportToPROJJSON},
17111 {"Geo::OSRc::SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4},
17112 {"Geo::OSRc::SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI},
17113 {"Geo::OSRc::SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS},
17114 {"Geo::OSRc::SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML},
17115 {"Geo::OSRc::SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys},
17116 {"Geo::OSRc::SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS},
17117 {"Geo::OSRc::SpatialReference_Clone", _wrap_SpatialReference_Clone},
17118 {"Geo::OSRc::SpatialReference_Validate", _wrap_SpatialReference_Validate},
17119 {"Geo::OSRc::SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI},
17120 {"Geo::OSRc::SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI},
17121 {"Geo::OSRc::SpatialReference_ConvertToOtherProjection", _wrap_SpatialReference_ConvertToOtherProjection},
17122 {"Geo::OSRc::SpatialReference_PromoteTo3D", _wrap_SpatialReference_PromoteTo3D},
17123 {"Geo::OSRc::SpatialReference_DemoteTo2D", _wrap_SpatialReference_DemoteTo2D},
17124 {"Geo::OSRc::new_CoordinateTransformationOptions", _wrap_new_CoordinateTransformationOptions},
17125 {"Geo::OSRc::delete_CoordinateTransformationOptions", _wrap_delete_CoordinateTransformationOptions},
17126 {"Geo::OSRc::CoordinateTransformationOptions_SetAreaOfInterest", _wrap_CoordinateTransformationOptions_SetAreaOfInterest},
17127 {"Geo::OSRc::CoordinateTransformationOptions_SetOperation", _wrap_CoordinateTransformationOptions_SetOperation},
17128 {"Geo::OSRc::CoordinateTransformationOptions_SetDesiredAccuracy", _wrap_CoordinateTransformationOptions_SetDesiredAccuracy},
17129 {"Geo::OSRc::CoordinateTransformationOptions_SetBallparkAllowed", _wrap_CoordinateTransformationOptions_SetBallparkAllowed},
17130 {"Geo::OSRc::new_CoordinateTransformation", _wrap_new_CoordinateTransformation},
17131 {"Geo::OSRc::delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation},
17132 {"Geo::OSRc::CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint},
17133 {"Geo::OSRc::CoordinateTransformation_TransformPointWithErrorCode", _wrap_CoordinateTransformation_TransformPointWithErrorCode},
17134 {"Geo::OSRc::CoordinateTransformation__TransformPoints", _wrap_CoordinateTransformation__TransformPoints},
17135 {"Geo::OSRc::CreateCoordinateTransformation", _wrap_CreateCoordinateTransformation},
17136 {"Geo::OSRc::SetPROJSearchPath", _wrap_SetPROJSearchPath},
17137 {"Geo::OSRc::SetPROJSearchPaths", _wrap_SetPROJSearchPaths},
17138 {"Geo::OSRc::GetPROJSearchPaths", _wrap_GetPROJSearchPaths},
17139 {"Geo::OSRc::GetPROJVersionMajor", _wrap_GetPROJVersionMajor},
17140 {"Geo::OSRc::GetPROJVersionMinor", _wrap_GetPROJVersionMinor},
17141 {"Geo::OSRc::GetPROJVersionMicro", _wrap_GetPROJVersionMicro},
17142 {"Geo::OSRc::SetPROJAuxDbPath", _wrap_SetPROJAuxDbPath},
17143 {"Geo::OSRc::SetPROJAuxDbPaths", _wrap_SetPROJAuxDbPaths},
17144 {"Geo::OSRc::GetPROJAuxDbPaths", _wrap_GetPROJAuxDbPaths},
17145 {0,0}
17146 };
17147 /* -----------------------------------------------------------------------------
17148  * Type initialization:
17149  * This problem is tough by the requirement that no dynamic
17150  * memory is used. Also, since swig_type_info structures store pointers to
17151  * swig_cast_info structures and swig_cast_info structures store pointers back
17152  * to swig_type_info structures, we need some lookup code at initialization.
17153  * The idea is that swig generates all the structures that are needed.
17154  * The runtime then collects these partially filled structures.
17155  * The SWIG_InitializeModule function takes these initial arrays out of
17156  * swig_module, and does all the lookup, filling in the swig_module.types
17157  * array with the correct data and linking the correct swig_cast_info
17158  * structures together.
17159  *
17160  * The generated swig_type_info structures are assigned statically to an initial
17161  * array. We just loop through that array, and handle each type individually.
17162  * First we lookup if this type has been already loaded, and if so, use the
17163  * loaded structure instead of the generated one. Then we have to fill in the
17164  * cast linked list. The cast data is initially stored in something like a
17165  * two-dimensional array. Each row corresponds to a type (there are the same
17166  * number of rows as there are in the swig_type_initial array). Each entry in
17167  * a column is one of the swig_cast_info structures for that type.
17168  * The cast_initial array is actually an array of arrays, because each row has
17169  * a variable number of columns. So to actually build the cast linked list,
17170  * we find the array of casts associated with the type, and loop through it
17171  * adding the casts to the list. The one last trick we need to do is making
17172  * sure the type pointer in the swig_cast_info struct is correct.
17173  *
17174  * First off, we lookup the cast->type name to see if it is already loaded.
17175  * There are three cases to handle:
17176  *  1) If the cast->type has already been loaded AND the type we are adding
17177  *     casting info to has not been loaded (it is in this module), THEN we
17178  *     replace the cast->type pointer with the type pointer that has already
17179  *     been loaded.
17180  *  2) If BOTH types (the one we are adding casting info to, and the
17181  *     cast->type) are loaded, THEN the cast info has already been loaded by
17182  *     the previous module so we just ignore it.
17183  *  3) Finally, if cast->type has not already been loaded, then we add that
17184  *     swig_cast_info to the linked list (because the cast->type) pointer will
17185  *     be correct.
17186  * ----------------------------------------------------------------------------- */
17187 
17188 #ifdef __cplusplus
17189 extern "C" {
17190 #if 0
17191 } /* c-mode */
17192 #endif
17193 #endif
17194 
17195 #if 0
17196 #define SWIGRUNTIME_DEBUG
17197 #endif
17198 
17199 
17200 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)17201 SWIG_InitializeModule(void *clientdata) {
17202   size_t i;
17203   swig_module_info *module_head, *iter;
17204   int init;
17205 
17206   /* check to see if the circular list has been setup, if not, set it up */
17207   if (swig_module.next==0) {
17208     /* Initialize the swig_module */
17209     swig_module.type_initial = swig_type_initial;
17210     swig_module.cast_initial = swig_cast_initial;
17211     swig_module.next = &swig_module;
17212     init = 1;
17213   } else {
17214     init = 0;
17215   }
17216 
17217   /* Try and load any already created modules */
17218   module_head = SWIG_GetModule(clientdata);
17219   if (!module_head) {
17220     /* This is the first module loaded for this interpreter */
17221     /* so set the swig module into the interpreter */
17222     SWIG_SetModule(clientdata, &swig_module);
17223   } else {
17224     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
17225     iter=module_head;
17226     do {
17227       if (iter==&swig_module) {
17228         /* Our module is already in the list, so there's nothing more to do. */
17229         return;
17230       }
17231       iter=iter->next;
17232     } while (iter!= module_head);
17233 
17234     /* otherwise we must add our module into the list */
17235     swig_module.next = module_head->next;
17236     module_head->next = &swig_module;
17237   }
17238 
17239   /* When multiple interpreters are used, a module could have already been initialized in
17240        a different interpreter, but not yet have a pointer in this interpreter.
17241        In this case, we do not want to continue adding types... everything should be
17242        set up already */
17243   if (init == 0) return;
17244 
17245   /* Now work on filling in swig_module.types */
17246 #ifdef SWIGRUNTIME_DEBUG
17247   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
17248 #endif
17249   for (i = 0; i < swig_module.size; ++i) {
17250     swig_type_info *type = 0;
17251     swig_type_info *ret;
17252     swig_cast_info *cast;
17253 
17254 #ifdef SWIGRUNTIME_DEBUG
17255     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
17256 #endif
17257 
17258     /* if there is another module already loaded */
17259     if (swig_module.next != &swig_module) {
17260       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
17261     }
17262     if (type) {
17263       /* Overwrite clientdata field */
17264 #ifdef SWIGRUNTIME_DEBUG
17265       printf("SWIG_InitializeModule: found type %s\n", type->name);
17266 #endif
17267       if (swig_module.type_initial[i]->clientdata) {
17268         type->clientdata = swig_module.type_initial[i]->clientdata;
17269 #ifdef SWIGRUNTIME_DEBUG
17270         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
17271 #endif
17272       }
17273     } else {
17274       type = swig_module.type_initial[i];
17275     }
17276 
17277     /* Insert casting types */
17278     cast = swig_module.cast_initial[i];
17279     while (cast->type) {
17280       /* Don't need to add information already in the list */
17281       ret = 0;
17282 #ifdef SWIGRUNTIME_DEBUG
17283       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
17284 #endif
17285       if (swig_module.next != &swig_module) {
17286         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
17287 #ifdef SWIGRUNTIME_DEBUG
17288         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
17289 #endif
17290       }
17291       if (ret) {
17292         if (type == swig_module.type_initial[i]) {
17293 #ifdef SWIGRUNTIME_DEBUG
17294           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
17295 #endif
17296           cast->type = ret;
17297           ret = 0;
17298         } else {
17299           /* Check for casting already in the list */
17300           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
17301 #ifdef SWIGRUNTIME_DEBUG
17302           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
17303 #endif
17304           if (!ocast) ret = 0;
17305         }
17306       }
17307 
17308       if (!ret) {
17309 #ifdef SWIGRUNTIME_DEBUG
17310         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
17311 #endif
17312         if (type->cast) {
17313           type->cast->prev = cast;
17314           cast->next = type->cast;
17315         }
17316         type->cast = cast;
17317       }
17318       cast++;
17319     }
17320     /* Set entry in modules->types array equal to the type */
17321     swig_module.types[i] = type;
17322   }
17323   swig_module.types[i] = 0;
17324 
17325 #ifdef SWIGRUNTIME_DEBUG
17326   printf("**** SWIG_InitializeModule: Cast List ******\n");
17327   for (i = 0; i < swig_module.size; ++i) {
17328     int j = 0;
17329     swig_cast_info *cast = swig_module.cast_initial[i];
17330     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
17331     while (cast->type) {
17332       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
17333       cast++;
17334       ++j;
17335     }
17336     printf("---- Total casts: %d\n",j);
17337   }
17338   printf("**** SWIG_InitializeModule: Cast List ******\n");
17339 #endif
17340 }
17341 
17342 /* This function will propagate the clientdata field of type to
17343 * any new swig_type_info structures that have been added into the list
17344 * of equivalent types.  It is like calling
17345 * SWIG_TypeClientData(type, clientdata) a second time.
17346 */
17347 SWIGRUNTIME void
SWIG_PropagateClientData(void)17348 SWIG_PropagateClientData(void) {
17349   size_t i;
17350   swig_cast_info *equiv;
17351   static int init_run = 0;
17352 
17353   if (init_run) return;
17354   init_run = 1;
17355 
17356   for (i = 0; i < swig_module.size; i++) {
17357     if (swig_module.types[i]->clientdata) {
17358       equiv = swig_module.types[i]->cast;
17359       while (equiv) {
17360         if (!equiv->converter) {
17361           if (equiv->type && !equiv->type->clientdata)
17362           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
17363         }
17364         equiv = equiv->next;
17365       }
17366     }
17367   }
17368 }
17369 
17370 #ifdef __cplusplus
17371 #if 0
17372 {
17373   /* c-mode */
17374 #endif
17375 }
17376 #endif
17377 
17378 
17379 
17380 #if defined(__cplusplus) && ! defined(XSPROTO)
17381 extern "C"
17382 #endif
17383 
XS(SWIG_init)17384 XS(SWIG_init) {
17385   dXSARGS;
17386   int i;
17387   (void)items;
17388 
17389   SWIG_InitializeModule(0);
17390 
17391   /* Install commands */
17392   for (i = 0; swig_commands[i].name; i++) {
17393     /* Casts only needed for Perl < 5.10. */
17394 #ifdef __cplusplus
17395     newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
17396 #else
17397     newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
17398 #endif
17399   }
17400 
17401   /* Install variables */
17402   for (i = 0; swig_variables[i].name; i++) {
17403     SV *sv;
17404     sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
17405     if (swig_variables[i].type) {
17406       SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
17407     } else {
17408       sv_setiv(sv,(IV) 0);
17409     }
17410     swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
17411   }
17412 
17413   /* Install constant */
17414   for (i = 0; swig_constants[i].type; i++) {
17415     SV *sv;
17416     sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
17417     switch(swig_constants[i].type) {
17418     case SWIG_INT:
17419       sv_setiv(sv, (IV) swig_constants[i].lvalue);
17420       break;
17421     case SWIG_FLOAT:
17422       sv_setnv(sv, (double) swig_constants[i].dvalue);
17423       break;
17424     case SWIG_STRING:
17425       sv_setpv(sv, (const char *) swig_constants[i].pvalue);
17426       break;
17427     case SWIG_POINTER:
17428       SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
17429       break;
17430     case SWIG_BINARY:
17431       SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
17432       break;
17433     default:
17434       break;
17435     }
17436     SvREADONLY_on(sv);
17437   }
17438 
17439   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17440     SV *sv = get_sv((char*) SWIG_prefix "SRS_WKT_WGS84_LAT_LONG", TRUE | 0x2 | GV_ADDMULTI);
17441     sv_setsv(sv, SWIG_FromCharPtr("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]"));
17442     SvREADONLY_on(sv);
17443   } while(0) /*@SWIG@*/;
17444   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17445     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ALBERS_CONIC_EQUAL_AREA", TRUE | 0x2 | GV_ADDMULTI);
17446     sv_setsv(sv, SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
17447     SvREADONLY_on(sv);
17448   } while(0) /*@SWIG@*/;
17449   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17450     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_AZIMUTHAL_EQUIDISTANT", TRUE | 0x2 | GV_ADDMULTI);
17451     sv_setsv(sv, SWIG_FromCharPtr("Azimuthal_Equidistant"));
17452     SvREADONLY_on(sv);
17453   } while(0) /*@SWIG@*/;
17454   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17455     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_CASSINI_SOLDNER", TRUE | 0x2 | GV_ADDMULTI);
17456     sv_setsv(sv, SWIG_FromCharPtr("Cassini_Soldner"));
17457     SvREADONLY_on(sv);
17458   } while(0) /*@SWIG@*/;
17459   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17460     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_CYLINDRICAL_EQUAL_AREA", TRUE | 0x2 | GV_ADDMULTI);
17461     sv_setsv(sv, SWIG_FromCharPtr("Cylindrical_Equal_Area"));
17462     SvREADONLY_on(sv);
17463   } while(0) /*@SWIG@*/;
17464   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17465     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_BONNE", TRUE | 0x2 | GV_ADDMULTI);
17466     sv_setsv(sv, SWIG_FromCharPtr("Bonne"));
17467     SvREADONLY_on(sv);
17468   } while(0) /*@SWIG@*/;
17469   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17470     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ECKERT_I", TRUE | 0x2 | GV_ADDMULTI);
17471     sv_setsv(sv, SWIG_FromCharPtr("Eckert_I"));
17472     SvREADONLY_on(sv);
17473   } while(0) /*@SWIG@*/;
17474   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17475     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ECKERT_II", TRUE | 0x2 | GV_ADDMULTI);
17476     sv_setsv(sv, SWIG_FromCharPtr("Eckert_II"));
17477     SvREADONLY_on(sv);
17478   } while(0) /*@SWIG@*/;
17479   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17480     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ECKERT_III", TRUE | 0x2 | GV_ADDMULTI);
17481     sv_setsv(sv, SWIG_FromCharPtr("Eckert_III"));
17482     SvREADONLY_on(sv);
17483   } while(0) /*@SWIG@*/;
17484   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17485     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ECKERT_IV", TRUE | 0x2 | GV_ADDMULTI);
17486     sv_setsv(sv, SWIG_FromCharPtr("Eckert_IV"));
17487     SvREADONLY_on(sv);
17488   } while(0) /*@SWIG@*/;
17489   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17490     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ECKERT_V", TRUE | 0x2 | GV_ADDMULTI);
17491     sv_setsv(sv, SWIG_FromCharPtr("Eckert_V"));
17492     SvREADONLY_on(sv);
17493   } while(0) /*@SWIG@*/;
17494   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17495     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ECKERT_VI", TRUE | 0x2 | GV_ADDMULTI);
17496     sv_setsv(sv, SWIG_FromCharPtr("Eckert_VI"));
17497     SvREADONLY_on(sv);
17498   } while(0) /*@SWIG@*/;
17499   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17500     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_EQUIDISTANT_CONIC", TRUE | 0x2 | GV_ADDMULTI);
17501     sv_setsv(sv, SWIG_FromCharPtr("Equidistant_Conic"));
17502     SvREADONLY_on(sv);
17503   } while(0) /*@SWIG@*/;
17504   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17505     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_EQUIRECTANGULAR", TRUE | 0x2 | GV_ADDMULTI);
17506     sv_setsv(sv, SWIG_FromCharPtr("Equirectangular"));
17507     SvREADONLY_on(sv);
17508   } while(0) /*@SWIG@*/;
17509   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17510     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_GALL_STEREOGRAPHIC", TRUE | 0x2 | GV_ADDMULTI);
17511     sv_setsv(sv, SWIG_FromCharPtr("Gall_Stereographic"));
17512     SvREADONLY_on(sv);
17513   } while(0) /*@SWIG@*/;
17514   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17515     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_GAUSSSCHREIBERTMERCATOR", TRUE | 0x2 | GV_ADDMULTI);
17516     sv_setsv(sv, SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
17517     SvREADONLY_on(sv);
17518   } while(0) /*@SWIG@*/;
17519   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17520     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_GEOSTATIONARY_SATELLITE", TRUE | 0x2 | GV_ADDMULTI);
17521     sv_setsv(sv, SWIG_FromCharPtr("Geostationary_Satellite"));
17522     SvREADONLY_on(sv);
17523   } while(0) /*@SWIG@*/;
17524   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17525     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_GOODE_HOMOLOSINE", TRUE | 0x2 | GV_ADDMULTI);
17526     sv_setsv(sv, SWIG_FromCharPtr("Goode_Homolosine"));
17527     SvREADONLY_on(sv);
17528   } while(0) /*@SWIG@*/;
17529   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17530     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_IGH", TRUE | 0x2 | GV_ADDMULTI);
17531     sv_setsv(sv, SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
17532     SvREADONLY_on(sv);
17533   } while(0) /*@SWIG@*/;
17534   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17535     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_GNOMONIC", TRUE | 0x2 | GV_ADDMULTI);
17536     sv_setsv(sv, SWIG_FromCharPtr("Gnomonic"));
17537     SvREADONLY_on(sv);
17538   } while(0) /*@SWIG@*/;
17539   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17540     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER", TRUE | 0x2 | GV_ADDMULTI);
17541     sv_setsv(sv, SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
17542     SvREADONLY_on(sv);
17543   } while(0) /*@SWIG@*/;
17544   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17545     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_HOTINE_OBLIQUE_MERCATOR", TRUE | 0x2 | GV_ADDMULTI);
17546     sv_setsv(sv, SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
17547     SvREADONLY_on(sv);
17548   } while(0) /*@SWIG@*/;
17549   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17550     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN", TRUE | 0x2 | GV_ADDMULTI);
17551     sv_setsv(sv, SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
17552     SvREADONLY_on(sv);
17553   } while(0) /*@SWIG@*/;
17554   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17555     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_LABORDE_OBLIQUE_MERCATOR", TRUE | 0x2 | GV_ADDMULTI);
17556     sv_setsv(sv, SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
17557     SvREADONLY_on(sv);
17558   } while(0) /*@SWIG@*/;
17559   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17560     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP", TRUE | 0x2 | GV_ADDMULTI);
17561     sv_setsv(sv, SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
17562     SvREADONLY_on(sv);
17563   } while(0) /*@SWIG@*/;
17564   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17565     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP", TRUE | 0x2 | GV_ADDMULTI);
17566     sv_setsv(sv, SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
17567     SvREADONLY_on(sv);
17568   } while(0) /*@SWIG@*/;
17569   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17570     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM", TRUE | 0x2 | GV_ADDMULTI);
17571     sv_setsv(sv, SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
17572     SvREADONLY_on(sv);
17573   } while(0) /*@SWIG@*/;
17574   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17575     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA", TRUE | 0x2 | GV_ADDMULTI);
17576     sv_setsv(sv, SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
17577     SvREADONLY_on(sv);
17578   } while(0) /*@SWIG@*/;
17579   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17580     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_MERCATOR_1SP", TRUE | 0x2 | GV_ADDMULTI);
17581     sv_setsv(sv, SWIG_FromCharPtr("Mercator_1SP"));
17582     SvREADONLY_on(sv);
17583   } while(0) /*@SWIG@*/;
17584   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17585     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_MERCATOR_2SP", TRUE | 0x2 | GV_ADDMULTI);
17586     sv_setsv(sv, SWIG_FromCharPtr("Mercator_2SP"));
17587     SvREADONLY_on(sv);
17588   } while(0) /*@SWIG@*/;
17589   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17590     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_MERCATOR_AUXILIARY_SPHERE", TRUE | 0x2 | GV_ADDMULTI);
17591     sv_setsv(sv, SWIG_FromCharPtr("Mercator_Auxiliary_Sphere"));
17592     SvREADONLY_on(sv);
17593   } while(0) /*@SWIG@*/;
17594   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17595     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_MILLER_CYLINDRICAL", TRUE | 0x2 | GV_ADDMULTI);
17596     sv_setsv(sv, SWIG_FromCharPtr("Miller_Cylindrical"));
17597     SvREADONLY_on(sv);
17598   } while(0) /*@SWIG@*/;
17599   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17600     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_MOLLWEIDE", TRUE | 0x2 | GV_ADDMULTI);
17601     sv_setsv(sv, SWIG_FromCharPtr("Mollweide"));
17602     SvREADONLY_on(sv);
17603   } while(0) /*@SWIG@*/;
17604   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17605     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_NEW_ZEALAND_MAP_GRID", TRUE | 0x2 | GV_ADDMULTI);
17606     sv_setsv(sv, SWIG_FromCharPtr("New_Zealand_Map_Grid"));
17607     SvREADONLY_on(sv);
17608   } while(0) /*@SWIG@*/;
17609   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17610     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_OBLIQUE_STEREOGRAPHIC", TRUE | 0x2 | GV_ADDMULTI);
17611     sv_setsv(sv, SWIG_FromCharPtr("Oblique_Stereographic"));
17612     SvREADONLY_on(sv);
17613   } while(0) /*@SWIG@*/;
17614   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17615     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ORTHOGRAPHIC", TRUE | 0x2 | GV_ADDMULTI);
17616     sv_setsv(sv, SWIG_FromCharPtr("Orthographic"));
17617     SvREADONLY_on(sv);
17618   } while(0) /*@SWIG@*/;
17619   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17620     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_POLAR_STEREOGRAPHIC", TRUE | 0x2 | GV_ADDMULTI);
17621     sv_setsv(sv, SWIG_FromCharPtr("Polar_Stereographic"));
17622     SvREADONLY_on(sv);
17623   } while(0) /*@SWIG@*/;
17624   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17625     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_POLYCONIC", TRUE | 0x2 | GV_ADDMULTI);
17626     sv_setsv(sv, SWIG_FromCharPtr("Polyconic"));
17627     SvREADONLY_on(sv);
17628   } while(0) /*@SWIG@*/;
17629   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17630     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_ROBINSON", TRUE | 0x2 | GV_ADDMULTI);
17631     sv_setsv(sv, SWIG_FromCharPtr("Robinson"));
17632     SvREADONLY_on(sv);
17633   } while(0) /*@SWIG@*/;
17634   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17635     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_SINUSOIDAL", TRUE | 0x2 | GV_ADDMULTI);
17636     sv_setsv(sv, SWIG_FromCharPtr("Sinusoidal"));
17637     SvREADONLY_on(sv);
17638   } while(0) /*@SWIG@*/;
17639   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17640     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_STEREOGRAPHIC", TRUE | 0x2 | GV_ADDMULTI);
17641     sv_setsv(sv, SWIG_FromCharPtr("Stereographic"));
17642     SvREADONLY_on(sv);
17643   } while(0) /*@SWIG@*/;
17644   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17645     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL", TRUE | 0x2 | GV_ADDMULTI);
17646     sv_setsv(sv, SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
17647     SvREADONLY_on(sv);
17648   } while(0) /*@SWIG@*/;
17649   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17650     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR", TRUE | 0x2 | GV_ADDMULTI);
17651     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator"));
17652     SvREADONLY_on(sv);
17653   } while(0) /*@SWIG@*/;
17654   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17655     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED", TRUE | 0x2 | GV_ADDMULTI);
17656     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
17657     SvREADONLY_on(sv);
17658   } while(0) /*@SWIG@*/;
17659   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17660     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR_MI_21", TRUE | 0x2 | GV_ADDMULTI);
17661     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
17662     SvREADONLY_on(sv);
17663   } while(0) /*@SWIG@*/;
17664   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17665     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR_MI_22", TRUE | 0x2 | GV_ADDMULTI);
17666     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
17667     SvREADONLY_on(sv);
17668   } while(0) /*@SWIG@*/;
17669   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17670     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR_MI_23", TRUE | 0x2 | GV_ADDMULTI);
17671     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
17672     SvREADONLY_on(sv);
17673   } while(0) /*@SWIG@*/;
17674   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17675     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR_MI_24", TRUE | 0x2 | GV_ADDMULTI);
17676     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
17677     SvREADONLY_on(sv);
17678   } while(0) /*@SWIG@*/;
17679   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17680     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TRANSVERSE_MERCATOR_MI_25", TRUE | 0x2 | GV_ADDMULTI);
17681     sv_setsv(sv, SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
17682     SvREADONLY_on(sv);
17683   } while(0) /*@SWIG@*/;
17684   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17685     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TUNISIA_MINING_GRID", TRUE | 0x2 | GV_ADDMULTI);
17686     sv_setsv(sv, SWIG_FromCharPtr("Tunisia_Mining_Grid"));
17687     SvREADONLY_on(sv);
17688   } while(0) /*@SWIG@*/;
17689   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17690     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_TWO_POINT_EQUIDISTANT", TRUE | 0x2 | GV_ADDMULTI);
17691     sv_setsv(sv, SWIG_FromCharPtr("Two_Point_Equidistant"));
17692     SvREADONLY_on(sv);
17693   } while(0) /*@SWIG@*/;
17694   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17695     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_VANDERGRINTEN", TRUE | 0x2 | GV_ADDMULTI);
17696     sv_setsv(sv, SWIG_FromCharPtr("VanDerGrinten"));
17697     SvREADONLY_on(sv);
17698   } while(0) /*@SWIG@*/;
17699   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17700     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_KROVAK", TRUE | 0x2 | GV_ADDMULTI);
17701     sv_setsv(sv, SWIG_FromCharPtr("Krovak"));
17702     SvREADONLY_on(sv);
17703   } while(0) /*@SWIG@*/;
17704   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17705     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_IMW_POLYCONIC", TRUE | 0x2 | GV_ADDMULTI);
17706     sv_setsv(sv, SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
17707     SvREADONLY_on(sv);
17708   } while(0) /*@SWIG@*/;
17709   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17710     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_I", TRUE | 0x2 | GV_ADDMULTI);
17711     sv_setsv(sv, SWIG_FromCharPtr("Wagner_I"));
17712     SvREADONLY_on(sv);
17713   } while(0) /*@SWIG@*/;
17714   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17715     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_II", TRUE | 0x2 | GV_ADDMULTI);
17716     sv_setsv(sv, SWIG_FromCharPtr("Wagner_II"));
17717     SvREADONLY_on(sv);
17718   } while(0) /*@SWIG@*/;
17719   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17720     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_III", TRUE | 0x2 | GV_ADDMULTI);
17721     sv_setsv(sv, SWIG_FromCharPtr("Wagner_III"));
17722     SvREADONLY_on(sv);
17723   } while(0) /*@SWIG@*/;
17724   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17725     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_IV", TRUE | 0x2 | GV_ADDMULTI);
17726     sv_setsv(sv, SWIG_FromCharPtr("Wagner_IV"));
17727     SvREADONLY_on(sv);
17728   } while(0) /*@SWIG@*/;
17729   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17730     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_V", TRUE | 0x2 | GV_ADDMULTI);
17731     sv_setsv(sv, SWIG_FromCharPtr("Wagner_V"));
17732     SvREADONLY_on(sv);
17733   } while(0) /*@SWIG@*/;
17734   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17735     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_VI", TRUE | 0x2 | GV_ADDMULTI);
17736     sv_setsv(sv, SWIG_FromCharPtr("Wagner_VI"));
17737     SvREADONLY_on(sv);
17738   } while(0) /*@SWIG@*/;
17739   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17740     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WAGNER_VII", TRUE | 0x2 | GV_ADDMULTI);
17741     sv_setsv(sv, SWIG_FromCharPtr("Wagner_VII"));
17742     SvREADONLY_on(sv);
17743   } while(0) /*@SWIG@*/;
17744   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17745     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_QSC", TRUE | 0x2 | GV_ADDMULTI);
17746     sv_setsv(sv, SWIG_FromCharPtr("Quadrilateralized_Spherical_Cube"));
17747     SvREADONLY_on(sv);
17748   } while(0) /*@SWIG@*/;
17749   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17750     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_AITOFF", TRUE | 0x2 | GV_ADDMULTI);
17751     sv_setsv(sv, SWIG_FromCharPtr("Aitoff"));
17752     SvREADONLY_on(sv);
17753   } while(0) /*@SWIG@*/;
17754   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17755     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WINKEL_I", TRUE | 0x2 | GV_ADDMULTI);
17756     sv_setsv(sv, SWIG_FromCharPtr("Winkel_I"));
17757     SvREADONLY_on(sv);
17758   } while(0) /*@SWIG@*/;
17759   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17760     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WINKEL_II", TRUE | 0x2 | GV_ADDMULTI);
17761     sv_setsv(sv, SWIG_FromCharPtr("Winkel_II"));
17762     SvREADONLY_on(sv);
17763   } while(0) /*@SWIG@*/;
17764   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17765     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_WINKEL_TRIPEL", TRUE | 0x2 | GV_ADDMULTI);
17766     sv_setsv(sv, SWIG_FromCharPtr("Winkel_Tripel"));
17767     SvREADONLY_on(sv);
17768   } while(0) /*@SWIG@*/;
17769   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17770     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_CRASTER_PARABOLIC", TRUE | 0x2 | GV_ADDMULTI);
17771     sv_setsv(sv, SWIG_FromCharPtr("Craster_Parabolic"));
17772     SvREADONLY_on(sv);
17773   } while(0) /*@SWIG@*/;
17774   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17775     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_LOXIMUTHAL", TRUE | 0x2 | GV_ADDMULTI);
17776     sv_setsv(sv, SWIG_FromCharPtr("Loximuthal"));
17777     SvREADONLY_on(sv);
17778   } while(0) /*@SWIG@*/;
17779   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17780     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_QUARTIC_AUTHALIC", TRUE | 0x2 | GV_ADDMULTI);
17781     sv_setsv(sv, SWIG_FromCharPtr("Quartic_Authalic"));
17782     SvREADONLY_on(sv);
17783   } while(0) /*@SWIG@*/;
17784   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17785     SV *sv = get_sv((char*) SWIG_prefix "SRS_PT_SCH", TRUE | 0x2 | GV_ADDMULTI);
17786     sv_setsv(sv, SWIG_FromCharPtr("Spherical_Cross_Track_Height"));
17787     SvREADONLY_on(sv);
17788   } while(0) /*@SWIG@*/;
17789   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17790     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_CENTRAL_MERIDIAN", TRUE | 0x2 | GV_ADDMULTI);
17791     sv_setsv(sv, SWIG_FromCharPtr("central_meridian"));
17792     SvREADONLY_on(sv);
17793   } while(0) /*@SWIG@*/;
17794   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17795     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_SCALE_FACTOR", TRUE | 0x2 | GV_ADDMULTI);
17796     sv_setsv(sv, SWIG_FromCharPtr("scale_factor"));
17797     SvREADONLY_on(sv);
17798   } while(0) /*@SWIG@*/;
17799   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17800     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_STANDARD_PARALLEL_1", TRUE | 0x2 | GV_ADDMULTI);
17801     sv_setsv(sv, SWIG_FromCharPtr("standard_parallel_1"));
17802     SvREADONLY_on(sv);
17803   } while(0) /*@SWIG@*/;
17804   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17805     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_STANDARD_PARALLEL_2", TRUE | 0x2 | GV_ADDMULTI);
17806     sv_setsv(sv, SWIG_FromCharPtr("standard_parallel_2"));
17807     SvREADONLY_on(sv);
17808   } while(0) /*@SWIG@*/;
17809   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17810     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PSEUDO_STD_PARALLEL_1", TRUE | 0x2 | GV_ADDMULTI);
17811     sv_setsv(sv, SWIG_FromCharPtr("pseudo_standard_parallel_1"));
17812     SvREADONLY_on(sv);
17813   } while(0) /*@SWIG@*/;
17814   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17815     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_CENTER", TRUE | 0x2 | GV_ADDMULTI);
17816     sv_setsv(sv, SWIG_FromCharPtr("longitude_of_center"));
17817     SvREADONLY_on(sv);
17818   } while(0) /*@SWIG@*/;
17819   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17820     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_CENTER", TRUE | 0x2 | GV_ADDMULTI);
17821     sv_setsv(sv, SWIG_FromCharPtr("latitude_of_center"));
17822     SvREADONLY_on(sv);
17823   } while(0) /*@SWIG@*/;
17824   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17825     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_ORIGIN", TRUE | 0x2 | GV_ADDMULTI);
17826     sv_setsv(sv, SWIG_FromCharPtr("longitude_of_origin"));
17827     SvREADONLY_on(sv);
17828   } while(0) /*@SWIG@*/;
17829   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17830     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_ORIGIN", TRUE | 0x2 | GV_ADDMULTI);
17831     sv_setsv(sv, SWIG_FromCharPtr("latitude_of_origin"));
17832     SvREADONLY_on(sv);
17833   } while(0) /*@SWIG@*/;
17834   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17835     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_FALSE_EASTING", TRUE | 0x2 | GV_ADDMULTI);
17836     sv_setsv(sv, SWIG_FromCharPtr("false_easting"));
17837     SvREADONLY_on(sv);
17838   } while(0) /*@SWIG@*/;
17839   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17840     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_FALSE_NORTHING", TRUE | 0x2 | GV_ADDMULTI);
17841     sv_setsv(sv, SWIG_FromCharPtr("false_northing"));
17842     SvREADONLY_on(sv);
17843   } while(0) /*@SWIG@*/;
17844   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17845     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_AZIMUTH", TRUE | 0x2 | GV_ADDMULTI);
17846     sv_setsv(sv, SWIG_FromCharPtr("azimuth"));
17847     SvREADONLY_on(sv);
17848   } while(0) /*@SWIG@*/;
17849   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17850     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_POINT_1", TRUE | 0x2 | GV_ADDMULTI);
17851     sv_setsv(sv, SWIG_FromCharPtr("longitude_of_point_1"));
17852     SvREADONLY_on(sv);
17853   } while(0) /*@SWIG@*/;
17854   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17855     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_POINT_1", TRUE | 0x2 | GV_ADDMULTI);
17856     sv_setsv(sv, SWIG_FromCharPtr("latitude_of_point_1"));
17857     SvREADONLY_on(sv);
17858   } while(0) /*@SWIG@*/;
17859   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17860     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_POINT_2", TRUE | 0x2 | GV_ADDMULTI);
17861     sv_setsv(sv, SWIG_FromCharPtr("longitude_of_point_2"));
17862     SvREADONLY_on(sv);
17863   } while(0) /*@SWIG@*/;
17864   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17865     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_POINT_2", TRUE | 0x2 | GV_ADDMULTI);
17866     sv_setsv(sv, SWIG_FromCharPtr("latitude_of_point_2"));
17867     SvREADONLY_on(sv);
17868   } while(0) /*@SWIG@*/;
17869   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17870     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_POINT_3", TRUE | 0x2 | GV_ADDMULTI);
17871     sv_setsv(sv, SWIG_FromCharPtr("longitude_of_point_3"));
17872     SvREADONLY_on(sv);
17873   } while(0) /*@SWIG@*/;
17874   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17875     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_POINT_3", TRUE | 0x2 | GV_ADDMULTI);
17876     sv_setsv(sv, SWIG_FromCharPtr("latitude_of_point_3"));
17877     SvREADONLY_on(sv);
17878   } while(0) /*@SWIG@*/;
17879   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17880     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_RECTIFIED_GRID_ANGLE", TRUE | 0x2 | GV_ADDMULTI);
17881     sv_setsv(sv, SWIG_FromCharPtr("rectified_grid_angle"));
17882     SvREADONLY_on(sv);
17883   } while(0) /*@SWIG@*/;
17884   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17885     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LANDSAT_NUMBER", TRUE | 0x2 | GV_ADDMULTI);
17886     sv_setsv(sv, SWIG_FromCharPtr("landsat_number"));
17887     SvREADONLY_on(sv);
17888   } while(0) /*@SWIG@*/;
17889   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17890     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PATH_NUMBER", TRUE | 0x2 | GV_ADDMULTI);
17891     sv_setsv(sv, SWIG_FromCharPtr("path_number"));
17892     SvREADONLY_on(sv);
17893   } while(0) /*@SWIG@*/;
17894   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17895     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PERSPECTIVE_POINT_HEIGHT", TRUE | 0x2 | GV_ADDMULTI);
17896     sv_setsv(sv, SWIG_FromCharPtr("perspective_point_height"));
17897     SvREADONLY_on(sv);
17898   } while(0) /*@SWIG@*/;
17899   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17900     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_SATELLITE_HEIGHT", TRUE | 0x2 | GV_ADDMULTI);
17901     sv_setsv(sv, SWIG_FromCharPtr("satellite_height"));
17902     SvREADONLY_on(sv);
17903   } while(0) /*@SWIG@*/;
17904   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17905     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_FIPSZONE", TRUE | 0x2 | GV_ADDMULTI);
17906     sv_setsv(sv, SWIG_FromCharPtr("fipszone"));
17907     SvREADONLY_on(sv);
17908   } while(0) /*@SWIG@*/;
17909   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17910     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_ZONE", TRUE | 0x2 | GV_ADDMULTI);
17911     sv_setsv(sv, SWIG_FromCharPtr("zone"));
17912     SvREADONLY_on(sv);
17913   } while(0) /*@SWIG@*/;
17914   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17915     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_1ST_POINT", TRUE | 0x2 | GV_ADDMULTI);
17916     sv_setsv(sv, SWIG_FromCharPtr("Latitude_Of_1st_Point"));
17917     SvREADONLY_on(sv);
17918   } while(0) /*@SWIG@*/;
17919   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17920     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_1ST_POINT", TRUE | 0x2 | GV_ADDMULTI);
17921     sv_setsv(sv, SWIG_FromCharPtr("Longitude_Of_1st_Point"));
17922     SvREADONLY_on(sv);
17923   } while(0) /*@SWIG@*/;
17924   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17925     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LATITUDE_OF_2ND_POINT", TRUE | 0x2 | GV_ADDMULTI);
17926     sv_setsv(sv, SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
17927     SvREADONLY_on(sv);
17928   } while(0) /*@SWIG@*/;
17929   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17930     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_LONGITUDE_OF_2ND_POINT", TRUE | 0x2 | GV_ADDMULTI);
17931     sv_setsv(sv, SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
17932     SvREADONLY_on(sv);
17933   } while(0) /*@SWIG@*/;
17934   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17935     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PEG_POINT_LATITUDE", TRUE | 0x2 | GV_ADDMULTI);
17936     sv_setsv(sv, SWIG_FromCharPtr("peg_point_latitude"));
17937     SvREADONLY_on(sv);
17938   } while(0) /*@SWIG@*/;
17939   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17940     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PEG_POINT_LONGITUDE", TRUE | 0x2 | GV_ADDMULTI);
17941     sv_setsv(sv, SWIG_FromCharPtr("peg_point_longitude"));
17942     SvREADONLY_on(sv);
17943   } while(0) /*@SWIG@*/;
17944   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17945     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PEG_POINT_HEADING", TRUE | 0x2 | GV_ADDMULTI);
17946     sv_setsv(sv, SWIG_FromCharPtr("peg_point_heading"));
17947     SvREADONLY_on(sv);
17948   } while(0) /*@SWIG@*/;
17949   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17950     SV *sv = get_sv((char*) SWIG_prefix "SRS_PP_PEG_POINT_HEIGHT", TRUE | 0x2 | GV_ADDMULTI);
17951     sv_setsv(sv, SWIG_FromCharPtr("peg_point_height"));
17952     SvREADONLY_on(sv);
17953   } while(0) /*@SWIG@*/;
17954   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17955     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_METER", TRUE | 0x2 | GV_ADDMULTI);
17956     sv_setsv(sv, SWIG_FromCharPtr("Meter"));
17957     SvREADONLY_on(sv);
17958   } while(0) /*@SWIG@*/;
17959   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17960     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_FOOT", TRUE | 0x2 | GV_ADDMULTI);
17961     sv_setsv(sv, SWIG_FromCharPtr("Foot (International)"));
17962     SvREADONLY_on(sv);
17963   } while(0) /*@SWIG@*/;
17964   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17965     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_FOOT_CONV", TRUE | 0x2 | GV_ADDMULTI);
17966     sv_setsv(sv, SWIG_FromCharPtr("0.3048"));
17967     SvREADONLY_on(sv);
17968   } while(0) /*@SWIG@*/;
17969   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17970     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_FOOT", TRUE | 0x2 | GV_ADDMULTI);
17971     sv_setsv(sv, SWIG_FromCharPtr("Foot_US"));
17972     SvREADONLY_on(sv);
17973   } while(0) /*@SWIG@*/;
17974   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17975     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_FOOT_CONV", TRUE | 0x2 | GV_ADDMULTI);
17976     sv_setsv(sv, SWIG_FromCharPtr("0.3048006096012192"));
17977     SvREADONLY_on(sv);
17978   } while(0) /*@SWIG@*/;
17979   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17980     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_NAUTICAL_MILE", TRUE | 0x2 | GV_ADDMULTI);
17981     sv_setsv(sv, SWIG_FromCharPtr("Nautical Mile"));
17982     SvREADONLY_on(sv);
17983   } while(0) /*@SWIG@*/;
17984   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17985     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_NAUTICAL_MILE_CONV", TRUE | 0x2 | GV_ADDMULTI);
17986     sv_setsv(sv, SWIG_FromCharPtr("1852.0"));
17987     SvREADONLY_on(sv);
17988   } while(0) /*@SWIG@*/;
17989   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17990     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_LINK", TRUE | 0x2 | GV_ADDMULTI);
17991     sv_setsv(sv, SWIG_FromCharPtr("Link"));
17992     SvREADONLY_on(sv);
17993   } while(0) /*@SWIG@*/;
17994   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
17995     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_LINK_CONV", TRUE | 0x2 | GV_ADDMULTI);
17996     sv_setsv(sv, SWIG_FromCharPtr("0.20116684023368047"));
17997     SvREADONLY_on(sv);
17998   } while(0) /*@SWIG@*/;
17999   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18000     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_CHAIN", TRUE | 0x2 | GV_ADDMULTI);
18001     sv_setsv(sv, SWIG_FromCharPtr("Chain"));
18002     SvREADONLY_on(sv);
18003   } while(0) /*@SWIG@*/;
18004   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18005     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_CHAIN_CONV", TRUE | 0x2 | GV_ADDMULTI);
18006     sv_setsv(sv, SWIG_FromCharPtr("20.116684023368047"));
18007     SvREADONLY_on(sv);
18008   } while(0) /*@SWIG@*/;
18009   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18010     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_ROD", TRUE | 0x2 | GV_ADDMULTI);
18011     sv_setsv(sv, SWIG_FromCharPtr("Rod"));
18012     SvREADONLY_on(sv);
18013   } while(0) /*@SWIG@*/;
18014   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18015     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_ROD_CONV", TRUE | 0x2 | GV_ADDMULTI);
18016     sv_setsv(sv, SWIG_FromCharPtr("5.02921005842012"));
18017     SvREADONLY_on(sv);
18018   } while(0) /*@SWIG@*/;
18019   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18020     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_LINK_Clarke", TRUE | 0x2 | GV_ADDMULTI);
18021     sv_setsv(sv, SWIG_FromCharPtr("Link_Clarke"));
18022     SvREADONLY_on(sv);
18023   } while(0) /*@SWIG@*/;
18024   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18025     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_LINK_Clarke_CONV", TRUE | 0x2 | GV_ADDMULTI);
18026     sv_setsv(sv, SWIG_FromCharPtr("0.2011661949"));
18027     SvREADONLY_on(sv);
18028   } while(0) /*@SWIG@*/;
18029   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18030     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_KILOMETER", TRUE | 0x2 | GV_ADDMULTI);
18031     sv_setsv(sv, SWIG_FromCharPtr("Kilometer"));
18032     SvREADONLY_on(sv);
18033   } while(0) /*@SWIG@*/;
18034   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18035     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_KILOMETER_CONV", TRUE | 0x2 | GV_ADDMULTI);
18036     sv_setsv(sv, SWIG_FromCharPtr("1000."));
18037     SvREADONLY_on(sv);
18038   } while(0) /*@SWIG@*/;
18039   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18040     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_DECIMETER", TRUE | 0x2 | GV_ADDMULTI);
18041     sv_setsv(sv, SWIG_FromCharPtr("Decimeter"));
18042     SvREADONLY_on(sv);
18043   } while(0) /*@SWIG@*/;
18044   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18045     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_DECIMETER_CONV", TRUE | 0x2 | GV_ADDMULTI);
18046     sv_setsv(sv, SWIG_FromCharPtr("0.1"));
18047     SvREADONLY_on(sv);
18048   } while(0) /*@SWIG@*/;
18049   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18050     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_CENTIMETER", TRUE | 0x2 | GV_ADDMULTI);
18051     sv_setsv(sv, SWIG_FromCharPtr("Centimeter"));
18052     SvREADONLY_on(sv);
18053   } while(0) /*@SWIG@*/;
18054   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18055     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_CENTIMETER_CONV", TRUE | 0x2 | GV_ADDMULTI);
18056     sv_setsv(sv, SWIG_FromCharPtr("0.01"));
18057     SvREADONLY_on(sv);
18058   } while(0) /*@SWIG@*/;
18059   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18060     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_MILLIMETER", TRUE | 0x2 | GV_ADDMULTI);
18061     sv_setsv(sv, SWIG_FromCharPtr("Millimeter"));
18062     SvREADONLY_on(sv);
18063   } while(0) /*@SWIG@*/;
18064   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18065     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_MILLIMETER_CONV", TRUE | 0x2 | GV_ADDMULTI);
18066     sv_setsv(sv, SWIG_FromCharPtr("0.001"));
18067     SvREADONLY_on(sv);
18068   } while(0) /*@SWIG@*/;
18069   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18070     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_NAUT_MILE", TRUE | 0x2 | GV_ADDMULTI);
18071     sv_setsv(sv, SWIG_FromCharPtr("Nautical_Mile_International"));
18072     SvREADONLY_on(sv);
18073   } while(0) /*@SWIG@*/;
18074   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18075     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_NAUT_MILE_CONV", TRUE | 0x2 | GV_ADDMULTI);
18076     sv_setsv(sv, SWIG_FromCharPtr("1852.0"));
18077     SvREADONLY_on(sv);
18078   } while(0) /*@SWIG@*/;
18079   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18080     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_INCH", TRUE | 0x2 | GV_ADDMULTI);
18081     sv_setsv(sv, SWIG_FromCharPtr("Inch_International"));
18082     SvREADONLY_on(sv);
18083   } while(0) /*@SWIG@*/;
18084   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18085     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_INCH_CONV", TRUE | 0x2 | GV_ADDMULTI);
18086     sv_setsv(sv, SWIG_FromCharPtr("0.0254"));
18087     SvREADONLY_on(sv);
18088   } while(0) /*@SWIG@*/;
18089   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18090     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_FOOT", TRUE | 0x2 | GV_ADDMULTI);
18091     sv_setsv(sv, SWIG_FromCharPtr("Foot_International"));
18092     SvREADONLY_on(sv);
18093   } while(0) /*@SWIG@*/;
18094   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18095     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_FOOT_CONV", TRUE | 0x2 | GV_ADDMULTI);
18096     sv_setsv(sv, SWIG_FromCharPtr("0.3048"));
18097     SvREADONLY_on(sv);
18098   } while(0) /*@SWIG@*/;
18099   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18100     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_YARD", TRUE | 0x2 | GV_ADDMULTI);
18101     sv_setsv(sv, SWIG_FromCharPtr("Yard_International"));
18102     SvREADONLY_on(sv);
18103   } while(0) /*@SWIG@*/;
18104   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18105     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_YARD_CONV", TRUE | 0x2 | GV_ADDMULTI);
18106     sv_setsv(sv, SWIG_FromCharPtr("0.9144"));
18107     SvREADONLY_on(sv);
18108   } while(0) /*@SWIG@*/;
18109   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18110     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_STAT_MILE", TRUE | 0x2 | GV_ADDMULTI);
18111     sv_setsv(sv, SWIG_FromCharPtr("Statute_Mile_International"));
18112     SvREADONLY_on(sv);
18113   } while(0) /*@SWIG@*/;
18114   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18115     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_STAT_MILE_CONV", TRUE | 0x2 | GV_ADDMULTI);
18116     sv_setsv(sv, SWIG_FromCharPtr("1609.344"));
18117     SvREADONLY_on(sv);
18118   } while(0) /*@SWIG@*/;
18119   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18120     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_FATHOM", TRUE | 0x2 | GV_ADDMULTI);
18121     sv_setsv(sv, SWIG_FromCharPtr("Fathom_International"));
18122     SvREADONLY_on(sv);
18123   } while(0) /*@SWIG@*/;
18124   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18125     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_FATHOM_CONV", TRUE | 0x2 | GV_ADDMULTI);
18126     sv_setsv(sv, SWIG_FromCharPtr("1.8288"));
18127     SvREADONLY_on(sv);
18128   } while(0) /*@SWIG@*/;
18129   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18130     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_CHAIN", TRUE | 0x2 | GV_ADDMULTI);
18131     sv_setsv(sv, SWIG_FromCharPtr("Chain_International"));
18132     SvREADONLY_on(sv);
18133   } while(0) /*@SWIG@*/;
18134   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18135     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_CHAIN_CONV", TRUE | 0x2 | GV_ADDMULTI);
18136     sv_setsv(sv, SWIG_FromCharPtr("20.1168"));
18137     SvREADONLY_on(sv);
18138   } while(0) /*@SWIG@*/;
18139   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18140     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_LINK", TRUE | 0x2 | GV_ADDMULTI);
18141     sv_setsv(sv, SWIG_FromCharPtr("Link_International"));
18142     SvREADONLY_on(sv);
18143   } while(0) /*@SWIG@*/;
18144   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18145     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INTL_LINK_CONV", TRUE | 0x2 | GV_ADDMULTI);
18146     sv_setsv(sv, SWIG_FromCharPtr("0.201168"));
18147     SvREADONLY_on(sv);
18148   } while(0) /*@SWIG@*/;
18149   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18150     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_INCH", TRUE | 0x2 | GV_ADDMULTI);
18151     sv_setsv(sv, SWIG_FromCharPtr("Inch_US_Surveyor"));
18152     SvREADONLY_on(sv);
18153   } while(0) /*@SWIG@*/;
18154   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18155     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_INCH_CONV", TRUE | 0x2 | GV_ADDMULTI);
18156     sv_setsv(sv, SWIG_FromCharPtr("0.025400050800101603"));
18157     SvREADONLY_on(sv);
18158   } while(0) /*@SWIG@*/;
18159   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18160     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_YARD", TRUE | 0x2 | GV_ADDMULTI);
18161     sv_setsv(sv, SWIG_FromCharPtr("Yard_US_Surveyor"));
18162     SvREADONLY_on(sv);
18163   } while(0) /*@SWIG@*/;
18164   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18165     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_YARD_CONV", TRUE | 0x2 | GV_ADDMULTI);
18166     sv_setsv(sv, SWIG_FromCharPtr("0.914401828803658"));
18167     SvREADONLY_on(sv);
18168   } while(0) /*@SWIG@*/;
18169   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18170     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_CHAIN", TRUE | 0x2 | GV_ADDMULTI);
18171     sv_setsv(sv, SWIG_FromCharPtr("Chain_US_Surveyor"));
18172     SvREADONLY_on(sv);
18173   } while(0) /*@SWIG@*/;
18174   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18175     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_CHAIN_CONV", TRUE | 0x2 | GV_ADDMULTI);
18176     sv_setsv(sv, SWIG_FromCharPtr("20.11684023368047"));
18177     SvREADONLY_on(sv);
18178   } while(0) /*@SWIG@*/;
18179   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18180     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_STAT_MILE", TRUE | 0x2 | GV_ADDMULTI);
18181     sv_setsv(sv, SWIG_FromCharPtr("Statute_Mile_US_Surveyor"));
18182     SvREADONLY_on(sv);
18183   } while(0) /*@SWIG@*/;
18184   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18185     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_US_STAT_MILE_CONV", TRUE | 0x2 | GV_ADDMULTI);
18186     sv_setsv(sv, SWIG_FromCharPtr("1609.347218694437"));
18187     SvREADONLY_on(sv);
18188   } while(0) /*@SWIG@*/;
18189   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18190     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INDIAN_YARD", TRUE | 0x2 | GV_ADDMULTI);
18191     sv_setsv(sv, SWIG_FromCharPtr("Yard_Indian"));
18192     SvREADONLY_on(sv);
18193   } while(0) /*@SWIG@*/;
18194   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18195     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INDIAN_YARD_CONV", TRUE | 0x2 | GV_ADDMULTI);
18196     sv_setsv(sv, SWIG_FromCharPtr("0.91439523"));
18197     SvREADONLY_on(sv);
18198   } while(0) /*@SWIG@*/;
18199   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18200     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INDIAN_FOOT", TRUE | 0x2 | GV_ADDMULTI);
18201     sv_setsv(sv, SWIG_FromCharPtr("Foot_Indian"));
18202     SvREADONLY_on(sv);
18203   } while(0) /*@SWIG@*/;
18204   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18205     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INDIAN_FOOT_CONV", TRUE | 0x2 | GV_ADDMULTI);
18206     sv_setsv(sv, SWIG_FromCharPtr("0.30479841"));
18207     SvREADONLY_on(sv);
18208   } while(0) /*@SWIG@*/;
18209   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18210     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INDIAN_CHAIN", TRUE | 0x2 | GV_ADDMULTI);
18211     sv_setsv(sv, SWIG_FromCharPtr("Chain_Indian"));
18212     SvREADONLY_on(sv);
18213   } while(0) /*@SWIG@*/;
18214   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18215     SV *sv = get_sv((char*) SWIG_prefix "SRS_UL_INDIAN_CHAIN_CONV", TRUE | 0x2 | GV_ADDMULTI);
18216     sv_setsv(sv, SWIG_FromCharPtr("20.11669506"));
18217     SvREADONLY_on(sv);
18218   } while(0) /*@SWIG@*/;
18219   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18220     SV *sv = get_sv((char*) SWIG_prefix "SRS_UA_DEGREE", TRUE | 0x2 | GV_ADDMULTI);
18221     sv_setsv(sv, SWIG_FromCharPtr("degree"));
18222     SvREADONLY_on(sv);
18223   } while(0) /*@SWIG@*/;
18224   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18225     SV *sv = get_sv((char*) SWIG_prefix "SRS_UA_DEGREE_CONV", TRUE | 0x2 | GV_ADDMULTI);
18226     sv_setsv(sv, SWIG_FromCharPtr("0.0174532925199433"));
18227     SvREADONLY_on(sv);
18228   } while(0) /*@SWIG@*/;
18229   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18230     SV *sv = get_sv((char*) SWIG_prefix "SRS_UA_RADIAN", TRUE | 0x2 | GV_ADDMULTI);
18231     sv_setsv(sv, SWIG_FromCharPtr("radian"));
18232     SvREADONLY_on(sv);
18233   } while(0) /*@SWIG@*/;
18234   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18235     SV *sv = get_sv((char*) SWIG_prefix "SRS_PM_GREENWICH", TRUE | 0x2 | GV_ADDMULTI);
18236     sv_setsv(sv, SWIG_FromCharPtr("Greenwich"));
18237     SvREADONLY_on(sv);
18238   } while(0) /*@SWIG@*/;
18239   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18240     SV *sv = get_sv((char*) SWIG_prefix "SRS_DN_NAD27", TRUE | 0x2 | GV_ADDMULTI);
18241     sv_setsv(sv, SWIG_FromCharPtr("North_American_Datum_1927"));
18242     SvREADONLY_on(sv);
18243   } while(0) /*@SWIG@*/;
18244   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18245     SV *sv = get_sv((char*) SWIG_prefix "SRS_DN_NAD83", TRUE | 0x2 | GV_ADDMULTI);
18246     sv_setsv(sv, SWIG_FromCharPtr("North_American_Datum_1983"));
18247     SvREADONLY_on(sv);
18248   } while(0) /*@SWIG@*/;
18249   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18250     SV *sv = get_sv((char*) SWIG_prefix "SRS_DN_WGS72", TRUE | 0x2 | GV_ADDMULTI);
18251     sv_setsv(sv, SWIG_FromCharPtr("WGS_1972"));
18252     SvREADONLY_on(sv);
18253   } while(0) /*@SWIG@*/;
18254   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18255     SV *sv = get_sv((char*) SWIG_prefix "SRS_DN_WGS84", TRUE | 0x2 | GV_ADDMULTI);
18256     sv_setsv(sv, SWIG_FromCharPtr("WGS_1984"));
18257     SvREADONLY_on(sv);
18258   } while(0) /*@SWIG@*/;
18259   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18260     SV *sv = get_sv((char*) SWIG_prefix "SRS_WGS84_SEMIMAJOR", TRUE | 0x2 | GV_ADDMULTI);
18261     sv_setsv(sv, SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(6378137.0)));
18262     SvREADONLY_on(sv);
18263   } while(0) /*@SWIG@*/;
18264   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18265     SV *sv = get_sv((char*) SWIG_prefix "SRS_WGS84_INVFLATTENING", TRUE | 0x2 | GV_ADDMULTI);
18266     sv_setsv(sv, SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(298.257223563)));
18267     SvREADONLY_on(sv);
18268   } while(0) /*@SWIG@*/;
18269   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18270     SV *sv = get_sv((char*) SWIG_prefix "OAO_Other", TRUE | 0x2 | GV_ADDMULTI);
18271     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
18272     SvREADONLY_on(sv);
18273   } while(0) /*@SWIG@*/;
18274   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18275     SV *sv = get_sv((char*) SWIG_prefix "OAO_North", TRUE | 0x2 | GV_ADDMULTI);
18276     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
18277     SvREADONLY_on(sv);
18278   } while(0) /*@SWIG@*/;
18279   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18280     SV *sv = get_sv((char*) SWIG_prefix "OAO_South", TRUE | 0x2 | GV_ADDMULTI);
18281     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
18282     SvREADONLY_on(sv);
18283   } while(0) /*@SWIG@*/;
18284   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18285     SV *sv = get_sv((char*) SWIG_prefix "OAO_East", TRUE | 0x2 | GV_ADDMULTI);
18286     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3)));
18287     SvREADONLY_on(sv);
18288   } while(0) /*@SWIG@*/;
18289   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18290     SV *sv = get_sv((char*) SWIG_prefix "OAO_West", TRUE | 0x2 | GV_ADDMULTI);
18291     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4)));
18292     SvREADONLY_on(sv);
18293   } while(0) /*@SWIG@*/;
18294   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18295     SV *sv = get_sv((char*) SWIG_prefix "OAO_Up", TRUE | 0x2 | GV_ADDMULTI);
18296     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(5)));
18297     SvREADONLY_on(sv);
18298   } while(0) /*@SWIG@*/;
18299   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18300     SV *sv = get_sv((char*) SWIG_prefix "OAO_Down", TRUE | 0x2 | GV_ADDMULTI);
18301     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(6)));
18302     SvREADONLY_on(sv);
18303   } while(0) /*@SWIG@*/;
18304   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18305     SV *sv = get_sv((char*) SWIG_prefix "OAMS_TRADITIONAL_GIS_ORDER", TRUE | 0x2 | GV_ADDMULTI);
18306     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
18307     SvREADONLY_on(sv);
18308   } while(0) /*@SWIG@*/;
18309   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18310     SV *sv = get_sv((char*) SWIG_prefix "OAMS_AUTHORITY_COMPLIANT", TRUE | 0x2 | GV_ADDMULTI);
18311     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
18312     SvREADONLY_on(sv);
18313   } while(0) /*@SWIG@*/;
18314   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18315     SV *sv = get_sv((char*) SWIG_prefix "OAMS_CUSTOM", TRUE | 0x2 | GV_ADDMULTI);
18316     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
18317     SvREADONLY_on(sv);
18318   } while(0) /*@SWIG@*/;
18319   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18320     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_INVALID_OP", TRUE | 0x2 | GV_ADDMULTI);
18321     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1024)));
18322     SvREADONLY_on(sv);
18323   } while(0) /*@SWIG@*/;
18324   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18325     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_INVALID_OP_WRONG_SYNTAX", TRUE | 0x2 | GV_ADDMULTI);
18326     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1025)));
18327     SvREADONLY_on(sv);
18328   } while(0) /*@SWIG@*/;
18329   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18330     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_INVALID_OP_MISSING_ARG", TRUE | 0x2 | GV_ADDMULTI);
18331     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1026)));
18332     SvREADONLY_on(sv);
18333   } while(0) /*@SWIG@*/;
18334   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18335     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE", TRUE | 0x2 | GV_ADDMULTI);
18336     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1027)));
18337     SvREADONLY_on(sv);
18338   } while(0) /*@SWIG@*/;
18339   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18340     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS", TRUE | 0x2 | GV_ADDMULTI);
18341     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1028)));
18342     SvREADONLY_on(sv);
18343   } while(0) /*@SWIG@*/;
18344   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18345     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID", TRUE | 0x2 | GV_ADDMULTI);
18346     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1029)));
18347     SvREADONLY_on(sv);
18348   } while(0) /*@SWIG@*/;
18349   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18350     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_COORD_TRANSFM", TRUE | 0x2 | GV_ADDMULTI);
18351     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2048)));
18352     SvREADONLY_on(sv);
18353   } while(0) /*@SWIG@*/;
18354   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18355     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_COORD_TRANSFM_INVALID_COORD", TRUE | 0x2 | GV_ADDMULTI);
18356     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2049)));
18357     SvREADONLY_on(sv);
18358   } while(0) /*@SWIG@*/;
18359   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18360     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN", TRUE | 0x2 | GV_ADDMULTI);
18361     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2050)));
18362     SvREADONLY_on(sv);
18363   } while(0) /*@SWIG@*/;
18364   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18365     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_COORD_TRANSFM_NO_OPERATION", TRUE | 0x2 | GV_ADDMULTI);
18366     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2051)));
18367     SvREADONLY_on(sv);
18368   } while(0) /*@SWIG@*/;
18369   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18370     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID", TRUE | 0x2 | GV_ADDMULTI);
18371     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2052)));
18372     SvREADONLY_on(sv);
18373   } while(0) /*@SWIG@*/;
18374   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18375     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA", TRUE | 0x2 | GV_ADDMULTI);
18376     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2053)));
18377     SvREADONLY_on(sv);
18378   } while(0) /*@SWIG@*/;
18379   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18380     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_OTHER", TRUE | 0x2 | GV_ADDMULTI);
18381     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4096)));
18382     SvREADONLY_on(sv);
18383   } while(0) /*@SWIG@*/;
18384   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18385     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_OTHER_API_MISUSE", TRUE | 0x2 | GV_ADDMULTI);
18386     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4097)));
18387     SvREADONLY_on(sv);
18388   } while(0) /*@SWIG@*/;
18389   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18390     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_OTHER_NO_INVERSE_OP", TRUE | 0x2 | GV_ADDMULTI);
18391     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4098)));
18392     SvREADONLY_on(sv);
18393   } while(0) /*@SWIG@*/;
18394   /*@SWIG:/home/even/install-swig-3.0.12/share/swig/3.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
18395     SV *sv = get_sv((char*) SWIG_prefix "PROJ_ERR_OTHER_NETWORK_ERROR", TRUE | 0x2 | GV_ADDMULTI);
18396     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4099)));
18397     SvREADONLY_on(sv);
18398   } while(0) /*@SWIG@*/;
18399 
18400   /* %init code */
18401   UseExceptions();
18402 
18403   SWIG_TypeClientData(SWIGTYPE_p_OSRAreaOfUse, (void*) "Geo::OSR::AreaOfUse");
18404   SWIG_TypeClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, (void*) "Geo::OSR::SpatialReference");
18405   SWIG_TypeClientData(SWIGTYPE_p_OGRCoordinateTransformationOptions, (void*) "Geo::OSR::CoordinateTransformationOptions");
18406   SWIG_TypeClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, (void*) "Geo::OSR::CoordinateTransformation");
18407   ST(0) = &PL_sv_yes;
18408   XSRETURN(1);
18409 }
18410 
18411