1 /*************************************************************************** 2 wkbptr.h 3 --------------------- 4 begin : Dezember 2012 5 copyright : (C) 2012 by Juergen E. Fischer 6 email : jef at norbit dot de 7 *************************************************************************** 8 * * 9 * This file may be used under the terms of the GNU Lesser * 10 * General Public License version 2.1 as published by the Free Software * 11 * Foundation and appearing in the file LICENSE.LGPL included in the * 12 * packaging of this file. Please review the following information to * 13 * ensure the GNU Lesser General Public License version 2.1 requirements * 14 * will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. * 15 * * 16 ***************************************************************************/ 17 #ifndef WKBPTR_H 18 #define WKBPTR_H 19 20 #include <QSharedData> 21 #include <QVector> 22 23 union wkbPtr 24 { 25 void *vPtr = nullptr; 26 double *dPtr; 27 int *iPtr; 28 unsigned char *ucPtr; 29 char *cPtr; 30 }; 31 32 const int SDO_ARRAY_SIZE = 1024; 33 34 #define SDO_GTYPE_D(g) (g/1000%10) 35 #define SDO_GTYPE_L(g) (g/100%10) 36 #define SDO_GTYPE_TT(g) (g%100) 37 #define SDO_GTYPE(g,tt) (g*1000+tt) 38 39 enum SDO_GTYPE_TT 40 { 41 GtUnknown = 0, 42 GtPoint = 1, 43 GtLine = 2, 44 GtPolygon = 3, 45 GtCollection = 4, 46 GtMultiPoint = 5, 47 GtMultiLine = 6, 48 GtMultiPolygon = 7, 49 }; 50 51 52 class QOCISpatialGeometry : public QSharedData 53 { 54 public: 55 QOCISpatialGeometry() = default; 56 57 bool isNull = true; 58 int gtype = -1; 59 int srid = -1; 60 double x = 0.0; 61 double y = 0.0; 62 double z = 0.0; 63 64 QVector<int> eleminfo; 65 QVector<double> ordinates; 66 }; 67 68 Q_DECLARE_METATYPE( QOCISpatialGeometry ); 69 70 #endif // WKBPTR_H 71