CFx SDK Documentation  2020SP3
OdDbGeoCoordinateSystem.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 #ifndef _OD_DB_GEOCOORDINATESYSTEM_
25 #define _OD_DB_GEOCOORDINATESYSTEM_
26 
27 #include "TD_PackPush.h"
28 #include "Ge/GeExtents2d.h"
29 #include "DbDatabase.h"
30 #include "Ge/GePoint3d.h"
31 
38 
40 {
43 };
44 
46 {
49  double polarRadius;
50  double eccentricity;
51 };
52 
54 {
56  double value;
57 };
65 {
66 public:
68 
77 
85  virtual OdResult getId(OdString& categoryId) const = 0;
86 
94  virtual OdResult getNumOfCoordinateSystem(int& num) const = 0;
95 
105 
114 };
115 
122 {
123 public:
125 
129  enum Type
130  {
131  kTypeUnknown = 0, // The coordinate system is not set.
132  kTypeArbitrary = 1, // The coordinate system is arbitrary.
133  kTypeGeographic = 2, // The coordinate system is geographic.
134  kTypeProjected = 3 // The coordinate system is projected.
135  };
136 
141  {
142  kProjectionCodeUnknown = 0, // Unknown projection code.
143  kProjectionCodeAlber = 4, // Albers equal-area conic projection.
144  kProjectionCodeAzede = 59, // Azimuthal equidistant projection (elevated ellipsoid).
145  kProjectionCodeAzmea = 11, // Lambert azimuthal equal-area projection.
146  kProjectionCodeAzmed = 7, // Lambert azimuthal equidistant projection.
147  kProjectionCodeBipolar = 31, // Bipolar oblique conformal conic projection.
148  kProjectionCodeBonne = 24, // Bonne Pseudo Conical projection.
149  kProjectionCodeCassini = 22, // Cassini projection.
150  kProjectionCodeEckert4 = 25, // Eckert pseudocylindrical projection (number IV).
151  kProjectionCodeEckert6 = 26, // Eckert pseudocylindrical projection (number VI).
152  kProjectionCodeEdcnc = 12, // Equidistant conic projection (conic projection).
153  kProjectionCodeEdcyl = 20, // Equidistant cylindrical projection (spherical only).
154  kProjectionCodeGaussK = 46, // Gauss-Kruger: Transverse Mercator projection without scale reduction parameter.
155  kProjectionCodeGnomonic = 19, // Gnomonic projection.
156  kProjectionCodeGoode = 28, // Goode homolosine projection.
157  kProjectionCodeHom1uv = 1281, // Unrectified Hotine Oblique Mercator Projection. Single point form.
158  kProjectionCodeHom1xy = 1282, // Rectified Hotine Oblique Mercator Projection. Single poin form.
159  kProjectionCodeHom2uv = 1283, // Unrectified Hotine Oblique Mercator Projection. Two point form.
160  kProjectionCodeHom2xy = 1284, // Rectified Hotine Oblique Mercator Projection. Two point form.
161  kProjectionCodeKrovak = 47, // Original Krovak projection.
162  kProjectionCodeKrvk95 = 51, // Krovak projection includes 1995 adjustment.
163  kProjectionCodeLL = 1, // Produces (processes) latitude and longitude.
164  kProjectionCodeLm1sp = 36, // Single standard parallel variation of the Lambert Conformal Conic projection.
165  kProjectionCodeLm2sp = 37, // Double standard parallel variation of the Lambert Conformal Conic projection.
166  kProjectionCodeLmblg = 38, // Belgian variation of the Lambert Conformal Conic projection.
167  kProjectionCodeLmtan = 8, // Lambert Tangential Conformal Conic projection.
168  kProjectionCodeMiller = 13, // Miller cylindrical projection.
169  kProjectionCodeMndotl = 41, // Minnesota DOT variation of the Lambert Conformal Conic projection.
170  kProjectionCodeMndott = 42, // Minnesota DOT variation of the Transverse Mercator projection.
171  kProjectionCodeModpc = 10, // Lallemand IMW Modified Polyconic projection.
172  kProjectionCodeMollweid = 27, // Mollweide projection.
173  kProjectionCodeMrcat = 6, // Mercator Cylindrical projection.
174  kProjectionCodeMrcatK = 49, // Standard Mercator projection with a scale reduction factor instead of a standard parallel.
175  kProjectionCodeMstero = 15, // Modified Stereographic projection.
176  kProjectionCodeNeacyl = 29, // Normal aspect. Equal-area Cylindrical projection.
177  kProjectionCodeNerth = 55, // Non-Earth projection.
178  kProjectionCodeNzealand = 16, // New Zealand National Grid.
179  kProjectionCodeOblqM = 5, // Oblique Mercator projection.
180  kProjectionCodeObqcyl = 56, // Oblique Cylindrical projection.
181  kProjectionCodeOrtho = 18, // Orthographic projection.
182  kProjectionCodeOstn02 = 60, // Transverse Mercator projection with the OSTN02 grid shift tacked on.
183  kProjectionCodeOstn97 = 58, // Transverse Mercator projection with the OSTN97 grid shift tacked on.
184  kProjectionCodeOstro = 34, // Oblique Stereographic projection.
185  kProjectionCodePlycn = 9, // Hassler American Polyconic projection.
186  kProjectionCodePstro = 33, // Polar Stereographic projection.
187  kProjectionCodePstrosl = 53, // Polar Stereographic projection with standard latitude.
188  kProjectionCodeRskew = 1285, // Hotine Oblique Mercator (variant B) projection.
189  kProjectionCodeRskewc = 1286, // Rectified Skew Orthomorphic projection, false origin and azimuth at center.
190  kProjectionCodeRskewo = 1287, // Rectified Skew Orthomorphic projection.
191  kProjectionCodeRobinson = 23, // Robinson Cylindrical projection.
192  kProjectionCodeSinus = 17, // Sinusoidal projection.
193  kProjectionCodeSotrm = 43, // Transverse Mercator south oriented projection.
194  kProjectionCodeSstro = 35, // Synder's Oblique Stereographic projection.
195  kProjectionCodeSwiss = 32, // Swiss projection.
196  kProjectionCodeSys34 = 57, // Combination of Transverse Mercator projection and a polynomial expansion used in Denmark.
197  kProjectionCodeSys34_99 = 61, // Combination of Transverse Mercator projection and a polynomial expansion used in Denmark. Polynomials are of the 1999 vintage.
198  kProjectionCodeTeacyl = 30, // Transverse aspect. Equal-area Cylindrical projection.
199  kProjectionCodeTm = 3, // Gauss-Kruger or Transverse Mercator Projection.
200  kProjectionCodeTrmeraf = 54, // Transverse Mercator projection with affine post-processor.
201  kProjectionCodeTrmrkrg = 62, // Transverse Mercator projection using Kruger formulation.
202  kProjectionCodeTrmrs = 45, // Transverse Mercator projection per J. P. Snyder.
203  kProjectionCodeVdgrntn = 21, // Van der Grinten projection.
204  kProjectionCodeWccsl = 39, // Wisconsin County Coordinate System variation; Lambert Conformal Conic projection.
205  kProjectionCodeWccst = 40, // Wisconsin County Coordinate System variation; Transverse Mercator projection.
206  kProjectionCodeUtm = 44, // The UTM direct variation of the Transverse Mercator projection.
207  kProjectionCodeWinkl = 63, // Winkel Tripel projection.
208  kProjectionCodeNrthsrt = 64, // North with scale and rotation projection.
209  kProjectionCodeLmbrtaf = 65, // Lambert Conformal Conic projection with affine post-processor.
210  kProjectionCodeSys34_01 = 66, // Combination of Transverse Mercator projection and polynomial expansion used in Denmark.
211  kProjectionCodeEdcylE = 67, // Equidistant Cylindrical projection, Ellipsoidal or Spherical.
212  kProjectionCodePlateCarree = 68, // Plate CarrĂ© projection.
213  kProjectionCodePvMercator = 69, // Popular Visualisation Pseudo Mercator projection (Google Earth).
214  kProjectionCodeLmMich = 70, // Lambert Conic Conformal (2SP Michigan) projection.
215  };
219  enum Unit
220  {
221  kUnitUnknown = 0,
222  kUnitMeter = 1,
223  kUnitFoot = 2,
224  kUnitInch = 3,
225  kUnitIFoot = 4,
226  kUnitClarkeFoot = 5,
227  kUnitIInch = 6,
228  kUnitCentimeter = 7,
229  kUnitKilometer = 8,
230  kUnitYard = 9,
231  kUnitSearsYard = 10,
232  kUnitMile = 11,
233  kUnitIYard = 12,
234  kUnitIMile = 13,
235  kUnitKnot = 14,
236  kUnitNautM = 15,
237  kUnitLat66 = 16,
238  kUnitLat83 = 17,
239  kUnitDecimeter = 18,
240  kUnitMillimeter = 19,
241  kUnitDekameter = 20,
242  kUnitHectometer = 21,
243  kUnitGermanMeter = 22,
244  kUnitCaGrid = 23,
245  kUnitClarkeChain = 24,
246  kUnitGunterChain = 25,
247  kUnitBenoitChain = 26,
248  kUnitSearsChain = 27,
249  kUnitClarkeLink = 28,
250  kUnitGunterLink = 29,
251  kUnitBenoitLink = 30,
252  kUnitSearsLink = 31,
253  kUnitRod = 32,
254  kUnitPerch = 33,
255  kUnitPole = 34,
256  kUnitFurlong = 35,
257  kUnitRood = 36,
258  kUnitCapeFoot = 37,
259  kUnitBrealey = 38,
260  kUnitSearsFoot = 39,
261  kUnitGoldCoastFoot = 40,
262  kUnitMicroInch = 41,
263  kUnitIndianYard = 42,
264  kUnitIndianFoot = 43,
265  kUnitIndianFt37 = 44,
266  kUnitIndianFt62 = 45,
267  kUnitIndianFt75 = 46,
268  kUnitIndianYd37 = 47,
269  kUnitDecameter = 48,
270  kUnitInternationalChain = 49,
271  kUnitInternationalLink = 50,
272  kUnitBrFootTrunc = 51,
273  kUnitBrChainTrunc = 52,
274  kUnitBrLinkTrunc = 53,
275  kUnitDegree = 1001,
276  kUnitGrad = 1002,
277  kUnitGrade = 1003,
278  kUnitMapInfo = 1004,
279  kUnitMil = 1005,
280  kUnitMinute = 1006,
281  kUnitRadian = 1007,
282  kUnitSecond = 1008,
283  kUnitDecisec = 1009,
284  kUnitCentisec = 1010,
285  kUnitMillisec = 1011,
286  };
302  virtual OdResult getId(OdString& coordSysId) const = 0;
310  virtual OdResult getEpsgCode(int& epsgCode) const = 0;
326  virtual OdResult getDescription(OdString& coordSysDesc) const = 0;
337  virtual OdResult getUnit(OdDb::UnitsValue& unit) const = 0;
357  virtual OdResult getUnitScale(double& unitScale) const = 0;
375  bool includeSpecialParams) const = 0;
383  virtual OdResult getDatum(OdDbGeoDatum& datum) const = 0;
394  virtual OdResult getEllipsoid(OdDbGeoEllipsoid& ellipsoid) const = 0;
402  virtual OdResult getOffset(OdGeVector2d& offsetVec) const = 0;
410  virtual OdResult getCartesianExtents(OdGeExtents2d& exts) const = 0;
418  virtual OdResult getGeodeticExtents(OdGeExtents2d& exts) const = 0;
426  virtual OdResult getXmlRepresentation(OdString& strXml) const = 0;
434  virtual OdResult getWktRepresentation(OdString& strWkt) const = 0;
443  static OdResult create(const OdString& coordSysIdOrFullDef,
444  OdDbGeoCoordinateSystemPtr& pCoordSys);
472  const OdDbGeoCoordinateSystemCategory* pCategory = NULL);
473 };
474 
482 {
483 public:
500  virtual OdResult getSourceCoordinateSystemId(OdString& sourceCoordSysId) const = 0;
508  virtual OdResult getTargetCoordinateSystemId(OdString& targetCoordSysId) const = 0;
517  virtual OdResult transformPoint(const OdGePoint3d& pointIn, OdGePoint3d& pointOut) const = 0;
526  virtual OdResult transformPoints(const OdGePoint3dArray& pointsIn, OdGePoint3dArray& pointsOut) const = 0;
537  static OdResult transformPoint(const OdString& sourceCoordSysId,
538  const OdString& targetCoordSysId,
539  const OdGePoint3d& pointIn,
540  OdGePoint3d& pointOut);
541 
552  static OdResult transformPoints(const OdString& sourceCoordSysId,
553  const OdString& targetCoordSysId,
554  const OdGePoint3dArray& pointsIn,
555  OdGePoint3dArray& pointsOut);
565  static OdResult create(const OdString& sourceCoordSysId,
566  const OdString& targetCoordSysId,
567  OdDbGeoCoordinateSystemTransformerPtr& pCoordSysTransformer);
568 };
569 
570 #include "TD_PackPop.h"
571 
572 #endif //_OD_DB_GEOCOORDINATESYSTEM_
OdDbGeoCoordinateSystem::getEpsgCode
virtual OdResult getEpsgCode(int &epsgCode) const =0
OdDbGeoCoordinateSystem::getUnit
virtual OdResult getUnit(OdDbGeoCoordinateSystem::Unit &unit) const =0
OdDbGeoProjectionParameter::value
double value
Definition: OdDbGeoCoordinateSystem.h:56
OdDbGeoCoordinateSystemCategoryPtr
OdSmartPtr< OdDbGeoCoordinateSystemCategory > OdDbGeoCoordinateSystemCategoryPtr
Definition: OdDbGeoCoordinateSystem.h:34
OdResult
OdResult
Definition: OdResult.h:29
OdDbGeoCoordinateSystem::createAll
static OdResult createAll(OdArray< OdDbGeoCoordinateSystemPtr > &allCoordSys, const OdDbGeoCoordinateSystemCategory *pCategory=NULL)
OdDb::UnitsValue
UnitsValue
Definition: OdaDefs.h:444
OdDbGeoCoordinateSystem::Type
Type
Definition: OdDbGeoCoordinateSystem.h:130
OdDbGeoCoordinateSystem::Unit
Unit
Definition: OdDbGeoCoordinateSystem.h:220
OdString
Definition: OdString.h:95
NULL
#define NULL
Definition: GsProperties.h:177
OdDbGeoCoordinateSystem::getXmlRepresentation
virtual OdResult getXmlRepresentation(OdString &strXml) const =0
OdDbGeoCoordinateSystemTransformer::getTargetCoordinateSystemId
virtual OdResult getTargetCoordinateSystemId(OdString &targetCoordSysId) const =0
OdDbGeoCoordinateSystem::getCartesianExtents
virtual OdResult getCartesianExtents(OdGeExtents2d &exts) const =0
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdDbGeoCoordinateSystemTransformer::transformPoints
virtual OdResult transformPoints(const OdGePoint3dArray &pointsIn, OdGePoint3dArray &pointsOut) const =0
OdRxObject
Definition: RxObject.h:564
OdDbGeoEllipsoid::id
OdString id
Definition: OdDbGeoCoordinateSystem.h:47
OdDbGeoCoordinateSystemPtr
OdSmartPtr< OdDbGeoCoordinateSystem > OdDbGeoCoordinateSystemPtr
Definition: OdDbGeoCoordinateSystem.h:36
OdDbGeoCoordinateSystemTransformer::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbGeoCoordinateSystemTransformer)
OdDbGeoCoordinateSystem::getWktRepresentation
virtual OdResult getWktRepresentation(OdString &strWkt) const =0
OdDbGeoEllipsoid
Definition: OdDbGeoCoordinateSystem.h:46
OdArray
Definition: OdArray.h:591
OdDbGeoCoordinateSystem::ProjectionCode
ProjectionCode
Definition: OdDbGeoCoordinateSystem.h:141
OdDbGeoCoordinateSystem::getDescription
virtual OdResult getDescription(OdString &coordSysDesc) const =0
OdDbGeoEllipsoid::polarRadius
double polarRadius
Definition: OdDbGeoCoordinateSystem.h:49
TD_PackPop.h
OdDbGeoCoordinateSystem::getUnitScale
virtual OdResult getUnitScale(double &unitScale) const =0
OdDbGeoCoordinateSystemTransformer::OdDbGeoCoordinateSystemTransformer
OdDbGeoCoordinateSystemTransformer()
OdDbGeoCoordinateSystemCategory::getId
virtual OdResult getId(OdString &categoryId) const =0
OdDbGeoCoordinateSystem::create
static OdResult create(const OdString &coordSysIdOrFullDef, OdDbGeoCoordinateSystemPtr &pCoordSys)
OdGeExtents2d
Definition: GeExtents2d.h:43
OdDbGeoCoordinateSystem::getProjectionCode
virtual OdResult getProjectionCode(OdDbGeoCoordinateSystem::ProjectionCode &prjCode) const =0
OdDbGeoCoordinateSystemCategory::~OdDbGeoCoordinateSystemCategory
virtual ~OdDbGeoCoordinateSystemCategory()
index
GLuint index
Definition: gles2_ext.h:265
OdDbGeoCoordinateSystem::getProjectionParameters
virtual OdResult getProjectionParameters(OdArray< OdDbGeoProjectionParameter > &prjParams, bool includeSpecialParams) const =0
OdDbGeoCoordinateSystem::getType
virtual OdResult getType(OdDbGeoCoordinateSystem::Type &type) const =0
OdDbGeoCoordinateSystem::getGeodeticExtents
virtual OdResult getGeodeticExtents(OdGeExtents2d &exts) const =0
OdDbGeoCoordinateSystemCategory::createAll
static OdResult createAll(OdArray< OdDbGeoCoordinateSystemCategoryPtr > &allCategories)
OdSmartPtr
Definition: SmartPtr.h:58
OdDbGeoCoordinateSystemCategory::OdDbGeoCoordinateSystemCategory
OdDbGeoCoordinateSystemCategory()
OdGePoint3d
Definition: GePoint3d.h:55
DbDatabase.h
OdDbGeoCoordinateSystem::getId
virtual OdResult getId(OdString &coordSysId) const =0
GePoint3d.h
OdDbGeoCoordinateSystem::~OdDbGeoCoordinateSystem
virtual ~OdDbGeoCoordinateSystem()
OdDbGeoCoordinateSystemTransformer::~OdDbGeoCoordinateSystemTransformer
virtual ~OdDbGeoCoordinateSystemTransformer()
OdDbGeoEllipsoid::desc
OdString desc
Definition: OdDbGeoCoordinateSystem.h:48
OdDbGeoCoordinateSystem::getUnit
virtual OdResult getUnit(OdDb::UnitsValue &unit) const =0
OdDbGeoCoordinateSystemTransformer::transformPoint
static OdResult transformPoint(const OdString &sourceCoordSysId, const OdString &targetCoordSysId, const OdGePoint3d &pointIn, OdGePoint3d &pointOut)
OdGeVector2d
Definition: GeVector2d.h:51
GeExtents2d.h
OdDbGeoCoordinateSystemCategory::getCoordinateSystemAt
virtual OdResult getCoordinateSystemAt(int index, OdDbGeoCoordinateSystemPtr &pCoordSys) const =0
OdDbGeoCoordinateSystemCategory::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbGeoCoordinateSystemCategory)
OdDbGeoCoordinateSystemCategory::getNumOfCoordinateSystem
virtual OdResult getNumOfCoordinateSystem(int &num) const =0
OdDbGeoCoordinateSystemTransformer
Definition: OdDbGeoCoordinateSystem.h:482
TD_PackPush.h
OdDbGeoCoordinateSystemTransformerPtr
OdSmartPtr< OdDbGeoCoordinateSystemTransformer > OdDbGeoCoordinateSystemTransformerPtr
Definition: OdDbGeoCoordinateSystem.h:37
OdDbGeoProjectionParameter
Definition: OdDbGeoCoordinateSystem.h:54
OdDbGeoCoordinateSystemTransformer::create
static OdResult create(const OdString &sourceCoordSysId, const OdString &targetCoordSysId, OdDbGeoCoordinateSystemTransformerPtr &pCoordSysTransformer)
OdDbGeoCoordinateSystemCategory
Definition: OdDbGeoCoordinateSystem.h:65
OdDbGeoCoordinateSystem
Definition: OdDbGeoCoordinateSystem.h:122
OdDbGeoCoordinateSystemTransformer::transformPoint
virtual OdResult transformPoint(const OdGePoint3d &pointIn, OdGePoint3d &pointOut) const =0
OdDbGeoProjectionParameter::name
OdString name
Definition: OdDbGeoCoordinateSystem.h:55
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbGeoCoordinateSystemTransformer::getSourceCoordinateSystemId
virtual OdResult getSourceCoordinateSystemId(OdString &sourceCoordSysId) const =0
OdDbGeoCoordinateSystem::getOffset
virtual OdResult getOffset(OdGeVector2d &offsetVec) const =0
OdDbGeoCoordinateSystem::getDatum
virtual OdResult getDatum(OdDbGeoDatum &datum) const =0
OdDbGeoCoordinateSystem::createAll
static OdResult createAll(const OdGePoint3d &geoPt, OdArray< OdDbGeoCoordinateSystemPtr > &allCoordSys)
OdDbGeoEllipsoid::eccentricity
double eccentricity
Definition: OdDbGeoCoordinateSystem.h:50
OdDbGeoCoordinateSystem::getEllipsoid
virtual OdResult getEllipsoid(OdDbGeoEllipsoid &ellipsoid) const =0
OdDbGeoDatum
Definition: OdDbGeoCoordinateSystem.h:40
OdDbGeoDatum::desc
OdString desc
Definition: OdDbGeoCoordinateSystem.h:42
OdDbGeoCoordinateSystem::OdDbGeoCoordinateSystem
OdDbGeoCoordinateSystem()
OdDbGeoCoordinateSystem::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdDbGeoCoordinateSystem)
OdDbGeoCoordinateSystemTransformer::transformPoints
static OdResult transformPoints(const OdString &sourceCoordSysId, const OdString &targetCoordSysId, const OdGePoint3dArray &pointsIn, OdGePoint3dArray &pointsOut)
OdDbGeoDatum::id
OdString id
Definition: OdDbGeoCoordinateSystem.h:41