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";
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
293 static const char *qgisUnitTypes[];
318 return QString::number( a,
'f', 17 ).remove( QRegExp(
"\\.?0+$" ) );
324 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * DBL_EPSILON )
326 const double diff = a - b;
327 return diff > -epsilon && diff <= epsilon;
341 double ar = frexp( a, &aexp );
342 double br = frexp( b, &bexp );
344 return aexp == bexp &&
345 qRound( ar * pow( 10.0, significantDigits ) ) == qRound( br * pow( 10.0, significantDigits ) ) ;
371 void CORE_EXPORT
qgsFree(
void *ptr );
376 extern CORE_EXPORT
const QString
GEOWKT;
380 extern CORE_EXPORT
const QString
GEOPROJ4;
401 extern CORE_EXPORT
const QString
GEO_NONE;
426 #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) || defined(__clang__)
427 #define Q_NOWARN_DEPRECATED_PUSH \
428 _Pragma("GCC diagnostic push") \
429 _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
430 #define Q_NOWARN_DEPRECATED_POP \
431 _Pragma("GCC diagnostic pop")
432 #elif defined(_MSC_VER)
433 #define Q_NOWARN_DEPRECATED_PUSH \
434 __pragma(warning(push)) \
435 __pragma(warning(disable:4996))
436 #define Q_NOWARN_DEPRECATED_POP \
437 __pragma(warning(pop))
439 #define Q_NOWARN_DEPRECATED_PUSH
440 #define Q_NOWARN_DEPRECATED_POP
446 # define QGISEXTERN extern "C" __declspec( dllexport )
449 # pragma warning(disable:4190)
452 # define QGISEXTERN extern "C"
static WkbType singleType(WkbType type)
static const char * QGIS_VERSION
static double DEFAULT_HIGHLIGHT_BUFFER_MM
Default highlight buffer in mm.
static const QColor DEFAULT_HIGHLIGHT_COLOR
Default highlight color.
QString qgsDoubleToString(const double &a)
static const char * vectorGeometryType(GeometryType type)
description strings for geometry types
WkbType
Used for symbology operations.
static const double DEFAULT_IDENTIFY_RADIUS
Old search radius in % of canvas width.
The QGis class provides global constants for use throughout the application.
void CORE_EXPORT * qgsCalloc(size_t nmemb, size_t size)
Allocates memory for an array of nmemb elements of size bytes each and returns a pointer to the alloc...
QMap< QString, QString > QgsStringMap
bool qgsDoubleNear(double a, double b, double epsilon=4 *DBL_EPSILON)
bool qgsVariantLessThan(const QVariant &lhs, const QVariant &rhs)
static WkbType flatType(WkbType type)
static bool isSingleType(WkbType type)
CORE_EXPORT const QString GEO_NONE
Constant that holds the string representation for "No ellips/No CRS".
const double DEFAULT_SEGMENT_EPSILON
default snapping tolerance for segments (
static const char * QGIS_DEV_VERSION
const int ELLPS_PREFIX_LEN
The length of the string "+ellps=".
static const float DEFAULT_MAPTOPIXEL_THRESHOLD
Default threshold between map coordinates and device coordinates for map2pixel simplification.
const long GEOCRS_ID
Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id.
CORE_EXPORT const QString GEOPROJ4
PROJ4 string that represents a geographic coord sys.
void CORE_EXPORT qgsFree(void *ptr)
Frees the memory space pointed to by ptr.
UserEvent
User defined event types.
unsigned long long qgssize
qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
static const double DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
static const char * QGIS_RELEASE_NAME
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
static bool isMultiType(WkbType type)
static int wkbDimensions(WkbType type)
const int USER_CRS_START_ID
Magick number that determines whether a projection crsid is a system (srs.db) or user (~/...
const long GEOSRID
Magic number for a geographic coord sys in POSTGIS SRID.
const double MINIMUM_POINT_SIZE
Magic number that determines the minimum allowable point size for point symbols.
bool qgsDoubleNearSig(double a, double b, int significantDigits=10)
const double DEFAULT_LINE_WIDTH
CORE_EXPORT const QString PROJECT_SCALES
DataType
Raster data types.
const int LAT_PREFIX_LEN
The length of the string "+lat_1=".
UnitType
Map units that qgis supports.
void(*)() cast_to_fptr(void *p)
const int PROJ_PREFIX_LEN
The length of the string "+proj=".
QString qgsVsiPrefix(QString path)
static const int QGIS_VERSION_INT
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
static double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM
Default highlight line/outline minimum width in mm.
bool qgsVariantGreaterThan(const QVariant &lhs, const QVariant &rhs)
const long GEO_EPSG_CRS_ID
Magic number for a geographic coord sys in EpsgCrsId ID format.
CORE_EXPORT const QString GEO_EPSG_CRS_AUTHID
Geographic coord sys from EPSG authority.
static WkbType multiType(WkbType type)
CORE_EXPORT const QString GEOWKT
Wkt string that represents a geographic coord sys.
static const char * featureType(WkbType type)
description strings for feature types