Skip to content

Commit

Permalink
Handle GEOS >= 9.3 and mention it in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Nov 29, 2021
1 parent e8a7a1d commit 4e4bade
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion resources/function_help/json/overlay_intersects
Expand Up @@ -36,7 +36,7 @@
},
{
"arg": "min_inscribed_circle_radius",
"description": "for polygons only an optional minimum radius in current feature units for the maximum inscribed circle of the intersection (if the intersection results in multiple polygons the intersection will be returned if at least one of the polygons has a radius for the maximum inscribed circle greater or equal to the value).<br>Read more on the underlying GEOS predicate, as described in PostGIS <a href='https://postgis.net/docs/ST_MaximumInscribedCircle.html'>ST_MaximumInscribedCircle</a> function.",
"description": "for polygons only an optional minimum radius in current feature units for the maximum inscribed circle of the intersection (if the intersection results in multiple polygons the intersection will be returned if at least one of the polygons has a radius for the maximum inscribed circle greater or equal to the value).<br>Read more on the underlying GEOS predicate, as described in PostGIS <a href='https://postgis.net/docs/ST_MaximumInscribedCircle.html'>ST_MaximumInscribedCircle</a> function.<br>This argument requires GEOS >= 3.9.",
"optional": true
}
],
Expand Down
7 changes: 7 additions & 0 deletions src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -6629,6 +6629,13 @@ static QVariant executeGeomOverlay( const QVariantList &values, const QgsExpress
const QVariant minInscribedCircleRadiusValue = node->eval( parent, context );
ENSURE_NO_EVAL_ERROR
minInscribedCircleRadius = QgsExpressionUtils::getDoubleValue( minInscribedCircleRadiusValue, parent );
#if GEOS_VERSION_MAJOR==3 && GEOS_VERSION_MINOR<9
if ( minInscribedCircleRadiusValue != -1 )
{
parent->setEvalErrorString( QObject::tr( "'min_inscribed_circle_radius' is only available when QGIS is built with GEOS >= 3.9." ) );
return QVariant();
}
#endif
}


Expand Down

0 comments on commit 4e4bade

Please sign in to comment.