gdal 0.0.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,8 @@
1
1
  require 'mkmf'
2
2
 
3
+ # see https://github.com/zhm/gdal-ruby/issues/5
4
+ require_relative '../ruby-2.2-patch'
5
+
3
6
  raise 'gdal-config not found.' if `which gdal-config`.empty?
4
7
 
5
8
  dir_config 'gdal',
@@ -1,11 +1,11 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 2.0.4
4
- *
5
- * This file is not intended to be easily readable and contains a number of
3
+ * Version 3.0.5
4
+ *
5
+ * This file is not intended to be easily readable and contains a number of
6
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.
7
+ * changes to this file unless you know what you are doing--modify the SWIG
8
+ * interface file instead.
9
9
  * ----------------------------------------------------------------------------- */
10
10
 
11
11
  #define SWIGRUBY
@@ -65,28 +65,28 @@ template <typename T> T SwigValueInit() {
65
65
  #ifndef SWIGUNUSED
66
66
  # if defined(__GNUC__)
67
67
  # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
68
- # define SWIGUNUSED __attribute__ ((__unused__))
68
+ # define SWIGUNUSED __attribute__ ((__unused__))
69
69
  # else
70
70
  # define SWIGUNUSED
71
71
  # endif
72
72
  # elif defined(__ICC)
73
- # define SWIGUNUSED __attribute__ ((__unused__))
73
+ # define SWIGUNUSED __attribute__ ((__unused__))
74
74
  # else
75
- # define SWIGUNUSED
75
+ # define SWIGUNUSED
76
76
  # endif
77
77
  #endif
78
78
 
79
79
  #ifndef SWIG_MSC_UNSUPPRESS_4505
80
80
  # if defined(_MSC_VER)
81
81
  # pragma warning(disable : 4505) /* unreferenced local function has been removed */
82
- # endif
82
+ # endif
83
83
  #endif
84
84
 
85
85
  #ifndef SWIGUNUSEDPARM
86
86
  # ifdef __cplusplus
87
87
  # define SWIGUNUSEDPARM(p)
88
88
  # else
89
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
89
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
90
90
  # endif
91
91
  #endif
92
92
 
@@ -129,7 +129,7 @@ template <typename T> T SwigValueInit() {
129
129
  # define SWIGSTDCALL __stdcall
130
130
  # else
131
131
  # define SWIGSTDCALL
132
- # endif
132
+ # endif
133
133
  #endif
134
134
 
135
135
  /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -174,28 +174,28 @@ template <typename T> T SwigValueInit() {
174
174
  #ifndef SWIGUNUSED
175
175
  # if defined(__GNUC__)
176
176
  # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
177
- # define SWIGUNUSED __attribute__ ((__unused__))
177
+ # define SWIGUNUSED __attribute__ ((__unused__))
178
178
  # else
179
179
  # define SWIGUNUSED
180
180
  # endif
181
181
  # elif defined(__ICC)
182
- # define SWIGUNUSED __attribute__ ((__unused__))
182
+ # define SWIGUNUSED __attribute__ ((__unused__))
183
183
  # else
184
- # define SWIGUNUSED
184
+ # define SWIGUNUSED
185
185
  # endif
186
186
  #endif
187
187
 
188
188
  #ifndef SWIG_MSC_UNSUPPRESS_4505
189
189
  # if defined(_MSC_VER)
190
190
  # pragma warning(disable : 4505) /* unreferenced local function has been removed */
191
- # endif
191
+ # endif
192
192
  #endif
193
193
 
194
194
  #ifndef SWIGUNUSEDPARM
195
195
  # ifdef __cplusplus
196
196
  # define SWIGUNUSEDPARM(p)
197
197
  # else
198
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
198
+ # define SWIGUNUSEDPARM(p) p SWIGUNUSED
199
199
  # endif
200
200
  #endif
201
201
 
@@ -238,7 +238,7 @@ template <typename T> T SwigValueInit() {
238
238
  # define SWIGSTDCALL __stdcall
239
239
  # else
240
240
  # define SWIGSTDCALL
241
- # endif
241
+ # endif
242
242
  #endif
243
243
 
244
244
  /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
@@ -276,7 +276,7 @@ template <typename T> T SwigValueInit() {
276
276
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
277
277
  creating a static or dynamic library from the SWIG runtime code.
278
278
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
279
-
279
+
280
280
  But only do this if strictly necessary, ie, if you have problems
281
281
  with your compiler or suchlike.
282
282
  */
@@ -302,16 +302,16 @@ template <typename T> T SwigValueInit() {
302
302
  #define SWIG_POINTER_OWN 0x1
303
303
 
304
304
 
305
- /*
305
+ /*
306
306
  Flags/methods for returning states.
307
-
308
- The SWIG conversion methods, as ConvertPtr, return an integer
307
+
308
+ The SWIG conversion methods, as ConvertPtr, return an integer
309
309
  that tells if the conversion was successful or not. And if not,
310
310
  an error code can be returned (see swigerrors.swg for the codes).
311
-
311
+
312
312
  Use the following macros/flags to set or process the returning
313
313
  states.
314
-
314
+
315
315
  In old versions of SWIG, code such as the following was usually written:
316
316
 
317
317
  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
@@ -344,23 +344,23 @@ template <typename T> T SwigValueInit() {
344
344
  } else {
345
345
  // fail code
346
346
  }
347
-
347
+
348
348
  I.e., now SWIG_ConvertPtr can return new objects and you can
349
349
  identify the case and take care of the deallocation. Of course that
350
350
  also requires SWIG_ConvertPtr to return new result values, such as
351
351
 
352
- int SWIG_ConvertPtr(obj, ptr,...) {
353
- if (<obj is ok>) {
354
- if (<need new object>) {
355
- *ptr = <ptr to new allocated object>;
356
- return SWIG_NEWOBJ;
357
- } else {
358
- *ptr = <ptr to old object>;
359
- return SWIG_OLDOBJ;
360
- }
361
- } else {
362
- return SWIG_BADOBJ;
363
- }
352
+ int SWIG_ConvertPtr(obj, ptr,...) {
353
+ if (<obj is ok>) {
354
+ if (<need new object>) {
355
+ *ptr = <ptr to new allocated object>;
356
+ return SWIG_NEWOBJ;
357
+ } else {
358
+ *ptr = <ptr to old object>;
359
+ return SWIG_OLDOBJ;
360
+ }
361
+ } else {
362
+ return SWIG_BADOBJ;
363
+ }
364
364
  }
365
365
 
366
366
  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
@@ -374,17 +374,17 @@ template <typename T> T SwigValueInit() {
374
374
  int fooi(int);
375
375
 
376
376
  and you call
377
-
377
+
378
378
  food(1) // cast rank '1' (1 -> 1.0)
379
379
  fooi(1) // cast rank '0'
380
380
 
381
381
  just use the SWIG_AddCast()/SWIG_CheckState()
382
382
  */
383
383
 
384
- #define SWIG_OK (0)
384
+ #define SWIG_OK (0)
385
385
  #define SWIG_ERROR (-1)
386
386
  #define SWIG_IsOK(r) (r >= 0)
387
- #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
387
+ #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
388
388
 
389
389
  /* The CastRankLimit says how many bits are used for the cast rank */
390
390
  #define SWIG_CASTRANKLIMIT (1 << 8)
@@ -415,14 +415,14 @@ template <typename T> T SwigValueInit() {
415
415
  # endif
416
416
  # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
417
417
  # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
418
- SWIGINTERNINLINE int SWIG_AddCast(int r) {
418
+ SWIGINTERNINLINE int SWIG_AddCast(int r) {
419
419
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
420
420
  }
421
- SWIGINTERNINLINE int SWIG_CheckState(int r) {
422
- return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
421
+ SWIGINTERNINLINE int SWIG_CheckState(int r) {
422
+ return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
423
423
  }
424
424
  #else /* no cast-rank mode */
425
- # define SWIG_AddCast
425
+ # define SWIG_AddCast(r) (r)
426
426
  # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
427
427
  #endif
428
428
 
@@ -466,7 +466,7 @@ typedef struct swig_module_info {
466
466
  void *clientdata; /* Language specific module data */
467
467
  } swig_module_info;
468
468
 
469
- /*
469
+ /*
470
470
  Compare two type names skipping the space characters, therefore
471
471
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
472
472
 
@@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
486
486
 
487
487
  /*
488
488
  Check type equivalence in a name list like <name1>|<name2>|...
489
- Return 0 if not equal, 1 if equal
489
+ Return 0 if equal, -1 if nb < tb, 1 if nb > tb
490
490
  */
491
491
  SWIGRUNTIME int
492
- SWIG_TypeEquiv(const char *nb, const char *tb) {
493
- int equiv = 0;
492
+ SWIG_TypeCmp(const char *nb, const char *tb) {
493
+ int equiv = 1;
494
494
  const char* te = tb + strlen(tb);
495
495
  const char* ne = nb;
496
- while (!equiv && *ne) {
496
+ while (equiv != 0 && *ne) {
497
497
  for (nb = ne; *ne; ++ne) {
498
498
  if (*ne == '|') break;
499
499
  }
500
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
500
+ equiv = SWIG_TypeNameComp(nb, ne, tb, te);
501
501
  if (*ne) ++ne;
502
502
  }
503
503
  return equiv;
@@ -505,24 +505,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
505
505
 
506
506
  /*
507
507
  Check type equivalence in a name list like <name1>|<name2>|...
508
- Return 0 if equal, -1 if nb < tb, 1 if nb > tb
508
+ Return 0 if not equal, 1 if equal
509
509
  */
510
510
  SWIGRUNTIME int
511
- SWIG_TypeCompare(const char *nb, const char *tb) {
512
- int equiv = 0;
513
- const char* te = tb + strlen(tb);
514
- const char* ne = nb;
515
- while (!equiv && *ne) {
516
- for (nb = ne; *ne; ++ne) {
517
- if (*ne == '|') break;
518
- }
519
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
520
- if (*ne) ++ne;
521
- }
522
- return equiv;
511
+ SWIG_TypeEquiv(const char *nb, const char *tb) {
512
+ return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
523
513
  }
524
514
 
525
-
526
515
  /*
527
516
  Check the typename
528
517
  */
@@ -550,7 +539,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
550
539
  return 0;
551
540
  }
552
541
 
553
- /*
542
+ /*
554
543
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
555
544
  */
556
545
  SWIGRUNTIME swig_cast_info *
@@ -585,7 +574,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
585
574
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
586
575
  }
587
576
 
588
- /*
577
+ /*
589
578
  Dynamic pointer casting. Down an inheritance hierarchy
590
579
  */
591
580
  SWIGRUNTIME swig_type_info *
@@ -629,7 +618,7 @@ SWIG_TypePrettyName(const swig_type_info *type) {
629
618
  return type->name;
630
619
  }
631
620
 
632
- /*
621
+ /*
633
622
  Set the clientdata field for a type
634
623
  */
635
624
  SWIGRUNTIME void
@@ -637,14 +626,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
637
626
  swig_cast_info *cast = ti->cast;
638
627
  /* if (ti->clientdata == clientdata) return; */
639
628
  ti->clientdata = clientdata;
640
-
629
+
641
630
  while (cast) {
642
631
  if (!cast->converter) {
643
632
  swig_type_info *tc = cast->type;
644
633
  if (!tc->clientdata) {
645
634
  SWIG_TypeClientData(tc, clientdata);
646
635
  }
647
- }
636
+ }
648
637
  cast = cast->next;
649
638
  }
650
639
  }
@@ -653,31 +642,31 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
653
642
  SWIG_TypeClientData(ti, clientdata);
654
643
  ti->owndata = 1;
655
644
  }
656
-
645
+
657
646
  /*
658
647
  Search for a swig_type_info structure only by mangled name
659
648
  Search is a O(log #types)
660
-
661
- We start searching at module start, and finish searching when start == end.
649
+
650
+ We start searching at module start, and finish searching when start == end.
662
651
  Note: if start == end at the beginning of the function, we go all the way around
663
652
  the circular list.
664
653
  */
665
654
  SWIGRUNTIME swig_type_info *
666
- SWIG_MangledTypeQueryModule(swig_module_info *start,
667
- swig_module_info *end,
655
+ SWIG_MangledTypeQueryModule(swig_module_info *start,
656
+ swig_module_info *end,
668
657
  const char *name) {
669
658
  swig_module_info *iter = start;
670
659
  do {
671
660
  if (iter->size) {
672
- register size_t l = 0;
673
- register size_t r = iter->size - 1;
661
+ size_t l = 0;
662
+ size_t r = iter->size - 1;
674
663
  do {
675
664
  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
676
- register size_t i = (l + r) >> 1;
665
+ size_t i = (l + r) >> 1;
677
666
  const char *iname = iter->types[i]->name;
678
667
  if (iname) {
679
- register int compare = strcmp(name, iname);
680
- if (compare == 0) {
668
+ int compare = strcmp(name, iname);
669
+ if (compare == 0) {
681
670
  return iter->types[i];
682
671
  } else if (compare < 0) {
683
672
  if (i) {
@@ -702,14 +691,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
702
691
  Search for a swig_type_info structure for either a mangled name or a human readable name.
703
692
  It first searches the mangled names of the types, which is a O(log #types)
704
693
  If a type is not found it then searches the human readable names, which is O(#types).
705
-
706
- We start searching at module start, and finish searching when start == end.
694
+
695
+ We start searching at module start, and finish searching when start == end.
707
696
  Note: if start == end at the beginning of the function, we go all the way around
708
697
  the circular list.
709
698
  */
710
699
  SWIGRUNTIME swig_type_info *
711
- SWIG_TypeQueryModule(swig_module_info *start,
712
- swig_module_info *end,
700
+ SWIG_TypeQueryModule(swig_module_info *start,
701
+ swig_module_info *end,
713
702
  const char *name) {
714
703
  /* STEP 1: Search the name field using binary search */
715
704
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
@@ -720,7 +709,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
720
709
  of the str field (the human readable name) */
721
710
  swig_module_info *iter = start;
722
711
  do {
723
- register size_t i = 0;
712
+ size_t i = 0;
724
713
  for (; i < iter->size; ++i) {
725
714
  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
726
715
  return iter->types[i];
@@ -728,56 +717,56 @@ SWIG_TypeQueryModule(swig_module_info *start,
728
717
  iter = iter->next;
729
718
  } while (iter != end);
730
719
  }
731
-
720
+
732
721
  /* neither found a match */
733
722
  return 0;
734
723
  }
735
724
 
736
- /*
725
+ /*
737
726
  Pack binary data into a string
738
727
  */
739
728
  SWIGRUNTIME char *
740
729
  SWIG_PackData(char *c, void *ptr, size_t sz) {
741
730
  static const char hex[17] = "0123456789abcdef";
742
- register const unsigned char *u = (unsigned char *) ptr;
743
- register const unsigned char *eu = u + sz;
731
+ const unsigned char *u = (unsigned char *) ptr;
732
+ const unsigned char *eu = u + sz;
744
733
  for (; u != eu; ++u) {
745
- register unsigned char uu = *u;
734
+ unsigned char uu = *u;
746
735
  *(c++) = hex[(uu & 0xf0) >> 4];
747
736
  *(c++) = hex[uu & 0xf];
748
737
  }
749
738
  return c;
750
739
  }
751
740
 
752
- /*
741
+ /*
753
742
  Unpack binary data from a string
754
743
  */
755
744
  SWIGRUNTIME const char *
756
745
  SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
757
- register unsigned char *u = (unsigned char *) ptr;
758
- register const unsigned char *eu = u + sz;
746
+ unsigned char *u = (unsigned char *) ptr;
747
+ const unsigned char *eu = u + sz;
759
748
  for (; u != eu; ++u) {
760
- register char d = *(c++);
761
- register unsigned char uu;
749
+ char d = *(c++);
750
+ unsigned char uu;
762
751
  if ((d >= '0') && (d <= '9'))
763
752
  uu = ((d - '0') << 4);
764
753
  else if ((d >= 'a') && (d <= 'f'))
765
754
  uu = ((d - ('a'-10)) << 4);
766
- else
755
+ else
767
756
  return (char *) 0;
768
757
  d = *(c++);
769
758
  if ((d >= '0') && (d <= '9'))
770
759
  uu |= (d - '0');
771
760
  else if ((d >= 'a') && (d <= 'f'))
772
761
  uu |= (d - ('a'-10));
773
- else
762
+ else
774
763
  return (char *) 0;
775
764
  *u = uu;
776
765
  }
777
766
  return c;
778
767
  }
779
768
 
780
- /*
769
+ /*
781
770
  Pack 'void *' into a string buffer.
782
771
  */
783
772
  SWIGRUNTIME char *
@@ -837,18 +826,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
837
826
  #endif
838
827
 
839
828
  /* Errors in SWIG */
840
- #define SWIG_UnknownError -1
841
- #define SWIG_IOError -2
842
- #define SWIG_RuntimeError -3
843
- #define SWIG_IndexError -4
844
- #define SWIG_TypeError -5
845
- #define SWIG_DivisionByZero -6
846
- #define SWIG_OverflowError -7
847
- #define SWIG_SyntaxError -8
848
- #define SWIG_ValueError -9
829
+ #define SWIG_UnknownError -1
830
+ #define SWIG_IOError -2
831
+ #define SWIG_RuntimeError -3
832
+ #define SWIG_IndexError -4
833
+ #define SWIG_TypeError -5
834
+ #define SWIG_DivisionByZero -6
835
+ #define SWIG_OverflowError -7
836
+ #define SWIG_SyntaxError -8
837
+ #define SWIG_ValueError -9
849
838
  #define SWIG_SystemError -10
850
839
  #define SWIG_AttributeError -11
851
- #define SWIG_MemoryError -12
840
+ #define SWIG_MemoryError -12
852
841
  #define SWIG_NullReferenceError -13
853
842
 
854
843
 
@@ -1398,7 +1387,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1398
1387
 
1399
1388
  /* Runtime API */
1400
1389
 
1401
- #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
1390
+ #define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
1402
1391
  #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
1403
1392
 
1404
1393
 
@@ -1514,14 +1503,13 @@ SWIG_Ruby_InitRuntime(void)
1514
1503
  SWIGRUNTIME void
1515
1504
  SWIG_Ruby_define_class(swig_type_info *type)
1516
1505
  {
1517
- VALUE klass;
1518
1506
  char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
1519
1507
  sprintf(klass_name, "TYPE%s", type->name);
1520
1508
  if (NIL_P(_cSWIG_Pointer)) {
1521
1509
  _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
1522
1510
  rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
1523
1511
  }
1524
- klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1512
+ rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
1525
1513
  free((void *) klass_name);
1526
1514
  }
1527
1515
 
@@ -1552,7 +1540,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1552
1540
  downcast methods. */
1553
1541
  if (obj != Qnil) {
1554
1542
  VALUE value = rb_iv_get(obj, "@__swigtype__");
1555
- char* type_name = RSTRING_PTR(value);
1543
+ const char* type_name = RSTRING_PTR(value);
1556
1544
 
1557
1545
  if (strcmp(type->name, type_name) == 0) {
1558
1546
  return obj;
@@ -1734,7 +1722,7 @@ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1734
1722
  }
1735
1723
 
1736
1724
  SWIGRUNTIME swig_module_info *
1737
- SWIG_Ruby_GetModule(void)
1725
+ SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
1738
1726
  {
1739
1727
  VALUE pointer;
1740
1728
  swig_module_info *ret = 0;
@@ -1774,7 +1762,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1774
1762
  SWIGINTERN
1775
1763
  int SWIG_Ruby_isCallable( VALUE proc )
1776
1764
  {
1777
- if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1765
+ if ( rb_respond_to( proc, swig_call_id ) )
1778
1766
  return 1;
1779
1767
  return 0;
1780
1768
  }
@@ -1787,7 +1775,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
1787
1775
  SWIGINTERN
1788
1776
  int SWIG_Ruby_arity( VALUE proc, int minimal )
1789
1777
  {
1790
- if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1778
+ if ( rb_respond_to( proc, swig_arity_id ) )
1791
1779
  {
1792
1780
  VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1793
1781
  int arity = NUM2INT(num);
@@ -1840,7 +1828,7 @@ static VALUE mOsr;
1840
1828
  #define SWIG_RUBY_THREAD_END_BLOCK
1841
1829
 
1842
1830
 
1843
- #define SWIGVERSION 0x020004
1831
+ #define SWIGVERSION 0x030005
1844
1832
  #define SWIG_VERSION SWIGVERSION
1845
1833
 
1846
1834
 
@@ -1916,7 +1904,7 @@ typedef void OSRCoordinateTransformationShadow;
1916
1904
  extern "C" {
1917
1905
  #endif
1918
1906
 
1919
- // Ruby 1.9 changed the file name of this header
1907
+ /* Ruby 1.9 changed the file name of this header */
1920
1908
  #ifdef HAVE_RUBY_IO_H
1921
1909
  #include "ruby/io.h"
1922
1910
  #else
@@ -1983,11 +1971,7 @@ SWIGINTERN int
1983
1971
  SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1984
1972
  {
1985
1973
  if (TYPE(obj) == T_STRING) {
1986
- #if defined(StringValuePtr)
1987
1974
  char *cstr = StringValuePtr(obj);
1988
- #else
1989
- char *cstr = STR2CSTR(obj);
1990
- #endif
1991
1975
  size_t size = RSTRING_LEN(obj) + 1;
1992
1976
  if (cptr) {
1993
1977
  if (alloc) {
@@ -2098,7 +2082,7 @@ SWIG_ruby_failed(void)
2098
2082
  }
2099
2083
 
2100
2084
 
2101
- /*@SWIG:/usr/local/Cellar/swig/2.0.4/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2085
+ /*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2102
2086
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2103
2087
  {
2104
2088
  VALUE obj = args[0];
@@ -2152,13 +2136,13 @@ SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShad
2152
2136
  return OSRSetAttrValue( self, name, value );
2153
2137
  }
2154
2138
 
2155
- /*@SWIG:/usr/local/Cellar/swig/2.0.4/share/swig/2.0.4/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2139
+ /*@SWIG:/usr/local/Cellar/swig/3.0.5/share/swig/3.0.5/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2156
2140
  SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2157
2141
  {
2158
2142
  VALUE obj = args[0];
2159
2143
  VALUE type = TYPE(obj);
2160
2144
  double *res = (double *)(args[1]);
2161
- *res = NUM2DBL(obj);
2145
+ *res = NUM2DBL(obj); (void)type;
2162
2146
  return obj;
2163
2147
  }
2164
2148
  /*@SWIG@*/
@@ -2488,6 +2472,9 @@ SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceSha
2488
2472
  SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
2489
2473
  return OSRImportFromMICoordSys( self, pszCoordSys );
2490
2474
  }
2475
+ SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *datum,char const *proj,char const *projParms){
2476
+ return OSRImportFromOzi( self, datum, proj, projParms );
2477
+ }
2491
2478
  SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout){
2492
2479
  return OSRExportToWkt( self, argout );
2493
2480
  }
@@ -2555,6 +2542,12 @@ SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateT
2555
2542
  return;
2556
2543
  OCTTransform( self, nCount, x, y, z );
2557
2544
  }
2545
+
2546
+ OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst ) {
2547
+ OSRCoordinateTransformationShadow *obj = (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation( src, dst );
2548
+ return obj;
2549
+ }
2550
+
2558
2551
  SWIGINTERN VALUE
2559
2552
  _wrap_get_well_known_geog_csas_wkt(int argc, VALUE *argv, VALUE self) {
2560
2553
  char *arg1 = (char *) 0 ;
@@ -2809,7 +2802,7 @@ fail:
2809
2802
  }
2810
2803
 
2811
2804
 
2812
- swig_class SwigClassSpatialReference;
2805
+ static swig_class SwigClassSpatialReference;
2813
2806
 
2814
2807
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2815
2808
  SWIGINTERN VALUE
@@ -2834,7 +2827,7 @@ _wrap_new_SpatialReference(int argc, VALUE *argv, VALUE self) {
2834
2827
  int res1 ;
2835
2828
  char *buf1 = 0 ;
2836
2829
  int alloc1 = 0 ;
2837
- char *kwnames[] = {
2830
+ const char *kwnames[] = {
2838
2831
  "wkt", NULL
2839
2832
  };
2840
2833
  OSRSpatialReferenceShadow *result = 0 ;
@@ -4274,7 +4267,7 @@ _wrap_SpatialReference_set_acea(int argc, VALUE *argv, VALUE self) {
4274
4267
  int ecode6 = 0 ;
4275
4268
  double val7 ;
4276
4269
  int ecode7 = 0 ;
4277
- char *kwnames[] = {
4270
+ const char *kwnames[] = {
4278
4271
  "self","stdp1","stdp2","clat","clong","fe","fn", NULL
4279
4272
  };
4280
4273
  OGRErr result;
@@ -4353,7 +4346,7 @@ _wrap_SpatialReference_set_ae(int argc, VALUE *argv, VALUE self) {
4353
4346
  int ecode4 = 0 ;
4354
4347
  double val5 ;
4355
4348
  int ecode5 = 0 ;
4356
- char *kwnames[] = {
4349
+ const char *kwnames[] = {
4357
4350
  "self","clat","clong","fe","fn", NULL
4358
4351
  };
4359
4352
  OGRErr result;
@@ -4422,7 +4415,7 @@ _wrap_SpatialReference_set_bonne(int argc, VALUE *argv, VALUE self) {
4422
4415
  int ecode4 = 0 ;
4423
4416
  double val5 ;
4424
4417
  int ecode5 = 0 ;
4425
- char *kwnames[] = {
4418
+ const char *kwnames[] = {
4426
4419
  "self","stdp","cm","fe","fn", NULL
4427
4420
  };
4428
4421
  OGRErr result;
@@ -4491,7 +4484,7 @@ _wrap_SpatialReference_set_cea(int argc, VALUE *argv, VALUE self) {
4491
4484
  int ecode4 = 0 ;
4492
4485
  double val5 ;
4493
4486
  int ecode5 = 0 ;
4494
- char *kwnames[] = {
4487
+ const char *kwnames[] = {
4495
4488
  "self","stdp1","cm","fe","fn", NULL
4496
4489
  };
4497
4490
  OGRErr result;
@@ -4560,7 +4553,7 @@ _wrap_SpatialReference_set_cs(int argc, VALUE *argv, VALUE self) {
4560
4553
  int ecode4 = 0 ;
4561
4554
  double val5 ;
4562
4555
  int ecode5 = 0 ;
4563
- char *kwnames[] = {
4556
+ const char *kwnames[] = {
4564
4557
  "self","clat","clong","fe","fn", NULL
4565
4558
  };
4566
4559
  OGRErr result;
@@ -4635,7 +4628,7 @@ _wrap_SpatialReference_set_ec(int argc, VALUE *argv, VALUE self) {
4635
4628
  int ecode6 = 0 ;
4636
4629
  double val7 ;
4637
4630
  int ecode7 = 0 ;
4638
- char *kwnames[] = {
4631
+ const char *kwnames[] = {
4639
4632
  "self","stdp1","stdp2","clat","clong","fe","fn", NULL
4640
4633
  };
4641
4634
  OGRErr result;
@@ -4711,7 +4704,7 @@ _wrap_SpatialReference_set_eckert_iv(int argc, VALUE *argv, VALUE self) {
4711
4704
  int ecode3 = 0 ;
4712
4705
  double val4 ;
4713
4706
  int ecode4 = 0 ;
4714
- char *kwnames[] = {
4707
+ const char *kwnames[] = {
4715
4708
  "self","cm","fe","fn", NULL
4716
4709
  };
4717
4710
  OGRErr result;
@@ -4772,7 +4765,7 @@ _wrap_SpatialReference_set_eckert_vi(int argc, VALUE *argv, VALUE self) {
4772
4765
  int ecode3 = 0 ;
4773
4766
  double val4 ;
4774
4767
  int ecode4 = 0 ;
4775
- char *kwnames[] = {
4768
+ const char *kwnames[] = {
4776
4769
  "self","cm","fe","fn", NULL
4777
4770
  };
4778
4771
  OGRErr result;
@@ -4836,7 +4829,7 @@ _wrap_SpatialReference_set_equirectangular(int argc, VALUE *argv, VALUE self) {
4836
4829
  int ecode4 = 0 ;
4837
4830
  double val5 ;
4838
4831
  int ecode5 = 0 ;
4839
- char *kwnames[] = {
4832
+ const char *kwnames[] = {
4840
4833
  "self","clat","clong","fe","fn", NULL
4841
4834
  };
4842
4835
  OGRErr result;
@@ -4908,7 +4901,7 @@ _wrap_SpatialReference_set_equirectangular2(int argc, VALUE *argv, VALUE self) {
4908
4901
  int ecode5 = 0 ;
4909
4902
  double val6 ;
4910
4903
  int ecode6 = 0 ;
4911
- char *kwnames[] = {
4904
+ const char *kwnames[] = {
4912
4905
  "self","clat","clong","pseudostdparallellat","fe","fn", NULL
4913
4906
  };
4914
4907
  OGRErr result;
@@ -4985,7 +4978,7 @@ _wrap_SpatialReference_set_gauss_schreiber_tmercator(int argc, VALUE *argv, VALU
4985
4978
  int ecode5 = 0 ;
4986
4979
  double val6 ;
4987
4980
  int ecode6 = 0 ;
4988
- char *kwnames[] = {
4981
+ const char *kwnames[] = {
4989
4982
  "self","clat","clong","sc","fe","fn", NULL
4990
4983
  };
4991
4984
  OGRErr result;
@@ -5056,7 +5049,7 @@ _wrap_SpatialReference_set_gs(int argc, VALUE *argv, VALUE self) {
5056
5049
  int ecode3 = 0 ;
5057
5050
  double val4 ;
5058
5051
  int ecode4 = 0 ;
5059
- char *kwnames[] = {
5052
+ const char *kwnames[] = {
5060
5053
  "self","cm","fe","fn", NULL
5061
5054
  };
5062
5055
  OGRErr result;
@@ -5117,7 +5110,7 @@ _wrap_SpatialReference_set_gh(int argc, VALUE *argv, VALUE self) {
5117
5110
  int ecode3 = 0 ;
5118
5111
  double val4 ;
5119
5112
  int ecode4 = 0 ;
5120
- char *kwnames[] = {
5113
+ const char *kwnames[] = {
5121
5114
  "self","cm","fe","fn", NULL
5122
5115
  };
5123
5116
  OGRErr result;
@@ -5215,7 +5208,7 @@ _wrap_SpatialReference_set_geos(int argc, VALUE *argv, VALUE self) {
5215
5208
  int ecode4 = 0 ;
5216
5209
  double val5 ;
5217
5210
  int ecode5 = 0 ;
5218
- char *kwnames[] = {
5211
+ const char *kwnames[] = {
5219
5212
  "self","cm","satelliteheight","fe","fn", NULL
5220
5213
  };
5221
5214
  OGRErr result;
@@ -5284,7 +5277,7 @@ _wrap_SpatialReference_set_gnomonic(int argc, VALUE *argv, VALUE self) {
5284
5277
  int ecode4 = 0 ;
5285
5278
  double val5 ;
5286
5279
  int ecode5 = 0 ;
5287
- char *kwnames[] = {
5280
+ const char *kwnames[] = {
5288
5281
  "self","clat","clong","fe","fn", NULL
5289
5282
  };
5290
5283
  OGRErr result;
@@ -5362,7 +5355,7 @@ _wrap_SpatialReference_set_hom(int argc, VALUE *argv, VALUE self) {
5362
5355
  int ecode7 = 0 ;
5363
5356
  double val8 ;
5364
5357
  int ecode8 = 0 ;
5365
- char *kwnames[] = {
5358
+ const char *kwnames[] = {
5366
5359
  "self","clat","clong","azimuth","recttoskew","scale","fe","fn", NULL
5367
5360
  };
5368
5361
  OGRErr result;
@@ -5458,7 +5451,7 @@ _wrap_SpatialReference_set_hom_2pno(int argc, VALUE *argv, VALUE self) {
5458
5451
  int ecode8 = 0 ;
5459
5452
  double val9 ;
5460
5453
  int ecode9 = 0 ;
5461
- char *kwnames[] = {
5454
+ const char *kwnames[] = {
5462
5455
  "self","clat","dfLat1","dfLong1","dfLat2","dfLong2","scale","fe","fn", NULL
5463
5456
  };
5464
5457
  OGRErr result;
@@ -5556,7 +5549,7 @@ _wrap_SpatialReference_set_krovak(int argc, VALUE *argv, VALUE self) {
5556
5549
  int ecode7 = 0 ;
5557
5550
  double val8 ;
5558
5551
  int ecode8 = 0 ;
5559
- char *kwnames[] = {
5552
+ const char *kwnames[] = {
5560
5553
  "self","clat","clong","azimuth","pseudostdparallellat","scale","fe","fn", NULL
5561
5554
  };
5562
5555
  OGRErr result;
@@ -5640,7 +5633,7 @@ _wrap_SpatialReference_set_laea(int argc, VALUE *argv, VALUE self) {
5640
5633
  int ecode4 = 0 ;
5641
5634
  double val5 ;
5642
5635
  int ecode5 = 0 ;
5643
- char *kwnames[] = {
5636
+ const char *kwnames[] = {
5644
5637
  "self","clat","clong","fe","fn", NULL
5645
5638
  };
5646
5639
  OGRErr result;
@@ -5715,7 +5708,7 @@ _wrap_SpatialReference_set_lcc(int argc, VALUE *argv, VALUE self) {
5715
5708
  int ecode6 = 0 ;
5716
5709
  double val7 ;
5717
5710
  int ecode7 = 0 ;
5718
- char *kwnames[] = {
5711
+ const char *kwnames[] = {
5719
5712
  "self","stdp1","stdp2","clat","clong","fe","fn", NULL
5720
5713
  };
5721
5714
  OGRErr result;
@@ -5797,7 +5790,7 @@ _wrap_SpatialReference_set_lcc_1sp(int argc, VALUE *argv, VALUE self) {
5797
5790
  int ecode5 = 0 ;
5798
5791
  double val6 ;
5799
5792
  int ecode6 = 0 ;
5800
- char *kwnames[] = {
5793
+ const char *kwnames[] = {
5801
5794
  "self","clat","clong","scale","fe","fn", NULL
5802
5795
  };
5803
5796
  OGRErr result;
@@ -5877,7 +5870,7 @@ _wrap_SpatialReference_set_lccb(int argc, VALUE *argv, VALUE self) {
5877
5870
  int ecode6 = 0 ;
5878
5871
  double val7 ;
5879
5872
  int ecode7 = 0 ;
5880
- char *kwnames[] = {
5873
+ const char *kwnames[] = {
5881
5874
  "self","stdp1","stdp2","clat","clong","fe","fn", NULL
5882
5875
  };
5883
5876
  OGRErr result;
@@ -5956,7 +5949,7 @@ _wrap_SpatialReference_set_mc(int argc, VALUE *argv, VALUE self) {
5956
5949
  int ecode4 = 0 ;
5957
5950
  double val5 ;
5958
5951
  int ecode5 = 0 ;
5959
- char *kwnames[] = {
5952
+ const char *kwnames[] = {
5960
5953
  "self","clat","clong","fe","fn", NULL
5961
5954
  };
5962
5955
  OGRErr result;
@@ -6028,7 +6021,7 @@ _wrap_SpatialReference_set_mercator(int argc, VALUE *argv, VALUE self) {
6028
6021
  int ecode5 = 0 ;
6029
6022
  double val6 ;
6030
6023
  int ecode6 = 0 ;
6031
- char *kwnames[] = {
6024
+ const char *kwnames[] = {
6032
6025
  "self","clat","clong","scale","fe","fn", NULL
6033
6026
  };
6034
6027
  OGRErr result;
@@ -6099,7 +6092,7 @@ _wrap_SpatialReference_set_mollweide(int argc, VALUE *argv, VALUE self) {
6099
6092
  int ecode3 = 0 ;
6100
6093
  double val4 ;
6101
6094
  int ecode4 = 0 ;
6102
- char *kwnames[] = {
6095
+ const char *kwnames[] = {
6103
6096
  "self","cm","fe","fn", NULL
6104
6097
  };
6105
6098
  OGRErr result;
@@ -6163,7 +6156,7 @@ _wrap_SpatialReference_set_nzmg(int argc, VALUE *argv, VALUE self) {
6163
6156
  int ecode4 = 0 ;
6164
6157
  double val5 ;
6165
6158
  int ecode5 = 0 ;
6166
- char *kwnames[] = {
6159
+ const char *kwnames[] = {
6167
6160
  "self","clat","clong","fe","fn", NULL
6168
6161
  };
6169
6162
  OGRErr result;
@@ -6235,7 +6228,7 @@ _wrap_SpatialReference_set_os(int argc, VALUE *argv, VALUE self) {
6235
6228
  int ecode5 = 0 ;
6236
6229
  double val6 ;
6237
6230
  int ecode6 = 0 ;
6238
- char *kwnames[] = {
6231
+ const char *kwnames[] = {
6239
6232
  "self","dfOriginLat","dfCMeridian","scale","fe","fn", NULL
6240
6233
  };
6241
6234
  OGRErr result;
@@ -6309,7 +6302,7 @@ _wrap_SpatialReference_set_orthographic(int argc, VALUE *argv, VALUE self) {
6309
6302
  int ecode4 = 0 ;
6310
6303
  double val5 ;
6311
6304
  int ecode5 = 0 ;
6312
- char *kwnames[] = {
6305
+ const char *kwnames[] = {
6313
6306
  "self","clat","clong","fe","fn", NULL
6314
6307
  };
6315
6308
  OGRErr result;
@@ -6378,7 +6371,7 @@ _wrap_SpatialReference_set_polyconic(int argc, VALUE *argv, VALUE self) {
6378
6371
  int ecode4 = 0 ;
6379
6372
  double val5 ;
6380
6373
  int ecode5 = 0 ;
6381
- char *kwnames[] = {
6374
+ const char *kwnames[] = {
6382
6375
  "self","clat","clong","fe","fn", NULL
6383
6376
  };
6384
6377
  OGRErr result;
@@ -6450,7 +6443,7 @@ _wrap_SpatialReference_set_ps(int argc, VALUE *argv, VALUE self) {
6450
6443
  int ecode5 = 0 ;
6451
6444
  double val6 ;
6452
6445
  int ecode6 = 0 ;
6453
- char *kwnames[] = {
6446
+ const char *kwnames[] = {
6454
6447
  "self","clat","clong","scale","fe","fn", NULL
6455
6448
  };
6456
6449
  OGRErr result;
@@ -6521,7 +6514,7 @@ _wrap_SpatialReference_set_robinson(int argc, VALUE *argv, VALUE self) {
6521
6514
  int ecode3 = 0 ;
6522
6515
  double val4 ;
6523
6516
  int ecode4 = 0 ;
6524
- char *kwnames[] = {
6517
+ const char *kwnames[] = {
6525
6518
  "self","clong","fe","fn", NULL
6526
6519
  };
6527
6520
  OGRErr result;
@@ -6582,7 +6575,7 @@ _wrap_SpatialReference_set_sinusoidal(int argc, VALUE *argv, VALUE self) {
6582
6575
  int ecode3 = 0 ;
6583
6576
  double val4 ;
6584
6577
  int ecode4 = 0 ;
6585
- char *kwnames[] = {
6578
+ const char *kwnames[] = {
6586
6579
  "self","clong","fe","fn", NULL
6587
6580
  };
6588
6581
  OGRErr result;
@@ -6649,7 +6642,7 @@ _wrap_SpatialReference_set_stereographic(int argc, VALUE *argv, VALUE self) {
6649
6642
  int ecode5 = 0 ;
6650
6643
  double val6 ;
6651
6644
  int ecode6 = 0 ;
6652
- char *kwnames[] = {
6645
+ const char *kwnames[] = {
6653
6646
  "self","clat","clong","scale","fe","fn", NULL
6654
6647
  };
6655
6648
  OGRErr result;
@@ -6723,7 +6716,7 @@ _wrap_SpatialReference_set_soc(int argc, VALUE *argv, VALUE self) {
6723
6716
  int ecode4 = 0 ;
6724
6717
  double val5 ;
6725
6718
  int ecode5 = 0 ;
6726
- char *kwnames[] = {
6719
+ const char *kwnames[] = {
6727
6720
  "self","latitudeoforigin","cm","fe","fn", NULL
6728
6721
  };
6729
6722
  OGRErr result;
@@ -6795,7 +6788,7 @@ _wrap_SpatialReference_set_tm(int argc, VALUE *argv, VALUE self) {
6795
6788
  int ecode5 = 0 ;
6796
6789
  double val6 ;
6797
6790
  int ecode6 = 0 ;
6798
- char *kwnames[] = {
6791
+ const char *kwnames[] = {
6799
6792
  "self","clat","clong","scale","fe","fn", NULL
6800
6793
  };
6801
6794
  OGRErr result;
@@ -6876,7 +6869,7 @@ _wrap_SpatialReference_set_tmvariant(int argc, VALUE *argv, VALUE self) {
6876
6869
  int ecode6 = 0 ;
6877
6870
  double val7 ;
6878
6871
  int ecode7 = 0 ;
6879
- char *kwnames[] = {
6872
+ const char *kwnames[] = {
6880
6873
  "self","pszVariantName","clat","clong","scale","fe","fn", NULL
6881
6874
  };
6882
6875
  OGRErr result;
@@ -6957,7 +6950,7 @@ _wrap_SpatialReference_set_tmg(int argc, VALUE *argv, VALUE self) {
6957
6950
  int ecode4 = 0 ;
6958
6951
  double val5 ;
6959
6952
  int ecode5 = 0 ;
6960
- char *kwnames[] = {
6953
+ const char *kwnames[] = {
6961
6954
  "self","clat","clong","fe","fn", NULL
6962
6955
  };
6963
6956
  OGRErr result;
@@ -7029,7 +7022,7 @@ _wrap_SpatialReference_set_tmso(int argc, VALUE *argv, VALUE self) {
7029
7022
  int ecode5 = 0 ;
7030
7023
  double val6 ;
7031
7024
  int ecode6 = 0 ;
7032
- char *kwnames[] = {
7025
+ const char *kwnames[] = {
7033
7026
  "self","clat","clong","scale","fe","fn", NULL
7034
7027
  };
7035
7028
  OGRErr result;
@@ -7100,7 +7093,7 @@ _wrap_SpatialReference_set_vdg(int argc, VALUE *argv, VALUE self) {
7100
7093
  int ecode3 = 0 ;
7101
7094
  double val4 ;
7102
7095
  int ecode4 = 0 ;
7103
- char *kwnames[] = {
7096
+ const char *kwnames[] = {
7104
7097
  "self","clong","fe","fn", NULL
7105
7098
  };
7106
7099
  OGRErr result;
@@ -8489,6 +8482,88 @@ fail:
8489
8482
  }
8490
8483
 
8491
8484
 
8485
+ SWIGINTERN VALUE
8486
+ _wrap_SpatialReference_import_from_ozi(int argc, VALUE *argv, VALUE self) {
8487
+ OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8488
+ char *arg2 = (char *) 0 ;
8489
+ char *arg3 = (char *) 0 ;
8490
+ char *arg4 = (char *) 0 ;
8491
+ void *argp1 = 0 ;
8492
+ int res1 = 0 ;
8493
+ int res2 ;
8494
+ char *buf2 = 0 ;
8495
+ int alloc2 = 0 ;
8496
+ int res3 ;
8497
+ char *buf3 = 0 ;
8498
+ int alloc3 = 0 ;
8499
+ int res4 ;
8500
+ char *buf4 = 0 ;
8501
+ int alloc4 = 0 ;
8502
+ OGRErr result;
8503
+ VALUE vresult = Qnil;
8504
+
8505
+ if ((argc < 3) || (argc > 3)) {
8506
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail;
8507
+ }
8508
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8509
+ if (!SWIG_IsOK(res1)) {
8510
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OSRSpatialReferenceShadow *","ImportFromOzi", 1, self ));
8511
+ }
8512
+ arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8513
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
8514
+ if (!SWIG_IsOK(res2)) {
8515
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","ImportFromOzi", 2, argv[0] ));
8516
+ }
8517
+ arg2 = reinterpret_cast< char * >(buf2);
8518
+ res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
8519
+ if (!SWIG_IsOK(res3)) {
8520
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","ImportFromOzi", 3, argv[1] ));
8521
+ }
8522
+ arg3 = reinterpret_cast< char * >(buf3);
8523
+ res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
8524
+ if (!SWIG_IsOK(res4)) {
8525
+ SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","ImportFromOzi", 4, argv[2] ));
8526
+ }
8527
+ arg4 = reinterpret_cast< char * >(buf4);
8528
+ {
8529
+ if (!arg2) {
8530
+ SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8531
+ }
8532
+ }
8533
+ {
8534
+ if (!arg3) {
8535
+ SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8536
+ }
8537
+ }
8538
+ {
8539
+ if (!arg4) {
8540
+ SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8541
+ }
8542
+ }
8543
+ result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
8544
+ {
8545
+ /* %typemap(out) OGRErr */
8546
+ if (result != 0) {
8547
+ rb_raise(rb_eRuntimeError, OGRErrMessages(result));
8548
+ }
8549
+ }
8550
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8551
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
8552
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8553
+ {
8554
+ /* %typemap(ret) OGRErr */
8555
+ if (vresult == Qnil) {
8556
+ vresult = INT2NUM(0);
8557
+ }
8558
+ } return vresult;
8559
+ fail:
8560
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8561
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
8562
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8563
+ return Qnil;
8564
+ }
8565
+
8566
+
8492
8567
  SWIGINTERN VALUE
8493
8568
  _wrap_SpatialReference_export_to_wkt(int argc, VALUE *argv, VALUE self) {
8494
8569
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
@@ -9300,7 +9375,7 @@ fail:
9300
9375
  }
9301
9376
 
9302
9377
 
9303
- swig_class SwigClassCoordinateTransformation;
9378
+ static swig_class SwigClassCoordinateTransformation;
9304
9379
 
9305
9380
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
9306
9381
  SWIGINTERN VALUE
@@ -9603,6 +9678,38 @@ fail:
9603
9678
  }
9604
9679
 
9605
9680
 
9681
+ SWIGINTERN VALUE
9682
+ _wrap_create_coordinate_transformation(int argc, VALUE *argv, VALUE self) {
9683
+ OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9684
+ OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
9685
+ void *argp1 = 0 ;
9686
+ int res1 = 0 ;
9687
+ void *argp2 = 0 ;
9688
+ int res2 = 0 ;
9689
+ OSRCoordinateTransformationShadow *result = 0 ;
9690
+ VALUE vresult = Qnil;
9691
+
9692
+ if ((argc < 2) || (argc > 2)) {
9693
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
9694
+ }
9695
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9696
+ if (!SWIG_IsOK(res1)) {
9697
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "OSRSpatialReferenceShadow *","CreateCoordinateTransformation", 1, argv[0] ));
9698
+ }
9699
+ arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9700
+ res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9701
+ if (!SWIG_IsOK(res2)) {
9702
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "OSRSpatialReferenceShadow *","CreateCoordinateTransformation", 2, argv[1] ));
9703
+ }
9704
+ arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
9705
+ result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2);
9706
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
9707
+ return vresult;
9708
+ fail:
9709
+ return Qnil;
9710
+ }
9711
+
9712
+
9606
9713
 
9607
9714
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
9608
9715
 
@@ -9651,18 +9758,18 @@ static swig_cast_info *swig_cast_initial[] = {
9651
9758
 
9652
9759
  /* -----------------------------------------------------------------------------
9653
9760
  * Type initialization:
9654
- * This problem is tough by the requirement that no dynamic
9655
- * memory is used. Also, since swig_type_info structures store pointers to
9761
+ * This problem is tough by the requirement that no dynamic
9762
+ * memory is used. Also, since swig_type_info structures store pointers to
9656
9763
  * swig_cast_info structures and swig_cast_info structures store pointers back
9657
- * to swig_type_info structures, we need some lookup code at initialization.
9658
- * The idea is that swig generates all the structures that are needed.
9659
- * The runtime then collects these partially filled structures.
9660
- * The SWIG_InitializeModule function takes these initial arrays out of
9764
+ * to swig_type_info structures, we need some lookup code at initialization.
9765
+ * The idea is that swig generates all the structures that are needed.
9766
+ * The runtime then collects these partially filled structures.
9767
+ * The SWIG_InitializeModule function takes these initial arrays out of
9661
9768
  * swig_module, and does all the lookup, filling in the swig_module.types
9662
9769
  * array with the correct data and linking the correct swig_cast_info
9663
9770
  * structures together.
9664
9771
  *
9665
- * The generated swig_type_info structures are assigned staticly to an initial
9772
+ * The generated swig_type_info structures are assigned statically to an initial
9666
9773
  * array. We just loop through that array, and handle each type individually.
9667
9774
  * First we lookup if this type has been already loaded, and if so, use the
9668
9775
  * loaded structure instead of the generated one. Then we have to fill in the
@@ -9672,17 +9779,17 @@ static swig_cast_info *swig_cast_initial[] = {
9672
9779
  * a column is one of the swig_cast_info structures for that type.
9673
9780
  * The cast_initial array is actually an array of arrays, because each row has
9674
9781
  * a variable number of columns. So to actually build the cast linked list,
9675
- * we find the array of casts associated with the type, and loop through it
9782
+ * we find the array of casts associated with the type, and loop through it
9676
9783
  * adding the casts to the list. The one last trick we need to do is making
9677
9784
  * sure the type pointer in the swig_cast_info struct is correct.
9678
9785
  *
9679
- * First off, we lookup the cast->type name to see if it is already loaded.
9786
+ * First off, we lookup the cast->type name to see if it is already loaded.
9680
9787
  * There are three cases to handle:
9681
9788
  * 1) If the cast->type has already been loaded AND the type we are adding
9682
9789
  * casting info to has not been loaded (it is in this module), THEN we
9683
9790
  * replace the cast->type pointer with the type pointer that has already
9684
9791
  * been loaded.
9685
- * 2) If BOTH types (the one we are adding casting info to, and the
9792
+ * 2) If BOTH types (the one we are adding casting info to, and the
9686
9793
  * cast->type) are loaded, THEN the cast info has already been loaded by
9687
9794
  * the previous module so we just ignore it.
9688
9795
  * 3) Finally, if cast->type has not already been loaded, then we add that
@@ -9706,9 +9813,7 @@ SWIGRUNTIME void
9706
9813
  SWIG_InitializeModule(void *clientdata) {
9707
9814
  size_t i;
9708
9815
  swig_module_info *module_head, *iter;
9709
- int found, init;
9710
-
9711
- clientdata = clientdata;
9816
+ int init;
9712
9817
 
9713
9818
  /* check to see if the circular list has been setup, if not, set it up */
9714
9819
  if (swig_module.next==0) {
@@ -9727,27 +9832,23 @@ SWIG_InitializeModule(void *clientdata) {
9727
9832
  /* This is the first module loaded for this interpreter */
9728
9833
  /* so set the swig module into the interpreter */
9729
9834
  SWIG_SetModule(clientdata, &swig_module);
9730
- module_head = &swig_module;
9731
9835
  } else {
9732
9836
  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
9733
- found=0;
9734
9837
  iter=module_head;
9735
9838
  do {
9736
9839
  if (iter==&swig_module) {
9737
- found=1;
9738
- break;
9840
+ /* Our module is already in the list, so there's nothing more to do. */
9841
+ return;
9739
9842
  }
9740
9843
  iter=iter->next;
9741
9844
  } while (iter!= module_head);
9742
9845
 
9743
- /* if the is found in the list, then all is done and we may leave */
9744
- if (found) return;
9745
- /* otherwise we must add out module into the list */
9846
+ /* otherwise we must add our module into the list */
9746
9847
  swig_module.next = module_head->next;
9747
9848
  module_head->next = &swig_module;
9748
9849
  }
9749
9850
 
9750
- /* When multiple interpeters are used, a module could have already been initialized in
9851
+ /* When multiple interpreters are used, a module could have already been initialized in
9751
9852
  a different interpreter, but not yet have a pointer in this interpreter.
9752
9853
  In this case, we do not want to continue adding types... everything should be
9753
9854
  set up already */
@@ -9761,7 +9862,7 @@ SWIG_InitializeModule(void *clientdata) {
9761
9862
  swig_type_info *type = 0;
9762
9863
  swig_type_info *ret;
9763
9864
  swig_cast_info *cast;
9764
-
9865
+
9765
9866
  #ifdef SWIGRUNTIME_DEBUG
9766
9867
  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
9767
9868
  #endif
@@ -9788,7 +9889,7 @@ SWIG_InitializeModule(void *clientdata) {
9788
9889
  /* Insert casting types */
9789
9890
  cast = swig_module.cast_initial[i];
9790
9891
  while (cast->type) {
9791
-
9892
+
9792
9893
  /* Don't need to add information already in the list */
9793
9894
  ret = 0;
9794
9895
  #ifdef SWIGRUNTIME_DEBUG
@@ -9925,6 +10026,7 @@ SWIGEXPORT void Init_osr(void) {
9925
10026
  rb_define_const(mOsr, "SRS_PT_GOODE_HOMOLOSINE", SWIG_FromCharPtr("Goode_Homolosine"));
9926
10027
  rb_define_const(mOsr, "SRS_PT_IGH", SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
9927
10028
  rb_define_const(mOsr, "SRS_PT_GNOMONIC", SWIG_FromCharPtr("Gnomonic"));
10029
+ rb_define_const(mOsr, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER", SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
9928
10030
  rb_define_const(mOsr, "SRS_PT_HOTINE_OBLIQUE_MERCATOR", SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
9929
10031
  rb_define_const(mOsr, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN", SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
9930
10032
  rb_define_const(mOsr, "SRS_PT_LABORDE_OBLIQUE_MERCATOR", SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
@@ -10125,6 +10227,7 @@ SWIGEXPORT void Init_osr(void) {
10125
10227
  rb_define_method(SwigClassSpatialReference.klass, "import_from_xml", VALUEFUNC(_wrap_SpatialReference_import_from_xml), -1);
10126
10228
  rb_define_method(SwigClassSpatialReference.klass, "import_from_erm", VALUEFUNC(_wrap_SpatialReference_import_from_erm), -1);
10127
10229
  rb_define_method(SwigClassSpatialReference.klass, "import_from_micoord_sys", VALUEFUNC(_wrap_SpatialReference_import_from_micoord_sys), -1);
10230
+ rb_define_method(SwigClassSpatialReference.klass, "import_from_ozi", VALUEFUNC(_wrap_SpatialReference_import_from_ozi), -1);
10128
10231
  rb_define_method(SwigClassSpatialReference.klass, "export_to_wkt", VALUEFUNC(_wrap_SpatialReference_export_to_wkt), -1);
10129
10232
  rb_define_method(SwigClassSpatialReference.klass, "export_to_pretty_wkt", VALUEFUNC(_wrap_SpatialReference_export_to_pretty_wkt), -1);
10130
10233
  rb_define_method(SwigClassSpatialReference.klass, "export_to_proj4", VALUEFUNC(_wrap_SpatialReference_export_to_proj4), -1);
@@ -10153,5 +10256,6 @@ SWIGEXPORT void Init_osr(void) {
10153
10256
  SwigClassCoordinateTransformation.mark = 0;
10154
10257
  SwigClassCoordinateTransformation.destroy = (void (*)(void *)) free_OSRCoordinateTransformationShadow;
10155
10258
  SwigClassCoordinateTransformation.trackObjects = 0;
10259
+ rb_define_module_function(mOsr, "create_coordinate_transformation", VALUEFUNC(_wrap_create_coordinate_transformation), -1);
10156
10260
  }
10157
10261