File: SpatialReference.cs

package info (click to toggle)
gdal 1.10.1%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 84,320 kB
  • ctags: 74,726
  • sloc: cpp: 677,199; ansic: 162,820; python: 13,816; cs: 11,163; sh: 10,446; java: 5,279; perl: 4,429; php: 2,971; xml: 1,500; yacc: 934; makefile: 494; sql: 112
file content (757 lines) | stat: -rw-r--r-- 32,520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.7
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

namespace OSGeo.OGR {

using System;
using System.Runtime.InteropServices;

public class SpatialReference : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;
  protected object swigParentRef;
  
  protected static object ThisOwn_true() { return null; }
  protected object ThisOwn_false() { return this; }

  public SpatialReference(IntPtr cPtr, bool cMemoryOwn, object parent) {
    swigCMemOwn = cMemoryOwn;
    swigParentRef = parent;
    swigCPtr = new HandleRef(this, cPtr);
  }

  public static HandleRef getCPtr(SpatialReference obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }
  public static HandleRef getCPtrAndDisown(SpatialReference obj, object parent) {
    if (obj != null)
    {
      obj.swigCMemOwn = false;
      obj.swigParentRef = parent;
      return obj.swigCPtr;
    }
    else
    {
      return new HandleRef(null, IntPtr.Zero);
    }
  }
  public static HandleRef getCPtrAndSetReference(SpatialReference obj, object parent) {
    if (obj != null)
    {
      obj.swigParentRef = parent;
      return obj.swigCPtr;
    }
    else
    {
      return new HandleRef(null, IntPtr.Zero);
    }
  }

  ~SpatialReference() {
    Dispose();
  }

  public virtual void Dispose() {
  lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        OsrPINVOKE.delete_SpatialReference(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      swigParentRef = null;
      GC.SuppressFinalize(this);
    }
  }

  public SpatialReference(string wkt) : this(OsrPINVOKE.new_SpatialReference(wkt), true, null) {
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
  }

