QGIS API Documentation  2.12.0-Lyon
Macros | Functions | Variables
qgis.cpp File Reference
#include "qgis.h"
#include "qgsversion.h"
#include <QCoreApplication>
#include <QColor>
#include <QDate>
#include <QTime>
#include <QLocale>
#include <QDateTime>
#include "qgsconfig.h"
#include "qgslogger.h"
#include "geometry/qgswkbtypes.h"
#include <ogr_api.h>
Include dependency graph for qgis.cpp:

Go to the source code of this file.

Macros

#define DEGREE_TO_METER   111319.49079327358
 
#define FEET_TO_METER   0.3048
 
#define NMILE_TO_METER   1852.0
 

Functions

void * 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 allocated memory. More...
 
void qgsFree (void *ptr)
 Frees the memory space pointed to by ptr. More...
 
void * qgsMalloc (size_t size)
 Allocates size bytes and returns a pointer to the allocated memory. More...
 
bool qgsVariantGreaterThan (const QVariant &lhs, const QVariant &rhs)
 
bool qgsVariantLessThan (const QVariant &lhs, const QVariant &rhs)
 
QString qgsVsiPrefix (const QString &path)
 

Variables

const QString GEO_EPSG_CRS_AUTHID = "EPSG:4326"
 Geographic coord sys from EPSG authority. More...
 
const QString GEO_NONE = "NONE"
 Constant that holds the string representation for "No ellips/No CRS". More...
 
const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
 PROJ4 string that represents a geographic coord sys. More...
 
const QString GEOWKT
 Wkt string that represents a geographic coord sys. More...
 
const QString PROJECT_SCALES
 

Macro Definition Documentation

#define DEGREE_TO_METER   111319.49079327358
#define FEET_TO_METER   0.3048
#define NMILE_TO_METER   1852.0

Function Documentation

void* 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 allocated memory.

Works like C calloc() but prints debug message by QgsLogger if allocation fails.

Parameters
nmembnumber of elements
sizesize of element in bytes

Definition at line 268 of file qgis.cpp.

void qgsFree ( void *  ptr)

Frees the memory space pointed to by ptr.

Works like C free().

Parameters
ptrpointer to memory space

Definition at line 283 of file qgis.cpp.

void* qgsMalloc ( size_t  size)

Allocates size bytes and returns a pointer to the allocated memory.

Works like C malloc() but prints debug message by QgsLogger if allocation fails.

Parameters
sizesize in bytes

Definition at line 253 of file qgis.cpp.

bool qgsVariantGreaterThan ( const QVariant lhs,
const QVariant rhs 
)

Definition at line 315 of file qgis.cpp.

bool qgsVariantLessThan ( const QVariant lhs,
const QVariant rhs 
)

Definition at line 288 of file qgis.cpp.

QString qgsVsiPrefix ( const QString path)

Definition at line 320 of file qgis.cpp.

Variable Documentation

const QString GEO_EPSG_CRS_AUTHID = "EPSG:4326"

Geographic coord sys from EPSG authority.

Definition at line 73 of file qgis.cpp.

const QString GEO_NONE = "NONE"

Constant that holds the string representation for "No ellips/No CRS".

Definition at line 75 of file qgis.cpp.

const QString GEOPROJ4 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"

PROJ4 string that represents a geographic coord sys.

Definition at line 53 of file qgis.cpp.

const QString GEOWKT
Initial value:
=
"GEOGCS[\"WGS 84\", "
" DATUM[\"WGS_1984\", "
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
" AUTHORITY[\"EPSG\",7030]], "
" TOWGS84[0,0,0,0,0,0,0], "
" AUTHORITY[\"EPSG\",6326]], "
" PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",8901]], "
" UNIT[\"DMSH\",0.0174532925199433,AUTHORITY[\"EPSG\",9108]], "
" AXIS[\"Lat\",NORTH], "
" AXIS[\"Long\",EAST], "
" AUTHORITY[\"EPSG\",4326]]"

Wkt string that represents a geographic coord sys.

Note
added to replace GEOWkt

Definition at line 56 of file qgis.cpp.

const QString PROJECT_SCALES
Initial value:
=
"1:1000000,1:500000,1:250000,1:100000,1:50000,1:25000,"
"1:10000,1:5000,1:2500,1:1000,1:500"

Definition at line 69 of file qgis.cpp.