Skip to content
Permalink
Browse files

GRASS: points removed from topo in GRASS 7

  • Loading branch information
blazek committed Nov 6, 2014
1 parent d8d9edb commit 7c52e7ddcea3996e25a9f9cd83489e8828cc54bb
@@ -919,7 +919,9 @@ QStringList GRASS_LIB_EXPORT QgsGrass::vectorLayers( QString gisdbase,
// add topology layers
if ( Vect_get_num_primitives( &map, GV_POINTS ) > 0 )
{
#if GRASS_VERSION_MAJOR < 7 /* no more point in GRASS 7 topo */
list.append( "topo_point" );
#endif
}
if ( Vect_get_num_primitives( &map, GV_LINES ) > 0 )
{
@@ -275,7 +275,12 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature )
else
{
feature.setAttribute( 0, id );
#if GRASS_VERSION_MAJOR < 7
if ( mSource->mLayerType == QgsGrassProvider::TOPO_POINT || mSource->mLayerType == QgsGrassProvider::TOPO_LINE )
#else
/* No more topo points in GRASS 7 */
if ( mSource->mLayerType == QgsGrassProvider::TOPO_LINE )
#endif
{
feature.setAttribute( 1, QgsGrassProvider::primitiveTypeName( type ) );

@@ -1401,7 +1401,13 @@ bool QgsGrassProvider::lineNodes( int line, int *node1, int *node2 )
return false;
}

#if GRASS_VERSION_MAJOR < 7
Vect_get_line_nodes( mMap, line, node1, node2 );
#else
/* points don't have topology in GRASS >= 7 */
*node1 = 0;
*node2 = 0;
#endif
return true;
}

0 comments on commit 7c52e7d

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