mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
update SIP files
This commit is contained in:
parent
b295fccc27
commit
31cd113b55
@ -33,32 +33,32 @@ class QgsGraphAnalyzer
|
||||
%End
|
||||
|
||||
%MethodCode
|
||||
QVector< int > treeResult;
|
||||
QVector< double > costResult;
|
||||
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );
|
||||
QVector< int > treeResult;
|
||||
QVector< double > costResult;
|
||||
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );
|
||||
|
||||
PyObject *l1 = PyList_New( treeResult.size() );
|
||||
if ( l1 == NULL )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
PyObject *l2 = PyList_New( costResult.size() );
|
||||
if ( l2 == NULL )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
int i;
|
||||
for ( i = 0; i < costResult.size(); ++i )
|
||||
{
|
||||
PyObject *Int = PyLong_FromLong( treeResult[i] );
|
||||
PyList_SET_ITEM( l1, i, Int );
|
||||
PyObject *Float = PyFloat_FromDouble( costResult[i] );
|
||||
PyList_SET_ITEM( l2, i, Float );
|
||||
}
|
||||
PyObject *l1 = PyList_New( treeResult.size() );
|
||||
if ( l1 == NULL )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
PyObject *l2 = PyList_New( costResult.size() );
|
||||
if ( l2 == NULL )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
int i;
|
||||
for ( i = 0; i < costResult.size(); ++i )
|
||||
{
|
||||
PyObject *Int = PyLong_FromLong( treeResult[i] );
|
||||
PyList_SET_ITEM( l1, i, Int );
|
||||
PyObject *Float = PyFloat_FromDouble( costResult[i] );
|
||||
PyList_SET_ITEM( l2, i, Float );
|
||||
}
|
||||
|
||||
sipRes = PyTuple_New( 2 );
|
||||
PyTuple_SET_ITEM( sipRes, 0, l1 );
|
||||
PyTuple_SET_ITEM( sipRes, 1, l2 );
|
||||
sipRes = PyTuple_New( 2 );
|
||||
PyTuple_SET_ITEM( sipRes, 0, l1 );
|
||||
PyTuple_SET_ITEM( sipRes, 1, l2 );
|
||||
%End
|
||||
|
||||
static QgsGraph *shortestTree( const QgsGraph *source, int startVertexIdx, int criterionNum );
|
||||
|
@ -32,7 +32,7 @@ class QgsGraphBuilderInterface
|
||||
%End
|
||||
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
|
||||
Default constructor
|
||||
\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 ellipsoidID ellipsoid for edge measurement
|
||||
%End
|
||||
: mCrs( crs );
|
||||
%Docstring
|
||||
:rtype: :
|
||||
%End
|
||||
|
||||
virtual ~QgsGraphBuilderInterface();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user