32 #ifndef _OGR_SPATIALREF_H_INCLUDED 33 #define _OGR_SPATIALREF_H_INCLUDED 69 int NeedsQuoting()
const;
70 OGRErr importFromWkt(
char **,
int nRecLevel,
int* pnNodes );
76 int IsLeafNode()
const {
return nChildren == 0; }
87 int FindChild(
const char * )
const;
88 void DestroyChild(
int );
90 void StripNodes(
const char * );
92 const char *
GetValue()
const {
return pszValue; }
93 void SetValue(
const char * );
96 OGRErr FixupOrdering();
100 OGRErr importFromWkt(
char ** );
101 OGRErr exportToWkt(
char ** )
const;
102 OGRErr exportToPrettyWkt(
char **,
int = 1)
const;
104 OGRErr applyRemapper(
const char *pszNode,
105 char **papszSrcValues,
106 char **papszDstValues,
108 int bChildOfHit = FALSE );
131 double dfFromGreenwich;
141 static OGRErr ValidateAuthority(
OGR_SRSNode *poRoot);
144 static OGRErr ValidateVertDatum(
OGR_SRSNode *poRoot);
145 static OGRErr ValidateProjection(
OGR_SRSNode* poRoot );
146 static int IsAliasFor(
const char *,
const char * );
147 void GetNormInfo()
const;
149 OGRErr importFromURNPart(
const char* pszAuthority,
171 OGRErr exportToWkt(
char ** )
const;
172 OGRErr exportToPrettyWkt(
char **,
int = FALSE)
const;
173 OGRErr exportToProj4(
char ** )
const;
174 OGRErr exportToPCI(
char **,
char **,
double ** )
const;
175 OGRErr exportToUSGS(
long *,
long *,
double **,
long * )
const;
176 OGRErr exportToXML(
char **,
const char * = NULL )
const;
177 OGRErr exportToPanorama(
long *,
long *,
long *,
long *,
179 OGRErr exportToERM(
char *pszProj,
char *pszDatum,
char *pszUnits );
180 OGRErr exportToMICoordSys(
char ** )
const;
182 OGRErr importFromWkt(
char ** );
183 OGRErr importFromProj4(
const char * );
184 OGRErr importFromEPSG(
int );
185 OGRErr importFromEPSGA(
int );
186 OGRErr importFromESRI(
char ** );
187 OGRErr importFromPCI(
const char *,
const char * = NULL,
189 #define USGS_ANGLE_DECIMALDEGREES 0 190 #define USGS_ANGLE_PACKEDDMS TRUE 191 #define USGS_ANGLE_RADIANS 2 192 OGRErr importFromUSGS(
long iProjSys,
long iZone,
193 double *padfPrjParams,
long iDatum,
194 int nUSGSAngleFormat = USGS_ANGLE_PACKEDDMS );
195 OGRErr importFromPanorama(
long,
long,
long,
double* );
196 OGRErr importFromOzi(
const char *,
const char *,
const char * );
197 OGRErr importFromOzi(
const char *
const* papszLines );
198 OGRErr importFromWMSAUTO(
const char *pszAutoDef );
199 OGRErr importFromXML(
const char * );
200 OGRErr importFromDict(
const char *pszDict,
const char *pszCode );
201 OGRErr importFromURN(
const char * );
202 OGRErr importFromCRSURL(
const char * );
203 OGRErr importFromERM(
const char *pszProj,
const char *pszDatum,
204 const char *pszUnits );
205 OGRErr importFromUrl(
const char * );
206 OGRErr importFromMICoordSys(
const char * );
208 OGRErr morphToESRI();
209 OGRErr morphFromESRI();
213 OGRErr StripVertical();
214 OGRErr FixupOrdering();
217 int EPSGTreatsAsLatLong();
218 int EPSGTreatsAsNorthingEasting();
219 const char *GetAxis(
const char *pszTargetKey,
int iAxis,
220 OGRAxisOrientation *peOrientation )
const;
221 OGRErr SetAxes(
const char *pszTargetKey,
222 const char *pszXAxisName,
223 OGRAxisOrientation eXAxisOrientation,
224 const char *pszYAxisName,
225 OGRAxisOrientation eYAxisOrientation );
229 const OGR_SRSNode *GetRoot()
const {
return poRoot; }
233 const OGR_SRSNode *GetAttrNode(
const char *)
const;
234 const char *GetAttrValue(
const char *,
int = 0)
const;
236 OGRErr SetNode(
const char *,
const char * );
237 OGRErr SetNode(
const char *,
double );
239 OGRErr SetLinearUnitsAndUpdateParameters(
const char *pszName,
241 OGRErr SetLinearUnits(
const char *pszName,
double dfInMeters );
242 OGRErr SetTargetLinearUnits(
const char *pszTargetKey,
243 const char *pszName,
double dfInMeters );
244 double GetLinearUnits(
char ** = NULL )
const;
245 double GetTargetLinearUnits(
const char *pszTargetKey,
246 char ** ppszRetName = NULL )
const;
248 OGRErr SetAngularUnits(
const char *pszName,
double dfInRadians );
249 double GetAngularUnits(
char ** = NULL )
const;
251 double GetPrimeMeridian(
char ** = NULL )
const;
253 int IsGeographic()
const;
254 int IsProjected()
const;
255 int IsGeocentric()
const;
257 int IsVertical()
const;
258 int IsCompound()
const;
264 OGRErr SetLocalCS(
const char * );
265 OGRErr SetProjCS(
const char * );
266 OGRErr SetProjection(
const char * );
267 OGRErr SetGeocCS(
const char * pszGeocName );
268 OGRErr SetGeogCS(
const char * pszGeogName,
269 const char * pszDatumName,
270 const char * pszEllipsoidName,
271 double dfSemiMajor,
double dfInvFlattening,
272 const char * pszPMName = NULL,
273 double dfPMOffset = 0.0,
274 const char * pszUnits = NULL,
275 double dfConvertToRadians = 0.0 );
276 OGRErr SetWellKnownGeogCS(
const char * );
278 OGRErr SetVertCS(
const char *pszVertCSName,
279 const char *pszVertDatumName,
280 int nVertDatumClass = 2005 );
281 OGRErr SetCompoundCS(
const char *pszName,
285 OGRErr SetFromUserInput(
const char * );
287 OGRErr SetTOWGS84(
double,
double,
double,
288 double = 0.0,
double = 0.0,
double = 0.0,
290 OGRErr GetTOWGS84(
double *padfCoef,
int nCoeff = 7 )
const;
292 double GetSemiMajor( OGRErr * = NULL )
const;
293 double GetSemiMinor( OGRErr * = NULL )
const;
294 double GetInvFlattening( OGRErr * = NULL )
const;
296 OGRErr SetAuthority(
const char * pszTargetKey,
297 const char * pszAuthority,
300 OGRErr AutoIdentifyEPSG();
303 const char *GetAuthorityCode(
const char * pszTargetKey )
const;
304 const char *GetAuthorityName(
const char * pszTargetKey )
const;
306 const char *GetExtension(
const char *pszTargetKey,
308 const char *pszDefault = NULL )
const;
309 OGRErr SetExtension(
const char *pszTargetKey,
311 const char *pszValue );
313 int FindProjParm(
const char *pszParameter,
315 OGRErr SetProjParm(
const char *,
double );
316 double GetProjParm(
const char *,
double =0.0, OGRErr* = NULL )
const;
318 OGRErr SetNormProjParm(
const char *,
double );
319 double GetNormProjParm(
const char *,
double=0.0, OGRErr* =NULL)
const;
321 static int IsAngularParameter(
const char * );
322 static int IsLongitudeParameter(
const char * );
323 static int IsLinearParameter(
const char * );
326 OGRErr SetACEA(
double dfStdP1,
double dfStdP2,
327 double dfCenterLat,
double dfCenterLong,
328 double dfFalseEasting,
double dfFalseNorthing );
331 OGRErr SetAE(
double dfCenterLat,
double dfCenterLong,
332 double dfFalseEasting,
double dfFalseNorthing );
335 OGRErr SetBonne(
double dfStdP1,
double dfCentralMeridian,
336 double dfFalseEasting,
double dfFalseNorthing );
339 OGRErr SetCEA(
double dfStdP1,
double dfCentralMeridian,
340 double dfFalseEasting,
double dfFalseNorthing );
343 OGRErr SetCS(
double dfCenterLat,
double dfCenterLong,
344 double dfFalseEasting,
double dfFalseNorthing );
347 OGRErr SetEC(
double dfStdP1,
double dfStdP2,
348 double dfCenterLat,
double dfCenterLong,
349 double dfFalseEasting,
double dfFalseNorthing );
352 OGRErr SetEckert(
int nVariation,
double dfCentralMeridian,
353 double dfFalseEasting,
double dfFalseNorthing );
355 OGRErr SetEckertIV(
double dfCentralMeridian,
356 double dfFalseEasting,
double dfFalseNorthing );
358 OGRErr SetEckertVI(
double dfCentralMeridian,
359 double dfFalseEasting,
double dfFalseNorthing );
362 OGRErr SetEquirectangular(
double dfCenterLat,
double dfCenterLong,
363 double dfFalseEasting,
double dfFalseNorthing );
365 OGRErr SetEquirectangular2(
double dfCenterLat,
double dfCenterLong,
366 double dfPseudoStdParallel1,
367 double dfFalseEasting,
double dfFalseNorthing );
370 OGRErr SetGEOS(
double dfCentralMeridian,
double dfSatelliteHeight,
371 double dfFalseEasting,
double dfFalseNorthing );
374 OGRErr SetGH(
double dfCentralMeridian,
375 double dfFalseEasting,
double dfFalseNorthing );
381 OGRErr SetGS(
double dfCentralMeridian,
382 double dfFalseEasting,
double dfFalseNorthing );
385 OGRErr SetGaussSchreiberTMercator(
double dfCenterLat,
double dfCenterLong,
387 double dfFalseEasting,
double dfFalseNorthing );
390 OGRErr SetGnomonic(
double dfCenterLat,
double dfCenterLong,
391 double dfFalseEasting,
double dfFalseNorthing );
394 OGRErr SetHOM(
double dfCenterLat,
double dfCenterLong,
395 double dfAzimuth,
double dfRectToSkew,
397 double dfFalseEasting,
double dfFalseNorthing );
399 OGRErr SetHOM2PNO(
double dfCenterLat,
400 double dfLat1,
double dfLong1,
401 double dfLat2,
double dfLong2,
403 double dfFalseEasting,
double dfFalseNorthing );
405 OGRErr SetOM(
double dfCenterLat,
double dfCenterLong,
406 double dfAzimuth,
double dfRectToSkew,
408 double dfFalseEasting,
double dfFalseNorthing );
411 OGRErr SetHOMAC(
double dfCenterLat,
double dfCenterLong,
412 double dfAzimuth,
double dfRectToSkew,
414 double dfFalseEasting,
double dfFalseNorthing );
417 OGRErr SetIWMPolyconic(
double dfLat1,
double dfLat2,
419 double dfFalseEasting,
420 double dfFalseNorthing );
423 OGRErr SetKrovak(
double dfCenterLat,
double dfCenterLong,
424 double dfAzimuth,
double dfPseudoStdParallelLat,
426 double dfFalseEasting,
double dfFalseNorthing );
429 OGRErr SetLAEA(
double dfCenterLat,
double dfCenterLong,
430 double dfFalseEasting,
double dfFalseNorthing );
433 OGRErr SetLCC(
double dfStdP1,
double dfStdP2,
434 double dfCenterLat,
double dfCenterLong,
435 double dfFalseEasting,
double dfFalseNorthing );
438 OGRErr SetLCC1SP(
double dfCenterLat,
double dfCenterLong,
440 double dfFalseEasting,
double dfFalseNorthing );
443 OGRErr SetLCCB(
double dfStdP1,
double dfStdP2,
444 double dfCenterLat,
double dfCenterLong,
445 double dfFalseEasting,
double dfFalseNorthing );
448 OGRErr SetMC(
double dfCenterLat,
double dfCenterLong,
449 double dfFalseEasting,
double dfFalseNorthing );
452 OGRErr SetMercator(
double dfCenterLat,
double dfCenterLong,
454 double dfFalseEasting,
double dfFalseNorthing );
456 OGRErr SetMercator2SP(
double dfStdP1,
457 double dfCenterLat,
double dfCenterLong,
458 double dfFalseEasting,
double dfFalseNorthing );
461 OGRErr SetMollweide(
double dfCentralMeridian,
462 double dfFalseEasting,
double dfFalseNorthing );
465 OGRErr SetNZMG(
double dfCenterLat,
double dfCenterLong,
466 double dfFalseEasting,
double dfFalseNorthing );
469 OGRErr SetOS(
double dfOriginLat,
double dfCMeridian,
471 double dfFalseEasting,
double dfFalseNorthing);
474 OGRErr SetOrthographic(
double dfCenterLat,
double dfCenterLong,
475 double dfFalseEasting,
double dfFalseNorthing);
478 OGRErr SetPolyconic(
double dfCenterLat,
double dfCenterLong,
479 double dfFalseEasting,
double dfFalseNorthing );
482 OGRErr SetPS(
double dfCenterLat,
double dfCenterLong,
484 double dfFalseEasting,
double dfFalseNorthing);
487 OGRErr SetRobinson(
double dfCenterLong,
488 double dfFalseEasting,
double dfFalseNorthing );
491 OGRErr SetSinusoidal(
double dfCenterLong,
492 double dfFalseEasting,
double dfFalseNorthing );
495 OGRErr SetStereographic(
double dfCenterLat,
double dfCenterLong,
497 double dfFalseEasting,
double dfFalseNorthing);
500 OGRErr SetSOC(
double dfLatitudeOfOrigin,
double dfCentralMeridian,
501 double dfFalseEasting,
double dfFalseNorthing );
504 OGRErr SetTM(
double dfCenterLat,
double dfCenterLong,
506 double dfFalseEasting,
double dfFalseNorthing );
509 OGRErr SetTMVariant(
const char *pszVariantName,
510 double dfCenterLat,
double dfCenterLong,
512 double dfFalseEasting,
double dfFalseNorthing );
515 OGRErr SetTMG(
double dfCenterLat,
double dfCenterLong,
516 double dfFalseEasting,
double dfFalseNorthing );
519 OGRErr SetTMSO(
double dfCenterLat,
double dfCenterLong,
521 double dfFalseEasting,
double dfFalseNorthing );
524 OGRErr SetTPED(
double dfLat1,
double dfLong1,
525 double dfLat2,
double dfLong2,
526 double dfFalseEasting,
double dfFalseNorthing );
529 OGRErr SetVDG(
double dfCenterLong,
530 double dfFalseEasting,
double dfFalseNorthing );
533 OGRErr SetUTM(
int nZone,
int bNorth = TRUE );
534 int GetUTMZone(
int *pbNorth = NULL )
const;
537 OGRErr SetWagner(
int nVariation,
double dfCenterLat,
538 double dfFalseEasting,
double dfFalseNorthing );
541 OGRErr SetStatePlane(
int nZone,
int bNAD83 = TRUE,
542 const char *pszOverrideUnitName = NULL,
543 double dfOverrideUnit = 0.0 );
545 OGRErr ImportFromESRIStatePlaneWKT(
546 int nCode,
const char* pszDatumName,
const char* pszUnitsName,
547 int nPCSCode,
const char* pszCSName = 0 );
548 OGRErr ImportFromESRIWisconsinWKT(
549 const char* pszPrjName,
double dfCentralMeridian,
double dfLatOfOrigin,
550 const char* pszUnitsName,
const char* pszCSName = 0 );
601 virtual int Transform(
int nCount,
602 double *x,
double *y,
double *z = NULL ) = 0;
619 virtual int TransformEx(
int nCount,
620 double *x,
double *y,
double *z = NULL,
621 int *pabSuccess = NULL ) = 0;
OGRCoordinateTransformation * OGRCreateCoordinateTransformation(OGRSpatialReference *poSource, OGRSpatialReference *poTarget)
Definition: ogrct.cpp:394
Definition: ogr_spatialref.h:60
const char * GetValue() const
Definition: ogr_spatialref.h:92
Definition: ogr_spatialref.h:129
int GetReferenceCount() const
Fetch current reference count.
Definition: ogr_spatialref.h:164
int GetChildCount() const
Definition: ogr_spatialref.h:78