/usr/include/qgis/qgsgeometryfactory.h is in libqgis-dev 2.18.17+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /***************************************************************************
qgsgeometryfactory.h
-----------------------
begin : September 2014
copyright : (C) 2014 by Marco Hugentobler
email : marco at sourcepole dot ch
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSGEOMETRYFACTORY_H
#define QGSGEOMETRYFACTORY_H
#include "qgsrectangle.h"
#include "qgswkbtypes.h"
#include "qgswkbptr.h"
#include <QString>
class QgsAbstractGeometryV2;
class QgsLineStringV2;
//compatibility with old classes
#include "qgspoint.h"
typedef QVector<QgsPoint> QgsPolyline;
typedef QVector<QgsPolyline> QgsPolygon;
typedef QVector<QgsPoint> QgsMultiPoint;
typedef QVector<QgsPolyline> QgsMultiPolyline;
typedef QVector<QgsPolygon> QgsMultiPolygon;
/** \ingroup core
* \class QgsGeometryFactory
* \brief Contains geometry creation routines.
* \note added in QGIS 2.10
* \note this API is not considered stable and may change for 2.12
* \note not available in Python bindings
*/
class CORE_EXPORT QgsGeometryFactory
{
public:
/** Construct geometry from a WKB string.
*/
static QgsAbstractGeometryV2* geomFromWkb( QgsConstWkbPtr wkb );
/** Construct geometry from a WKT string.
*/
static QgsAbstractGeometryV2* geomFromWkt( const QString& text );
/** Construct geometry from a point */
static QgsAbstractGeometryV2* fromPoint( const QgsPoint& point );
/** Construct geometry from a multipoint */
static QgsAbstractGeometryV2* fromMultiPoint( const QgsMultiPoint& multipoint );
/** Construct geometry from a polyline */
static QgsAbstractGeometryV2* fromPolyline( const QgsPolyline& polyline );
/** Construct geometry from a multipolyline*/
static QgsAbstractGeometryV2* fromMultiPolyline( const QgsMultiPolyline& multiline );
/** Construct geometry from a polygon */
static QgsAbstractGeometryV2* fromPolygon( const QgsPolygon& polygon );
/** Construct geometry from a multipolygon */
static QgsAbstractGeometryV2* fromMultiPolygon( const QgsMultiPolygon& multipoly );
/** Construct geometry from a rectangle */
static QgsAbstractGeometryV2* fromRect( const QgsRectangle& rect );
/** Return empty geometry from wkb type*/
static QgsAbstractGeometryV2* geomFromWkbType( QgsWKBTypes::Type t );
private:
static QgsLineStringV2* linestringFromPolyline( const QgsPolyline& polyline );
};
#endif // QGSGEOMETRYFACTORY_H
|