/usr/include/qgis/qgsgraphbuilderintr.h is in libqgis-dev 2.8.6+dfsg-1build1.
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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | /***************************************************************************
qgsgraphbuilder.h
--------------------------------------
Date : 2010-10-22
Copyright : (C) 2010 by Yakushev Sergey
Email : YakushevS <at> list.ru
****************************************************************************
* *
* 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 QGSGRAPHBUILDERINTERFACE
#define QGSGRAPHBUILDERINTERFACE
//QT4 includes
#include <QVector>
#include <QVariant>
//QGIS includes
#include <qgspoint.h>
#include <qgscoordinatereferencesystem.h>
#include <qgsdistancearea.h>
//forward declarations
/**
* \ingroup networkanalysis
* \class QgsGraphBuilderInterface
* \brief Determine interface for creating a graph. Contains the settings of the graph. QgsGraphBuilder and QgsGraphDirector is a Builder pattern
*/
class ANALYSIS_EXPORT QgsGraphBuilderInterface
{
public:
/**
* QgsGraphBuilderInterface constructor
* @param crs Coordinate reference system for new graph vertex
* @param ctfEnabled enable coordinate transform from source graph CRS to CRS graph
* @param topologyTolerance sqrt distance between source point as one graph vertex
* @param ellipsoidID ellipsoid for edge measurement
*/
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" ) :
mCrs( crs ), mCtfEnabled( ctfEnabled ), mTopologyTolerance( topologyTolerance )
{
mDa.setSourceCrs( mCrs.srsid() );
mDa.setEllipsoid( ellipsoidID );
mDa.setEllipsoidalMode( ctfEnabled );
}
//! Destructor
virtual ~QgsGraphBuilderInterface()
{ }
//! get destinaltion Crs
QgsCoordinateReferenceSystem& destinationCrs()
{
return mCrs;
}
//! get coordinate transformation enabled
bool coordinateTransformationEnabled()
{
return mCtfEnabled;
}
//! get topology tolerance
double topologyTolerance()
{
return mTopologyTolerance;
}
//! get measurement tool
QgsDistanceArea* distanceArea()
{
return &mDa;
}
/**
* add vertex
* @param id vertex identifier
* @param pt vertex coordinate
* @note id and pt are redundant. You can use pt or id to identify the vertex
*/
virtual void addVertex( int id, const QgsPoint &pt )
{
Q_UNUSED( id );
Q_UNUSED( pt );
}
/**
* add arc
* @param pt1id first vertex identificator
* @param pt1 first vertex coordinate
* @param pt2id second vertex identificator
* @param pt2 second vertex coordinate
* @param properties arc properties
* @note pt1id, pt1 and pt2id, pt2 is a redundant interface. You can use vertex coordinates or their identificators.
*/
virtual void addArc( int pt1id, const QgsPoint& pt1, int pt2id, const QgsPoint& pt2, const QVector< QVariant >& properties )
{
Q_UNUSED( pt1id );
Q_UNUSED( pt1 );
Q_UNUSED( pt2id );
Q_UNUSED( pt2 );
Q_UNUSED( properties );
}
private:
QgsCoordinateReferenceSystem mCrs;
QgsDistanceArea mDa;
bool mCtfEnabled;
double mTopologyTolerance;
};
#endif //QGSGRAPHBUILDERINTERFACE
|