CFx SDK Documentation  2023 SP0
DbGeoData.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 
25 #ifndef _ODDB_GEODATA_INCLUDED_
26 #define _ODDB_GEODATA_INCLUDED_
27 
28 #include "TD_PackPush.h"
29 
30 #include "DbObject.h"
31 
32 /*class OdDbGeoDataReactor
33 {
34 public:
35  virtual ~OdDbGeoDataReactor() {}
36 
37  virtual OdResult geoCoordinateSystemWillChange(OdDbDatabase* pDb, const OdString& oldId, const OdString& newId)
38  {
39  return eOk;
40  }
41 
42  virtual void geoCoordinateSystemChanged(OdDbDatabase* pDb, const OdString& oldId, const OdString& newId) {}
43 };*/
44 
51 {
52 public:
58 
63  {
64  kCoordTypUnknown = 0, // Unknown
65  kCoordTypLocal, // Local grid
66  kCoordTypGrid, // Projected grid
67  kCoordTypGeographic // Geographic (latitude/longitude)
68  };
69 
74  {
75  kScaleEstMethodUnity = 1, // Unity
76  kScaleEstMethodUserDefined, // User defined scale factor
77  kScaleEstMethodReferencePoint, // Grid scale at reference point
78  kScaleEstMethodPrismoidal // Prismoidal
79  };
80 
85 
91  void setBlockTableRecordId(const OdDbObjectId& blockId);
92 
105 
112 
124 
139  void setCoordinateType(TypeOfCoordinates designCoordinateType);
140 
150 
161  void setDesignPoint(const OdGePoint3d& point);
162 
168 
179  void setReferencePoint(const OdGePoint3d& point);
180 
190  double horizontalUnitScale() const;
198 
205  void setHorizontalUnitScale(double horzUnitScale);
206 
213 
220  double verticalUnitScale() const;
234  void setVerticalUnitScale(double vertUnitScale);
241 
259  void setUpDirection(const OdGeVector3d& vec);
260 
264  double northDirection() const;
278 
289 
296  double scaleFactor() const;
305  void setScaleFactor(double value);
306 
314  bool doSeaLevelCorrection() const;
325  void setDoSeaLevelCorrection(bool seaLevelCorrectionOn);
326 
330  double seaLevelElevation() const;
337 
353 
368  OdResult setCoordinateSystem(const OdString& coordSystem);
369 
379  void setGeoRSSTag(const OdString& rssTag);
380 
390  void setObservationFrom(const OdString& from);
391 
401  void setObservationTo(const OdString& to);
402 
412  void setObservationCoverage(const OdString& coverage);
413 
417  int numMeshPoints() const;
425  void getMeshPointMap(int index, OdGePoint2d& srcPt, OdGePoint2d& dstPt) const;
435  void getMeshPointMaps(OdGePoint2dArray& srcPts, OdGePoint2dArray& dstPts) const;
448  void addMeshPointMap(int index, const OdGePoint2d& srcPt, const OdGePoint2d& dstPt);
455  void setMeshPointMaps(const OdGePoint2dArray& srcPts, const OdGePoint2dArray& dstPts);
460 
464  int numMeshFaces() const;
473  void getMeshFace(int faceIndex, int& p0, int& p1, int& p2) const;
482  void addMeshFace(int faceIndex, int p0, int p1, int p2);
483 
485  OdDbDwgFiler* pFiler);
486 
487  virtual void dwgOutFields(
488  OdDbDwgFiler* pFiler) const;
489 
491  OdDbDxfFiler* pFiler);
492 
493  virtual void dxfOutFields(
494  OdDbDxfFiler* pFiler) const;
495 
522  OdResult transformToLonLatAlt(double x, double y, double z, double& lon, double& lat, double& alt) const;
523 
550  OdResult transformFromLonLatAlt(double lon, double lat, double alt, double& x, double& y, double& z) const;
551 };
552 
553 //GLOBAL API FUNCTIONS
563 
564 //TOOLKIT_EXPORT OdResult oddbRegisterGeoDataReactor(OdDbGeoDataReactor *reactor);
565 //TOOLKIT_EXPORT void oddbRemoveGeoDataReactor(OdDbGeoDataReactor *reactor);
566 
567 
572 
573 #include "TD_PackPop.h"
574 
575 #endif //_ODDB_GEODATA_INCLUDED_
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdSmartPtr< OdDbGeoData > OdDbGeoDataPtr
Definition: DbGeoData.h:571
TOOLKIT_EXPORT OdResult oddbGetGeoDataObjId(OdDbDatabase *pDb, OdDbObjectId &objId)
alt
Definition: DimVarDefs.h:165
OdResult
Definition: OdResult.h:29
void setReferencePoint(const OdGePoint3d &point)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
void setObservationFrom(const OdString &from)
void setBlockTableRecordId(const OdDbObjectId &blockId)
OdGeVector2d northDirectionVector() const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
double seaLevelElevation() const
double horizontalUnitScale() const
void getMeshPointMaps(OdGePoint2dArray &srcPts, OdGePoint2dArray &dstPts) const
void setScaleFactor(double value)
void setObservationCoverage(const OdString &coverage)
double northDirection() const
OdResult transformFromLonLatAlt(const OdGePoint3d &geoPt, OdGePoint3d &dwgPt) const
void setNorthDirectionVector(const OdGeVector2d &north)
void addMeshFace(int faceIndex, int p0, int p1, int p2)
ScaleEstimationMethod
Definition: DbGeoData.h:74
@ kScaleEstMethodReferencePoint
Definition: DbGeoData.h:77
@ kScaleEstMethodUserDefined
Definition: DbGeoData.h:76
OdString geoRSSTag() const
OdGePoint3d designPoint() const
OdResult transformToLonLatAlt(double x, double y, double z, double &lon, double &lat, double &alt) const
int numMeshPoints() const
int numMeshFaces() const
void setDesignPoint(const OdGePoint3d &point)
void setMeshPointMaps(const OdGePoint2dArray &srcPts, const OdGePoint2dArray &dstPts)
OdGeVector3d upDirection() const
OdResult setCoordinateSystem(const OdString &coordSystem)
OdString observationFrom() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdResult eraseFromDb()
OdString observationCoverage() const
void getMeshPointMap(int index, OdGePoint2d &srcPt, OdGePoint2d &dstPt) const
void setDoSeaLevelCorrection(bool seaLevelCorrectionOn)
OdString observationTo() const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
double coordinateProjectionRadius() const
double verticalUnitScale() const
@ kCoordTypLocal
Definition: DbGeoData.h:65
@ kCoordTypGrid
Definition: DbGeoData.h:66
void addMeshPointMap(int index, const OdGePoint2d &srcPt, const OdGePoint2d &dstPt)
OdDb::UnitsValue verticalUnits() const
OdString coordinateSystem() const
void resetMeshPointMaps()
void setCoordinateType(TypeOfCoordinates designCoordinateType)
void setVerticalUnitScale(double vertUnitScale)
void setUpDirection(const OdGeVector3d &vec)
void setSeaLevelElevation(double value)
double scaleFactor() const
OdDbObjectId blockTableRecordId() const
OdResult postToDb(OdDbObjectId &objId)
OdDb::UnitsValue horizontalUnits() const
void setObservationTo(const OdString &to)
OdGePoint3d referencePoint() const
OdResult transformFromLonLatAlt(double lon, double lat, double alt, double &x, double &y, double &z) const
void setHorizontalUnits(OdDb::UnitsValue horizUnits)
void setScaleEstimationMethod(ScaleEstimationMethod value)
ScaleEstimationMethod scaleEstimationMethod() const
void setGeoRSSTag(const OdString &rssTag)
void getMeshFace(int faceIndex, int &p0, int &p1, int &p2) const
OdResult transformToLonLatAlt(const OdGePoint3d &dwgPt, OdGePoint3d &geoPt) const
ODDB_DECLARE_MEMBERS(OdDbGeoData)
bool doSeaLevelCorrection() const
TypeOfCoordinates coordinateType() const
void setHorizontalUnitScale(double horzUnitScale)
void setVerticalUnits(OdDb::UnitsValue vertUnits)
void setCoordinateProjectionRadius(double value)
GLfloat GLfloat GLfloat z
Definition: gles2_ext.h:318
GLuint index
Definition: gles2_ext.h:265
GLfloat x
Definition: gles2_ext.h:314
GLfloat GLfloat y
Definition: gles2_ext.h:316
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
UnitsValue
Definition: OdaDefs.h:446