OGR
ogr_spatialref.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: ogr_spatialref.h a5d470bdd8e89e3146e962ff5909fa30e2cb6cdf 2018-04-18 22:09:11 +0200 Even Rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: Classes for manipulating spatial reference systems in a
6  * platform non-specific manner.
7  * Author: Frank Warmerdam, warmerdam@pobox.com
8  *
9  ******************************************************************************
10  * Copyright (c) 1999, Les Technologies SoftMap Inc.
11  * Copyright (c) 2008-2013, Even Rouault <even dot rouault at mines-paris dot org>
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included
21  * in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  ****************************************************************************/
31 
32 #ifndef OGR_SPATIALREF_H_INCLUDED
33 #define OGR_SPATIALREF_H_INCLUDED
34 
35 #include "cpl_string.h"
36 #include "ogr_srs_api.h"
37 
38 #include <cstddef>
39 #include <map>
40 #include <vector>
41 
48 /************************************************************************/
49 /* OGR_SRSNode */
50 /************************************************************************/
51 
65 class CPL_DLL OGR_SRSNode
66 {
67  char *pszValue;
68 
69  OGR_SRSNode **papoChildNodes;
70  OGR_SRSNode *poParent;
71 
72  int nChildren;
73 
74  int NeedsQuoting() const;
75  OGRErr importFromWkt( const char **, int nRecLevel, int* pnNodes );
76 
77  public:
78  explicit OGR_SRSNode(const char * = nullptr);
79  ~OGR_SRSNode();
80 
84  int IsLeafNode() const { return nChildren == 0; }
85 
86  int GetChildCount() const { return nChildren; }
87  OGR_SRSNode *GetChild( int );
88  const OGR_SRSNode *GetChild( int ) const;
89 
90  OGR_SRSNode *GetNode( const char * );
91  const OGR_SRSNode *GetNode( const char * ) const;
92 
93  void InsertChild( OGR_SRSNode *, int );
94  void AddChild( OGR_SRSNode * );
95  int FindChild( const char * ) const;
96  void DestroyChild( int );
97  void ClearChildren();
98  void StripNodes( const char * );
99 
100  const char *GetValue() const { return pszValue; }
101  void SetValue( const char * );
102 
103  void MakeValueSafe();
104  OGRErr FixupOrdering();
105 
106  OGR_SRSNode *Clone() const;
107 
108  OGRErr importFromWkt( char ** )
110  CPL_WARN_DEPRECATED("Use importFromWkt(const char**)")
112  ;
113  OGRErr importFromWkt( const char ** );
114  OGRErr exportToWkt( char ** ) const;
115  OGRErr exportToPrettyWkt( char **, int = 1) const;
116 
117  OGRErr applyRemapper( const char *pszNode,
118  const char * const *papszSrcValues,
119  const char * const *papszDstValues,
120  int nStepSize = 1,
121  int bChildOfHit = FALSE );
122 };
123 
124 /************************************************************************/
125 /* OGRSpatialReference */
126 /************************************************************************/
127 
145 class CPL_DLL OGRSpatialReference
146 {
147  mutable double dfFromGreenwich;
148  mutable double dfToMeter;
149  mutable double dfToDegrees;
150 
151  OGR_SRSNode *poRoot;
152 
153  int nRefCount;
154  mutable int bNormInfoSet;
155 
156  static OGRErr Validate(OGR_SRSNode *poRoot);
157  static OGRErr ValidateAuthority(OGR_SRSNode *poRoot);
158  static OGRErr ValidateAxis(OGR_SRSNode *poRoot);
159  static OGRErr ValidateUnit(OGR_SRSNode *poRoot);
160  static OGRErr ValidateVertDatum(OGR_SRSNode *poRoot);
161  static OGRErr ValidateProjection( OGR_SRSNode* poRoot );
162  static int IsAliasFor( const char *, const char * );
163  void GetNormInfo() const;
164 
165  OGRErr importFromURNPart(const char* pszAuthority,
166  const char* pszCode,
167  const char* pszURN);
168 
169  OGRErr importFromEPSGAInternal(int nCode,
170  const char* pszSRSType);
171 
172  static const std::vector<OGRSpatialReference*>* GetSRSCache(
173  const char* pszSRSType,
174  const std::map<CPLString, int>*& poMapESRICSNameToCodeOut);
175 
176  public:
178  explicit OGRSpatialReference(const char * = nullptr);
179 
180  virtual ~OGRSpatialReference();
181 
182  static void DestroySpatialReference(OGRSpatialReference* poSRS);
183 
184  OGRSpatialReference &operator=(const OGRSpatialReference&);
185 
186  int Reference();
187  int Dereference();
188  int GetReferenceCount() const { return nRefCount; }
189  void Release();
190 
191  OGRSpatialReference *Clone() const;
192  OGRSpatialReference *CloneGeogCS() const;
193 
194  void dumpReadable();
195  OGRErr exportToWkt( char ** ) const;
196  OGRErr exportToPrettyWkt( char **, int = FALSE) const;
197  OGRErr exportToProj4( char ** ) const;
198  OGRErr exportToPCI( char **, char **, double ** ) const;
199  OGRErr exportToUSGS( long *, long *, double **, long * ) const;
200  OGRErr exportToXML( char **, const char * = nullptr ) const;
201  OGRErr exportToPanorama( long *, long *, long *, long *,
202  double * ) const;
203  OGRErr exportToERM( char *pszProj, char *pszDatum, char *pszUnits );
204  OGRErr exportToMICoordSys( char ** ) const;
205 
206 
207  OGRErr importFromWkt( char ** )
209  CPL_WARN_DEPRECATED("Use importFromWkt(const char**) or importFromWkt(const char*)")
211  ;
212 
213  OGRErr importFromWkt( const char ** );
214  OGRErr importFromWkt( const char* );
215  OGRErr importFromProj4( const char * );
216  OGRErr importFromEPSG( int );
217  OGRErr importFromEPSGA( int );
218  OGRErr importFromESRI( char ** );
219  OGRErr importFromPCI( const char *, const char * = nullptr,
220  double * = nullptr );
221 
222 #define USGS_ANGLE_DECIMALDEGREES 0
223 #define USGS_ANGLE_PACKEDDMS TRUE
224 #define USGS_ANGLE_RADIANS 2
225  OGRErr importFromUSGS( long iProjSys, long iZone,
226  double *padfPrjParams, long iDatum,
227  int nUSGSAngleFormat = USGS_ANGLE_PACKEDDMS );
228  OGRErr importFromPanorama( long, long, long, double* );
229  OGRErr importFromOzi( const char * const* papszLines );
230  OGRErr importFromWMSAUTO( const char *pszAutoDef );
231  OGRErr importFromXML( const char * );
232  OGRErr importFromDict( const char *pszDict, const char *pszCode );
233  OGRErr importFromURN( const char * );
234  OGRErr importFromCRSURL( const char * );
235  OGRErr importFromERM( const char *pszProj, const char *pszDatum,
236  const char *pszUnits );
237  OGRErr importFromUrl( const char * );
238  OGRErr importFromMICoordSys( const char * );
239 
240  OGRErr morphToESRI();
241  OGRErr morphFromESRI();
242 
243  OGRSpatialReference* convertToOtherProjection(
244  const char* pszTargetProjection,
245  const char* const* papszOptions = nullptr ) const;
246 
247  OGRErr Validate() const;
248  OGRErr StripCTParms( OGR_SRSNode * = nullptr );
249  OGRErr StripVertical();
250  OGRErr FixupOrdering();
251  OGRErr Fixup();
252 
253  int EPSGTreatsAsLatLong() const;
254  int EPSGTreatsAsNorthingEasting() const;
255  const char *GetAxis( const char *pszTargetKey, int iAxis,
256  OGRAxisOrientation *peOrientation ) const;
257  OGRErr SetAxes( const char *pszTargetKey,
258  const char *pszXAxisName,
259  OGRAxisOrientation eXAxisOrientation,
260  const char *pszYAxisName,
261  OGRAxisOrientation eYAxisOrientation );
262 
263  // Machinery for accessing parse nodes
264 
266  OGR_SRSNode *GetRoot() { return poRoot; }
268  const OGR_SRSNode *GetRoot() const { return poRoot; }
269  void SetRoot( OGR_SRSNode * );
270 
271  OGR_SRSNode *GetAttrNode(const char *);
272  const OGR_SRSNode *GetAttrNode(const char *) const;
273  const char *GetAttrValue(const char *, int = 0) const;
274 
275  OGRErr SetNode( const char *, const char * );
276  OGRErr SetNode( const char *, double );
277 
278  OGRErr SetLinearUnitsAndUpdateParameters( const char *pszName,
279  double dfInMeters );
280  OGRErr SetLinearUnits( const char *pszName, double dfInMeters );
281  OGRErr SetTargetLinearUnits( const char *pszTargetKey,
282  const char *pszName, double dfInMeters );
283 
284  double GetLinearUnits( char ** ) const CPL_WARN_DEPRECATED("Use GetLinearUnits(const char**) instead");
285  double GetLinearUnits( const char ** = nullptr ) const;
287  double GetLinearUnits( std::nullptr_t ) const
288  { return GetLinearUnits( static_cast<const char**>(nullptr) ); }
291  double GetTargetLinearUnits( const char *pszTargetKey,
292  char ** ppszRetName ) const
293  CPL_WARN_DEPRECATED("Use GetTargetLinearUnits(const char*, const char**)");
294  double GetTargetLinearUnits( const char *pszTargetKey,
295  const char ** ppszRetName = nullptr ) const;
297  double GetTargetLinearUnits( const char *pszTargetKey, std::nullptr_t ) const
298  { return GetTargetLinearUnits( pszTargetKey, static_cast<const char**>(nullptr) ); }
301  OGRErr SetAngularUnits( const char *pszName, double dfInRadians );
302  double GetAngularUnits( char ** ) const CPL_WARN_DEPRECATED("Use GetAngularUnits(const char**) instead");
303  double GetAngularUnits( const char ** = nullptr ) const;
305  double GetAngularUnits( std::nullptr_t ) const
306  { return GetAngularUnits( static_cast<const char**>(nullptr) ); }
309  double GetPrimeMeridian( char ** ) const CPL_WARN_DEPRECATED("Use GetPrimeMeridian(const char**) instead");
310  double GetPrimeMeridian( const char ** = nullptr ) const;
312  double GetPrimeMeridian( std::nullptr_t ) const
313  { return GetPrimeMeridian( static_cast<const char**>(nullptr) ); }
316  int IsGeographic() const;
317  int IsProjected() const;
318  int IsGeocentric() const;
319  int IsLocal() const;
320  int IsVertical() const;
321  int IsCompound() const;
322  int IsSameGeogCS( const OGRSpatialReference * ) const;
323  int IsSameGeogCS( const OGRSpatialReference *,
324  const char* const * papszOptions ) const;
325  int IsSameVertCS( const OGRSpatialReference * ) const;
326  int IsSame( const OGRSpatialReference * ) const;
327  int IsSame( const OGRSpatialReference *,
328  const char* const * papszOptions ) const;
329 
330  void Clear();
331  OGRErr SetLocalCS( const char * );
332  OGRErr SetProjCS( const char * );
333  OGRErr SetProjection( const char * );
334  OGRErr SetGeocCS( const char * pszGeocName );
335  OGRErr SetGeogCS( const char * pszGeogName,
336  const char * pszDatumName,
337  const char * pszEllipsoidName,
338  double dfSemiMajor, double dfInvFlattening,
339  const char * pszPMName = nullptr,
340  double dfPMOffset = 0.0,
341  const char * pszUnits = nullptr,
342  double dfConvertToRadians = 0.0 );
343  OGRErr SetWellKnownGeogCS( const char * );
344  OGRErr CopyGeogCSFrom( const OGRSpatialReference * poSrcSRS );
345  OGRErr SetVertCS( const char *pszVertCSName,
346  const char *pszVertDatumName,
347  int nVertDatumClass = 2005 );
348  OGRErr SetCompoundCS( const char *pszName,
349  const OGRSpatialReference *poHorizSRS,
350  const OGRSpatialReference *poVertSRS );
351 
352  OGRErr SetFromUserInput( const char * );
353 
354  OGRErr SetTOWGS84( double, double, double,
355  double = 0.0, double = 0.0, double = 0.0,
356  double = 0.0 );
357  OGRErr GetTOWGS84( double *padfCoef, int nCoeff = 7 ) const;
358 
359  double GetSemiMajor( OGRErr * = nullptr ) const;
360  double GetSemiMinor( OGRErr * = nullptr ) const;
361  double GetInvFlattening( OGRErr * = nullptr ) const;
362  double GetEccentricity() const;
363  double GetSquaredEccentricity() const;
364 
365  OGRErr SetAuthority( const char * pszTargetKey,
366  const char * pszAuthority,
367  int nCode );
368 
369  OGRErr AutoIdentifyEPSG();
370  OGRSpatialReferenceH* FindMatches( char** papszOptions,
371  int* pnEntries,
372  int** ppanMatchConfidence ) const;
373 
374  int GetEPSGGeogCS() const;
375 
376  const char *GetAuthorityCode( const char * pszTargetKey ) const;
377  const char *GetAuthorityName( const char * pszTargetKey ) const;
378 
379  const char *GetExtension( const char *pszTargetKey,
380  const char *pszName,
381  const char *pszDefault = nullptr ) const;
382  OGRErr SetExtension( const char *pszTargetKey,
383  const char *pszName,
384  const char *pszValue );
385 
386  int FindProjParm( const char *pszParameter,
387  const OGR_SRSNode *poPROJCS=nullptr ) const;
388  OGRErr SetProjParm( const char *, double );
389  double GetProjParm( const char *, double =0.0, OGRErr* = nullptr ) const;
390 
391  OGRErr SetNormProjParm( const char *, double );
392  double GetNormProjParm( const char *, double=0.0, OGRErr* =nullptr)const;
393 
394  static int IsAngularParameter( const char * );
395  static int IsLongitudeParameter( const char * );
396  static int IsLinearParameter( const char * );
397 
399  OGRErr SetACEA( double dfStdP1, double dfStdP2,
400  double dfCenterLat, double dfCenterLong,
401  double dfFalseEasting, double dfFalseNorthing );
402 
404  OGRErr SetAE( double dfCenterLat, double dfCenterLong,
405  double dfFalseEasting, double dfFalseNorthing );
406 
408  OGRErr SetBonne( double dfStdP1, double dfCentralMeridian,
409  double dfFalseEasting, double dfFalseNorthing );
410 
412  OGRErr SetCEA( double dfStdP1, double dfCentralMeridian,
413  double dfFalseEasting, double dfFalseNorthing );
414 
416  OGRErr SetCS( double dfCenterLat, double dfCenterLong,
417  double dfFalseEasting, double dfFalseNorthing );
418 
420  OGRErr SetEC( double dfStdP1, double dfStdP2,
421  double dfCenterLat, double dfCenterLong,
422  double dfFalseEasting, double dfFalseNorthing );
423 
425  OGRErr SetEckert( int nVariation, double dfCentralMeridian,
426  double dfFalseEasting, double dfFalseNorthing );
427 
429  OGRErr SetEckertIV( double dfCentralMeridian,
430  double dfFalseEasting, double dfFalseNorthing );
431 
433  OGRErr SetEckertVI( double dfCentralMeridian,
434  double dfFalseEasting, double dfFalseNorthing );
435 
437  OGRErr SetEquirectangular(double dfCenterLat, double dfCenterLong,
438  double dfFalseEasting, double dfFalseNorthing );
440  OGRErr SetEquirectangular2( double dfCenterLat, double dfCenterLong,
441  double dfPseudoStdParallel1,
442  double dfFalseEasting, double dfFalseNorthing );
443 
445  OGRErr SetGEOS( double dfCentralMeridian, double dfSatelliteHeight,
446  double dfFalseEasting, double dfFalseNorthing );
447 
449  OGRErr SetGH( double dfCentralMeridian,
450  double dfFalseEasting, double dfFalseNorthing );
451 
453  OGRErr SetIGH();
454 
456  OGRErr SetGS( double dfCentralMeridian,
457  double dfFalseEasting, double dfFalseNorthing );
458 
460  OGRErr SetGaussSchreiberTMercator(double dfCenterLat, double dfCenterLong,
461  double dfScale,
462  double dfFalseEasting, double dfFalseNorthing );
463 
465  OGRErr SetGnomonic(double dfCenterLat, double dfCenterLong,
466  double dfFalseEasting, double dfFalseNorthing );
467 
469  OGRErr SetHOM( double dfCenterLat, double dfCenterLong,
470  double dfAzimuth, double dfRectToSkew,
471  double dfScale,
472  double dfFalseEasting, double dfFalseNorthing );
473 
475  OGRErr SetHOM2PNO( double dfCenterLat,
476  double dfLat1, double dfLong1,
477  double dfLat2, double dfLong2,
478  double dfScale,
479  double dfFalseEasting, double dfFalseNorthing );
480 
481 #ifdef undef
482 
483  OGRErr SetOM( double dfCenterLat, double dfCenterLong,
484  double dfAzimuth, double dfRectToSkew,
485  double dfScale,
486  double dfFalseEasting, double dfFalseNorthing );
487 #endif
488 
490  OGRErr SetHOMAC( double dfCenterLat, double dfCenterLong,
491  double dfAzimuth, double dfRectToSkew,
492  double dfScale,
493  double dfFalseEasting, double dfFalseNorthing );
494 
496  OGRErr SetIWMPolyconic( double dfLat1, double dfLat2,
497  double dfCenterLong,
498  double dfFalseEasting,
499  double dfFalseNorthing );
500 
502  OGRErr SetKrovak( double dfCenterLat, double dfCenterLong,
503  double dfAzimuth, double dfPseudoStdParallelLat,
504  double dfScale,
505  double dfFalseEasting, double dfFalseNorthing );
506 
508  OGRErr SetLAEA( double dfCenterLat, double dfCenterLong,
509  double dfFalseEasting, double dfFalseNorthing );
510 
512  OGRErr SetLCC( double dfStdP1, double dfStdP2,
513  double dfCenterLat, double dfCenterLong,
514  double dfFalseEasting, double dfFalseNorthing );
515 
517  OGRErr SetLCC1SP( double dfCenterLat, double dfCenterLong,
518  double dfScale,
519  double dfFalseEasting, double dfFalseNorthing );
520 
522  OGRErr SetLCCB( double dfStdP1, double dfStdP2,
523  double dfCenterLat, double dfCenterLong,
524  double dfFalseEasting, double dfFalseNorthing );
525 
527  OGRErr SetMC( double dfCenterLat, double dfCenterLong,
528  double dfFalseEasting, double dfFalseNorthing );
529 
531  OGRErr SetMercator( double dfCenterLat, double dfCenterLong,
532  double dfScale,
533  double dfFalseEasting, double dfFalseNorthing );
534 
536  OGRErr SetMercator2SP( double dfStdP1,
537  double dfCenterLat, double dfCenterLong,
538  double dfFalseEasting, double dfFalseNorthing );
539 
541  OGRErr SetMollweide( double dfCentralMeridian,
542  double dfFalseEasting, double dfFalseNorthing );
543 
545  OGRErr SetNZMG( double dfCenterLat, double dfCenterLong,
546  double dfFalseEasting, double dfFalseNorthing );
547 
549  OGRErr SetOS( double dfOriginLat, double dfCMeridian,
550  double dfScale,
551  double dfFalseEasting,double dfFalseNorthing);
552 
554  OGRErr SetOrthographic( double dfCenterLat, double dfCenterLong,
555  double dfFalseEasting,double dfFalseNorthing);
556 
558  OGRErr SetPolyconic( double dfCenterLat, double dfCenterLong,
559  double dfFalseEasting, double dfFalseNorthing );
560 
562  OGRErr SetPS( double dfCenterLat, double dfCenterLong,
563  double dfScale,
564  double dfFalseEasting, double dfFalseNorthing);
565 
567  OGRErr SetRobinson( double dfCenterLong,
568  double dfFalseEasting, double dfFalseNorthing );
569 
571  OGRErr SetSinusoidal( double dfCenterLong,
572  double dfFalseEasting, double dfFalseNorthing );
573 
575  OGRErr SetStereographic( double dfCenterLat, double dfCenterLong,
576  double dfScale,
577  double dfFalseEasting,double dfFalseNorthing);
578 
580  OGRErr SetSOC( double dfLatitudeOfOrigin, double dfCentralMeridian,
581  double dfFalseEasting, double dfFalseNorthing );
582 
584  OGRErr SetTM( double dfCenterLat, double dfCenterLong,
585  double dfScale,
586  double dfFalseEasting, double dfFalseNorthing );
587 
589  OGRErr SetTMVariant( const char *pszVariantName,
590  double dfCenterLat, double dfCenterLong,
591  double dfScale,
592  double dfFalseEasting, double dfFalseNorthing );
593 
595  OGRErr SetTMG( double dfCenterLat, double dfCenterLong,
596  double dfFalseEasting, double dfFalseNorthing );
597 
599  OGRErr SetTMSO( double dfCenterLat, double dfCenterLong,
600  double dfScale,
601  double dfFalseEasting, double dfFalseNorthing );
602 
604  OGRErr SetTPED( double dfLat1, double dfLong1,
605  double dfLat2, double dfLong2,
606  double dfFalseEasting, double dfFalseNorthing );
607 
609  OGRErr SetVDG( double dfCenterLong,
610  double dfFalseEasting, double dfFalseNorthing );
611 
613  OGRErr SetUTM( int nZone, int bNorth = TRUE );
614  int GetUTMZone( int *pbNorth = nullptr ) const;
615 
617  OGRErr SetWagner( int nVariation, double dfCenterLat,
618  double dfFalseEasting, double dfFalseNorthing );
619 
621  OGRErr SetQSC(double dfCenterLat, double dfCenterLong);
622 
624  OGRErr SetSCH( double dfPegLat, double dfPegLong,
625  double dfPegHeading, double dfPegHgt);
627  OGRErr SetStatePlane( int nZone, int bNAD83 = TRUE,
628  const char *pszOverrideUnitName = nullptr,
629  double dfOverrideUnit = 0.0 );
630 
632  OGRErr ImportFromESRIStatePlaneWKT(
633  int nCode, const char* pszDatumName, const char* pszUnitsName,
634  int nPCSCode, const char* pszCSName = nullptr );
635 
637  OGRErr ImportFromESRIWisconsinWKT(
638  const char* pszPrjName, double dfCentralMeridian, double dfLatOfOrigin,
639  const char* pszUnitsName, const char* pszCSName = nullptr );
640 
641  static OGRSpatialReference* GetWGS84SRS();
642 
647  { return reinterpret_cast<OGRSpatialReferenceH>(poSRS); }
648 
653  { return reinterpret_cast<OGRSpatialReference*>(hSRS); }
654 
655 };
656 
657 /************************************************************************/
658 /* OGRCoordinateTransformation */
659 /* */
660 /* This is really just used as a base class for a private */
661 /* implementation. */
662 /************************************************************************/
663 
674 {
675 public:
676  virtual ~OGRCoordinateTransformation() {}
677 
678  static void DestroyCT(OGRCoordinateTransformation* poCT);
679 
680  // From CT_CoordinateTransformation
681 
683  virtual OGRSpatialReference *GetSourceCS() = 0;
684 
686  virtual OGRSpatialReference *GetTargetCS() = 0;
687 
689  virtual bool GetEmitErrors() { return false; }
690 
692  virtual void SetEmitErrors(bool /*bEmitErrors*/) {}
693 
694  // From CT_MathTransform
695 
711  virtual int Transform( int nCount,
712  double *x, double *y, double *z = nullptr ) = 0;
713 
729  virtual int TransformEx( int nCount,
730  double *x, double *y, double *z = nullptr,
731  int *pabSuccess = nullptr ) = 0;
732 
737  { return reinterpret_cast<OGRCoordinateTransformationH>(poCT); }
738 
743  { return reinterpret_cast<OGRCoordinateTransformation*>(hCT); }
744 };
745 
748  OGRSpatialReference *poTarget );
749 
750 #endif /* ndef OGR_SPATIALREF_H_INCLUDED */
int GetReferenceCount() const
Fetch current reference count.
Definition: ogr_spatialref.h:188
int IsLeafNode() const
Definition: ogr_spatialref.h:84
static OGRCoordinateTransformationH ToHandle(OGRCoordinateTransformation *poCT)
Definition: ogr_spatialref.h:736
virtual void SetEmitErrors(bool)
Definition: ogr_spatialref.h:692
OGRCoordinateTransformation * OGRCreateCoordinateTransformation(OGRSpatialReference *poSource, OGRSpatialReference *poTarget)
Definition: ogrct.cpp:493
Definition: ogr_spatialref.h:65
const char * GetValue() const
Definition: ogr_spatialref.h:100
int GetChildCount() const
Definition: ogr_spatialref.h:86
void * OGRCoordinateTransformationH
Definition: ogr_api.h:76
#define USGS_ANGLE_PACKEDDMS
Definition: ogr_spatialref.h:223
OGR_SRSNode * GetRoot()
Return root node.
Definition: ogr_spatialref.h:266
void * OGRSpatialReferenceH
Definition: ogr_api.h:74
OGRAxisOrientation
Definition: ogr_srs_api.h:48
virtual bool GetEmitErrors()
Definition: ogr_spatialref.h:689
Definition: ogr_spatialref.h:145
static OGRSpatialReferenceH ToHandle(OGRSpatialReference *poSRS)
Definition: ogr_spatialref.h:646
static OGRSpatialReference * FromHandle(OGRSpatialReferenceH hSRS)
Definition: ogr_spatialref.h:652
static OGRCoordinateTransformation * FromHandle(OGRCoordinateTransformationH hCT)
Definition: ogr_spatialref.h:742
Definition: ogr_spatialref.h:673
const OGR_SRSNode * GetRoot() const
Return root node.
Definition: ogr_spatialref.h:268
int OGRErr
Definition: ogr_core.h:290

Generated for GDAL by doxygen 1.8.14.