63 WKBPoint25D = 0x80000001,
75 case WKBMultiPoint:
return WKBPoint;
76 case WKBMultiLineString:
return WKBLineString;
77 case WKBMultiPolygon:
return WKBPolygon;
78 case WKBMultiPoint25D:
return WKBPoint25D;
79 case WKBMultiLineString25D:
return WKBLineString25D;
80 case WKBMultiPolygon25D:
return WKBPolygon25D;
89 case WKBPoint:
return WKBMultiPoint;
90 case WKBLineString:
return WKBMultiLineString;
91 case WKBPolygon:
return WKBMultiPolygon;
92 case WKBPoint25D:
return WKBMultiPoint25D;
93 case WKBLineString25D:
return WKBMultiLineString25D;
94 case WKBPolygon25D:
return WKBMultiPolygon25D;
103 case WKBPoint25D:
return WKBPoint;
104 case WKBLineString25D:
return WKBLineString;
105 case WKBPolygon25D:
return WKBPolygon;
106 case WKBMultiPoint25D:
return WKBMultiPoint;
107 case WKBMultiLineString25D:
return WKBMultiLineString;
108 case WKBMultiPolygon25D:
return WKBMultiPolygon;
109 default:
return type;
115 switch ( flatType( type ) )
128 switch ( flatType( type ) )
131 case WKBMultiLineString:
132 case WKBMultiPolygon:
143 case WKBUnknown:
return 0;
144 case WKBNoGeometry:
return 0;
145 case WKBPoint25D:
return 3;
146 case WKBLineString25D:
return 3;
147 case WKBPolygon25D:
return 3;
148 case WKBMultiPoint25D:
return 3;
149 case WKBMultiLineString25D:
return 3;
150 case WKBMultiPolygon25D:
return 3;
169 case Point:
return "Point";
170 case Line:
return "Line";
171 case Polygon:
return "Polygon";
172 case UnknownGeometry:
return "Unknown geometry";
173 case NoGeometry:
return "No geometry";
174 default:
return "Invalid type";
179 static const char *featureType(
WkbType type )
183 case WKBUnknown:
return "WKBUnknown";
184 case WKBPoint:
return "WKBPoint";
185 case WKBLineString:
return "WKBLineString";
186 case WKBPolygon:
return "WKBPolygon";
187 case WKBMultiPoint:
return "WKBMultiPoint";
188 case WKBMultiLineString:
return "WKBMultiLineString";
189 case WKBMultiPolygon:
return "WKBMultiPolygon";
190 case WKBNoGeometry:
return "WKBNoGeometry";
191 case WKBPoint25D:
return "WKBPoint25D";
192 case WKBLineString25D:
return "WKBLineString25D";
193 case WKBPolygon25D:
return "WKBPolygon25D";
194 case WKBMultiPoint25D:
return "WKBMultiPoint25D";
195 case WKBMultiLineString25D:
return "WKBMultiLineString25D";
196 case WKBMultiPolygon25D:
return "WKBMultiPolygon25D";
197 default:
return "invalid wkbtype";
205 { UnknownDataType = 0, Byte = 1, UInt16 = 2, Int16 = 3, UInt32 = 4, Int32 = 5, Float32 = 6, Float64 = 7, CInt16 = 8, CInt32 = 9, CFloat32 = 10, CFloat64 = 11, ARGB32 = 12, ARGB32_Premultiplied = 13
238 DegreesMinutesSeconds = 2,
239 DegreesDecimalMinutes = 2,
246 static UnitType fromLiteral( QString literal,
QGis::UnitType defaultType = UnknownUnit );
250 static UnitType fromTr( QString literal,
QGis::UnitType defaultType = UnknownUnit );
260 ProviderExtentCalcEvent = ( QEvent::User + 1 ),
263 ProviderCountCalcEvent
292 static const char *qgisUnitTypes[];
300 #if QT_VERSION >= 0x050000
301 #define cast_to_fptr(f) f
321 return QString::number( a,
'f', precision ).remove( QRegExp(
"\\.?0+$" ) );
327 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * DBL_EPSILON )
329 const double diff = a - b;
330 return diff > -epsilon && diff <= epsilon;
344 double ar = frexp( a, &aexp );
345 double br = frexp( b, &bexp );
347 return aexp == bexp &&
348 qRound( ar * pow( 10.0, significantDigits ) ) == qRound( br * pow( 10.0, significantDigits ) );
374 void CORE_EXPORT
qgsFree(
void *ptr );
379 extern CORE_EXPORT
const QString
GEOWKT;
383 extern CORE_EXPORT
const QString
GEOPROJ4;
403 extern CORE_EXPORT
const QString
GEO_NONE;
428 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
429 #define Q_NOWARN_DEPRECATED_PUSH \
430 _Pragma("GCC diagnostic push") \
431 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
432 #define Q_NOWARN_DEPRECATED_POP \
433 _Pragma("GCC diagnostic pop")
434 #elif defined(_MSC_VER)
435 #define Q_NOWARN_DEPRECATED_PUSH \
436 __pragma(warning(push)) \
437 __pragma(warning(disable:4996))
438 #define Q_NOWARN_DEPRECATED_POP \
439 __pragma(warning(pop))
441 #define Q_NOWARN_DEPRECATED_PUSH
442 #define Q_NOWARN_DEPRECATED_POP
448 # define QGISEXTERN extern "C" __declspec( dllexport )
451 # pragma warning(disable:4190)
454 # define QGISEXTERN extern "C"