Skip to content
Permalink
Browse files

support 25D layers in network analysis library (fix #11952)

  • Loading branch information
alexbruy committed Jun 23, 2016
1 parent 70b9296 commit 904dc216251d183305ba1c5dc6c846be10a879db
Showing with 2 additions and 3 deletions.
  1. +0 −1 src/analysis/network/qgsgraph.cpp
  2. +2 −2 src/analysis/network/qgslinevectorlayerdirector.cpp
@@ -52,7 +52,6 @@ const QgsGraphArc& QgsGraph::arc( int idx ) const
return mGraphArc[ idx ];
}


int QgsGraph::vertexCount() const
{
return mGraphVertexes.size();
@@ -162,9 +162,9 @@ void QgsLineVectorLayerDirector::makeGraph( QgsGraphBuilderInterface *builder, c
while ( fit.nextFeature( feature ) )
{
QgsMultiPolyline mpl;
if ( feature.constGeometry()->wkbType() == QGis::WKBMultiLineString )
if ( feature.constGeometry()->wkbType() == QGis::WKBMultiLineString || feature.constGeometry()->wkbType() == QGis::WKBMultiLineString25D )
mpl = feature.constGeometry()->asMultiPolyline();
else if ( feature.constGeometry()->wkbType() == QGis::WKBLineString )
else if ( feature.constGeometry()->wkbType() == QGis::WKBLineString || feature.constGeometry()->wkbType() == QGis::WKBLineString25D )
mpl.push_back( feature.constGeometry()->asPolyline() );

QgsMultiPolyline::iterator mplIt;

3 comments on commit 904dc21

@m-kuhn

This comment has been minimized.

Copy link
Member

@m-kuhn m-kuhn replied Jun 23, 2016

Are you aware of this?

QgsWkbTypes.flatType( feature.constGeometry().geometry().wkbType() )
@m-kuhn

This comment has been minimized.

Copy link
Member

@m-kuhn m-kuhn replied Jun 23, 2016

This will also catch M and ZM type geometries and is easier to read

@alexbruy

This comment has been minimized.

Copy link
Contributor Author

@alexbruy alexbruy replied Jun 23, 2016

Thanks for the hint, I will fix it

Please sign in to comment.
You can’t perform that action at this time.