Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update SIP files
  • Loading branch information
alexbruy authored and 3nids committed May 4, 2017
1 parent b295fcc commit 31cd113
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
48 changes: 24 additions & 24 deletions python/analysis/network/qgsgraphanalyzer.sip
Expand Up @@ -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 );
Expand Down
6 changes: 1 addition & 5 deletions python/analysis/network/qgsgraphbuilderinterface.sip
Expand Up @@ -32,18 +32,14 @@ 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
\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
%End
: mCrs( crs );
%Docstring
:rtype: :
%End

virtual ~QgsGraphBuilderInterface();

Expand Down

0 comments on commit 31cd113

Please sign in to comment.