mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
update SIP files
This commit is contained in:
parent
b295fccc27
commit
31cd113b55
@ -33,32 +33,32 @@ class QgsGraphAnalyzer
|
|||||||
%End
|
%End
|
||||||
|
|
||||||
%MethodCode
|
%MethodCode
|
||||||
QVector< int > treeResult;
|
QVector< int > treeResult;
|
||||||
QVector< double > costResult;
|
QVector< double > costResult;
|
||||||
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );
|
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );
|
||||||
|
|
||||||
PyObject *l1 = PyList_New( treeResult.size() );
|
PyObject *l1 = PyList_New( treeResult.size() );
|
||||||
if ( l1 == NULL )
|
if ( l1 == NULL )
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
PyObject *l2 = PyList_New( costResult.size() );
|
PyObject *l2 = PyList_New( costResult.size() );
|
||||||
if ( l2 == NULL )
|
if ( l2 == NULL )
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
int i;
|
int i;
|
||||||
for ( i = 0; i < costResult.size(); ++i )
|
for ( i = 0; i < costResult.size(); ++i )
|
||||||
{
|
{
|
||||||
PyObject *Int = PyLong_FromLong( treeResult[i] );
|
PyObject *Int = PyLong_FromLong( treeResult[i] );
|
||||||
PyList_SET_ITEM( l1, i, Int );
|
PyList_SET_ITEM( l1, i, Int );
|
||||||
PyObject *Float = PyFloat_FromDouble( costResult[i] );
|
PyObject *Float = PyFloat_FromDouble( costResult[i] );
|
||||||
PyList_SET_ITEM( l2, i, Float );
|
PyList_SET_ITEM( l2, i, Float );
|
||||||
}
|
}
|
||||||
|
|
||||||
sipRes = PyTuple_New( 2 );
|
sipRes = PyTuple_New( 2 );
|
||||||
PyTuple_SET_ITEM( sipRes, 0, l1 );
|
PyTuple_SET_ITEM( sipRes, 0, l1 );
|
||||||
PyTuple_SET_ITEM( sipRes, 1, l2 );
|
PyTuple_SET_ITEM( sipRes, 1, l2 );
|
||||||
%End
|
%End
|
||||||
|
|
||||||
static QgsGraph *shortestTree( const QgsGraph *source, int startVertexIdx, int criterionNum );
|
static QgsGraph *shortestTree( const QgsGraph *source, int startVertexIdx, int criterionNum );
|
||||||
|
@ -32,7 +32,7 @@ class QgsGraphBuilderInterface
|
|||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" )
|
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
|
||||||
%Docstring
|
%Docstring
|
||||||
Default constructor
|
Default constructor
|
||||||
\param crs Coordinate reference system for new graph vertex
|
\param crs Coordinate reference system for new graph vertex
|
||||||
@ -40,10 +40,6 @@ class QgsGraphBuilderInterface
|
|||||||
\param topologyTolerance sqrt distance between source point as one graph vertex
|
\param topologyTolerance sqrt distance between source point as one graph vertex
|
||||||
\param ellipsoidID ellipsoid for edge measurement
|
\param ellipsoidID ellipsoid for edge measurement
|
||||||
%End
|
%End
|
||||||
: mCrs( crs );
|
|
||||||
%Docstring
|
|
||||||
:rtype: :
|
|
||||||
%End
|
|
||||||
|
|
||||||
virtual ~QgsGraphBuilderInterface();
|
virtual ~QgsGraphBuilderInterface();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user