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 WKBPoint25D:
return WKBPoint;
90 case WKBLineString25D:
return WKBLineString;
91 case WKBPolygon25D:
return WKBPolygon;
92 case WKBMultiPoint25D:
return WKBMultiPoint;
93 case WKBMultiLineString25D:
return WKBMultiLineString;
94 case WKBMultiPolygon25D:
return WKBMultiPolygon;
103 case WKBUnknown:
return 0;
104 case WKBNoGeometry:
return 0;
105 case WKBPoint25D:
return 3;
106 case WKBLineString25D:
return 3;
107 case WKBPolygon25D:
return 3;
108 case WKBMultiPoint25D:
return 3;
109 case WKBMultiLineString25D:
return 3;
110 case WKBMultiPolygon25D:
return 3;
129 case Point:
return "Point";
130 case Line:
return "Line";
131 case Polygon:
return "Polygon";
132 case UnknownGeometry:
return "Unknown geometry";
133 case NoGeometry:
return "No geometry";
134 default:
return "Invalid type";
143 case WKBUnknown:
return "WKBUnknown";
144 case WKBPoint:
return "WKBPoint";
145 case WKBLineString:
return "WKBLineString";
146 case WKBPolygon:
return "WKBPolygon";
147 case WKBMultiPoint:
return "WKBMultiLineString";
148 case WKBMultiPolygon:
return "WKBMultiPolygon";
149 case WKBNoGeometry:
return "WKBNoGeometry";
150 case WKBPoint25D:
return "WKBPoint25D";
151 case WKBLineString25D:
return "WKBLineString25D";
152 case WKBPolygon25D:
return "WKBPolygon25D";
153 case WKBMultiPoint25D:
return "WKBMultiPoint25D";
154 case WKBMultiLineString25D:
return "WKBMultiLineString25D";
155 case WKBMultiPolygon25D:
return "WKBMultiPolygon25D";
156 default:
return "invalid wkbtype";
164 { 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
197 DegreesMinutesSeconds = 2,
198 DegreesDecimalMinutes = 2,
206 static UnitType fromLiteral( QString literal,
QGis::UnitType defaultType = UnknownUnit );
217 ProviderExtentCalcEvent = ( QEvent::User + 1 ),
220 ProviderCountCalcEvent
227 static const char *qgisUnitTypes[];
252 return QString::number( a,
'f', 17 ).remove( QRegExp(
"\\.?0+$" ) );
258 inline bool qgsDoubleNear(
double a,
double b,
double epsilon = 4 * DBL_EPSILON )
260 const double diff = a - b;
261 return diff > -epsilon && diff <= epsilon;
275 double ar = frexp( a, &aexp );
276 double br = frexp( b, &bexp );
278 return aexp == bexp &&
279 qRound( ar * pow( 10.0, significantDigits ) ) == qRound( br * pow( 10.0, significantDigits ) ) ;
303 void CORE_EXPORT
qgsFree(
void *ptr );
308 extern CORE_EXPORT
const QString
GEOWKT;
312 extern CORE_EXPORT
const QString
GEOPROJ4;
333 extern CORE_EXPORT
const QString
GEO_NONE;
353 # define QGISEXTERN extern "C" __declspec( dllexport )
356 # pragma warning(disable:4190)
359 # define QGISEXTERN extern "C"
static WkbType singleType(WkbType type)
static const char * QGIS_VERSION
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
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)
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=".
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.
static const char * QGIS_RELEASE_NAME
const double DEFAULT_POINT_SIZE
Magic number that determines the default point size for point symbols.
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=".
static const int QGIS_VERSION_INT
void CORE_EXPORT * qgsMalloc(size_t size)
Allocates size bytes and returns a pointer to the allocated memory.
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.
CORE_EXPORT const QString GEOWKT
Wkt string that represents a geographic coord sys.
static const char * featureType(WkbType type)
description strings for feature types