  public string __str__() {
    string ret = OsrPINVOKE.SpatialReference___str__(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsSame(SpatialReference rhs) {
    int ret = OsrPINVOKE.SpatialReference_IsSame(swigCPtr, SpatialReference.getCPtr(rhs));
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsSameGeogCS(SpatialReference rhs) {
    int ret = OsrPINVOKE.SpatialReference_IsSameGeogCS(swigCPtr, SpatialReference.getCPtr(rhs));
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsSameVertCS(SpatialReference rhs) {
    int ret = OsrPINVOKE.SpatialReference_IsSameVertCS(swigCPtr, SpatialReference.getCPtr(rhs));
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsGeographic() {
    int ret = OsrPINVOKE.SpatialReference_IsGeographic(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsProjected() {
    int ret = OsrPINVOKE.SpatialReference_IsProjected(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsCompound() {
    int ret = OsrPINVOKE.SpatialReference_IsCompound(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsGeocentric() {
    int ret = OsrPINVOKE.SpatialReference_IsGeocentric(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsLocal() {
    int ret = OsrPINVOKE.SpatialReference_IsLocal(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int IsVertical() {
    int ret = OsrPINVOKE.SpatialReference_IsVertical(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int EPSGTreatsAsLatLong() {
    int ret = OsrPINVOKE.SpatialReference_EPSGTreatsAsLatLong(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetAuthority(string pszTargetKey, string pszAuthority, int nCode) {
    int ret = OsrPINVOKE.SpatialReference_SetAuthority(swigCPtr, pszTargetKey, pszAuthority, nCode);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetAttrValue(string name, int child) {
    string ret = OsrPINVOKE.SpatialReference_GetAttrValue(swigCPtr, name, child);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetAttrValue(string name, string value) {
    int ret = OsrPINVOKE.SpatialReference_SetAttrValue(swigCPtr, name, value);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetAngularUnits(string name, double to_radians) {
    int ret = OsrPINVOKE.SpatialReference_SetAngularUnits(swigCPtr, name, to_radians);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetAngularUnits() {
    double ret = OsrPINVOKE.SpatialReference_GetAngularUnits(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetTargetLinearUnits(string target, string name, double to_meters) {
    int ret = OsrPINVOKE.SpatialReference_SetTargetLinearUnits(swigCPtr, target, name, to_meters);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLinearUnits(string name, double to_meters) {
    int ret = OsrPINVOKE.SpatialReference_SetLinearUnits(swigCPtr, name, to_meters);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLinearUnitsAndUpdateParameters(string name, double to_meters) {
    int ret = OsrPINVOKE.SpatialReference_SetLinearUnitsAndUpdateParameters(swigCPtr, name, to_meters);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetLinearUnits() {
    double ret = OsrPINVOKE.SpatialReference_GetLinearUnits(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetLinearUnitsName() {
    string ret = OsrPINVOKE.SpatialReference_GetLinearUnitsName(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetAuthorityCode(string target_key) {
    string ret = OsrPINVOKE.SpatialReference_GetAuthorityCode(swigCPtr, target_key);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public string GetAuthorityName(string target_key) {
    string ret = OsrPINVOKE.SpatialReference_GetAuthorityName(swigCPtr, target_key);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetUTM(int zone, int north) {
    int ret = OsrPINVOKE.SpatialReference_SetUTM(swigCPtr, zone, north);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int GetUTMZone() {
    int ret = OsrPINVOKE.SpatialReference_GetUTMZone(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetStatePlane(int zone, int is_nad83, string unitsname, double units) {
    int ret = OsrPINVOKE.SpatialReference_SetStatePlane(swigCPtr, zone, is_nad83, unitsname, units);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int AutoIdentifyEPSG() {
    int ret = OsrPINVOKE.SpatialReference_AutoIdentifyEPSG(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetProjection(string arg) {
    int ret = OsrPINVOKE.SpatialReference_SetProjection(swigCPtr, arg);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetProjParm(string name, double val) {
    int ret = OsrPINVOKE.SpatialReference_SetProjParm(swigCPtr, name, val);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetProjParm(string name, double default_val) {
    double ret = OsrPINVOKE.SpatialReference_GetProjParm(swigCPtr, name, default_val);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetNormProjParm(string name, double val) {
    int ret = OsrPINVOKE.SpatialReference_SetNormProjParm(swigCPtr, name, val);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetNormProjParm(string name, double default_val) {
    double ret = OsrPINVOKE.SpatialReference_GetNormProjParm(swigCPtr, name, default_val);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetSemiMajor() {
    double ret = OsrPINVOKE.SpatialReference_GetSemiMajor(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetSemiMinor() {
    double ret = OsrPINVOKE.SpatialReference_GetSemiMinor(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double GetInvFlattening() {
    double ret = OsrPINVOKE.SpatialReference_GetInvFlattening(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetACEA(double stdp1, double stdp2, double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetACEA(swigCPtr, stdp1, stdp2, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetAE(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetAE(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetBonne(double stdp, double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetBonne(swigCPtr, stdp, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetCEA(double stdp1, double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetCEA(swigCPtr, stdp1, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetCS(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetCS(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetEC(double stdp1, double stdp2, double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetEC(swigCPtr, stdp1, stdp2, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetEckertIV(double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetEckertIV(swigCPtr, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetEckertVI(double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetEckertVI(swigCPtr, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetEquirectangular(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetEquirectangular(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetEquirectangular2(double clat, double clong, double pseudostdparallellat, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetEquirectangular2(swigCPtr, clat, clong, pseudostdparallellat, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGaussSchreiberTMercator(double clat, double clong, double sc, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetGaussSchreiberTMercator(swigCPtr, clat, clong, sc, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGS(double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetGS(swigCPtr, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGH(double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetGH(swigCPtr, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetIGH() {
    int ret = OsrPINVOKE.SpatialReference_SetIGH(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGEOS(double cm, double satelliteheight, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetGEOS(swigCPtr, cm, satelliteheight, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGnomonic(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetGnomonic(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetHOM(double clat, double clong, double azimuth, double recttoskew, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetHOM(swigCPtr, clat, clong, azimuth, recttoskew, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetHOM2PNO(double clat, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetHOM2PNO(swigCPtr, clat, dfLat1, dfLong1, dfLat2, dfLong2, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetKrovak(double clat, double clong, double azimuth, double pseudostdparallellat, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetKrovak(swigCPtr, clat, clong, azimuth, pseudostdparallellat, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLAEA(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetLAEA(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLCC(double stdp1, double stdp2, double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetLCC(swigCPtr, stdp1, stdp2, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLCC1SP(double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetLCC1SP(swigCPtr, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLCCB(double stdp1, double stdp2, double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetLCCB(swigCPtr, stdp1, stdp2, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetMC(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetMC(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetMercator(double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetMercator(swigCPtr, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetMollweide(double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetMollweide(swigCPtr, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetNZMG(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetNZMG(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetOS(double dfOriginLat, double dfCMeridian, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetOS(swigCPtr, dfOriginLat, dfCMeridian, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetOrthographic(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetOrthographic(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetPolyconic(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetPolyconic(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetPS(double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetPS(swigCPtr, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetRobinson(double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetRobinson(swigCPtr, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetSinusoidal(double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetSinusoidal(swigCPtr, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetStereographic(double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetStereographic(swigCPtr, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetSOC(double latitudeoforigin, double cm, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetSOC(swigCPtr, latitudeoforigin, cm, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetTM(double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetTM(swigCPtr, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetTMVariant(string pszVariantName, double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetTMVariant(swigCPtr, pszVariantName, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetTMG(double clat, double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetTMG(swigCPtr, clat, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetTMSO(double clat, double clong, double scale, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetTMSO(swigCPtr, clat, clong, scale, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetVDG(double clong, double fe, double fn) {
    int ret = OsrPINVOKE.SpatialReference_SetVDG(swigCPtr, clong, fe, fn);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetWellKnownGeogCS(string name) {
    int ret = OsrPINVOKE.SpatialReference_SetWellKnownGeogCS(swigCPtr, name);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetFromUserInput(string name) {
    int ret = OsrPINVOKE.SpatialReference_SetFromUserInput(swigCPtr, name);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int CopyGeogCSFrom(SpatialReference rhs) {
    int ret = OsrPINVOKE.SpatialReference_CopyGeogCSFrom(swigCPtr, SpatialReference.getCPtr(rhs));
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetTOWGS84(double p1, double p2, double p3, double p4, double p5, double p6, double p7) {
    int ret = OsrPINVOKE.SpatialReference_SetTOWGS84(swigCPtr, p1, p2, p3, p4, p5, p6, p7);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int GetTOWGS84(double[] argout) {
    int ret = OsrPINVOKE.SpatialReference_GetTOWGS84(swigCPtr, argout);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetLocalCS(string pszName) {
    int ret = OsrPINVOKE.SpatialReference_SetLocalCS(swigCPtr, pszName);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGeogCS(string pszGeogName, string pszDatumName, string pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, string pszPMName, double dfPMOffset, string pszUnits, double dfConvertToRadians) {
    int ret = OsrPINVOKE.SpatialReference_SetGeogCS(swigCPtr, pszGeogName, pszDatumName, pszEllipsoidName, dfSemiMajor, dfInvFlattening, pszPMName, dfPMOffset, pszUnits, dfConvertToRadians);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetProjCS(string name) {
    int ret = OsrPINVOKE.SpatialReference_SetProjCS(swigCPtr, name);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetGeocCS(string name) {
    int ret = OsrPINVOKE.SpatialReference_SetGeocCS(swigCPtr, name);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetVertCS(string VertCSName, string VertDatumName, int VertDatumType) {
    int ret = OsrPINVOKE.SpatialReference_SetVertCS(swigCPtr, VertCSName, VertDatumName, VertDatumType);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int SetCompoundCS(string name, SpatialReference horizcs, SpatialReference vertcs) {
    int ret = OsrPINVOKE.SpatialReference_SetCompoundCS(swigCPtr, name, SpatialReference.getCPtr(horizcs), SpatialReference.getCPtr(vertcs));
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromWkt(ref string ppszInput) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromWkt(swigCPtr, ref ppszInput);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromProj4(string ppszInput) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromProj4(swigCPtr, ppszInput);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromUrl(string url) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromUrl(swigCPtr, url);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromESRI(string[] ppszInput) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromESRI(swigCPtr, (ppszInput != null)? new OsrPINVOKE.StringListMarshal(ppszInput)._ar : null);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromEPSG(int arg) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromEPSG(swigCPtr, arg);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromEPSGA(int arg) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromEPSGA(swigCPtr, arg);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromPCI(string proj, string units, double[] argin) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromPCI(swigCPtr, proj, units, argin);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromUSGS(int proj_code, int zone, double[] argin, int datum_code) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromUSGS(swigCPtr, proj_code, zone, argin, datum_code);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromXML(string xmlString) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromXML(swigCPtr, xmlString);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromERM(string proj, string datum, string units) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromERM(swigCPtr, proj, datum, units);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromMICoordSys(string pszCoordSys) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromMICoordSys(swigCPtr, pszCoordSys);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ImportFromOzi(string datum, string proj, string projParms) {
    int ret = OsrPINVOKE.SpatialReference_ImportFromOzi(swigCPtr, datum, proj, projParms);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToWkt(out string argout) {
    int ret = OsrPINVOKE.SpatialReference_ExportToWkt(swigCPtr, out argout);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToPrettyWkt(out string argout, int simplify) {
    int ret = OsrPINVOKE.SpatialReference_ExportToPrettyWkt(swigCPtr, out argout, simplify);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToProj4(out string argout) {
    int ret = OsrPINVOKE.SpatialReference_ExportToProj4(swigCPtr, out argout);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToPCI(out string proj, out string units) {
    int ret = OsrPINVOKE.SpatialReference_ExportToPCI(swigCPtr, out proj, out units);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToUSGS(out int code, out int zone, out int datum) {
    int ret = OsrPINVOKE.SpatialReference_ExportToUSGS(swigCPtr, out code, out zone, out datum);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToXML(out string argout, string dialect) {
    int ret = OsrPINVOKE.SpatialReference_ExportToXML(swigCPtr, out argout, dialect);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int ExportToMICoordSys(out string argout) {
    int ret = OsrPINVOKE.SpatialReference_ExportToMICoordSys(swigCPtr, out argout);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public SpatialReference CloneGeogCS() {
    IntPtr cPtr = OsrPINVOKE.SpatialReference_CloneGeogCS(swigCPtr);
    SpatialReference ret = (cPtr == IntPtr.Zero) ? null : new SpatialReference(cPtr, true, ThisOwn_true());
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public SpatialReference Clone() {
    IntPtr cPtr = OsrPINVOKE.SpatialReference_Clone(swigCPtr);
    SpatialReference ret = (cPtr == IntPtr.Zero) ? null : new SpatialReference(cPtr, true, ThisOwn_true());
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int Validate() {
    int ret = OsrPINVOKE.SpatialReference_Validate(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int StripCTParms() {
    int ret = OsrPINVOKE.SpatialReference_StripCTParms(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int FixupOrdering() {
    int ret = OsrPINVOKE.SpatialReference_FixupOrdering(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int Fixup() {
    int ret = OsrPINVOKE.SpatialReference_Fixup(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int MorphToESRI() {
    int ret = OsrPINVOKE.SpatialReference_MorphToESRI(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public int MorphFromESRI() {
    int ret = OsrPINVOKE.SpatialReference_MorphFromESRI(swigCPtr);
    if (OsrPINVOKE.SWIGPendingException.Pending) throw OsrPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}