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,
248 static UnitType fromLiteral( QString literal,
QGis::UnitType defaultType = UnknownUnit );
261 ProviderExtentCalcEvent = ( QEvent::User + 1 ),
264 ProviderCountCalcEvent
274 static const char *qgisUnitTypes[];
299 return QString::number( a,
'f', 17 ).remove( QRegExp(
"\\.?0+$" ) );
305 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * DBL_EPSILON )
307 const double diff = a - b;
308 return diff > -epsilon && diff <= epsilon;
322 double ar = frexp( a, &aexp );
323 double br = frexp( b, &bexp );
325 return aexp == bexp &&
326 qRound( ar * pow( 10.0, significantDigits ) ) == qRound( br * pow( 10.0, significantDigits ) ) ;
352 void CORE_EXPORT
qgsFree(
void *ptr );
357 extern CORE_EXPORT
const QString
GEOWKT;
361 extern CORE_EXPORT
const QString
GEOPROJ4;
382 extern CORE_EXPORT
const QString
GEO_NONE;
410 # define QGISEXTERN extern "C" __declspec( dllexport )
413 # pragma warning(disable:4190)
416 # define QGISEXTERN extern "C"