We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06305bc commit 358e434Copy full SHA for 358e434
src/core/qgsclipper.h
@@ -154,7 +154,18 @@ inline void QgsClipper::trimFeatureToBoundary(
154
155
// and compare to the first point initially.
156
for ( unsigned int i2 = 0; i2 < inX.size() ; ++i2 )
157
- { // look at each edge of the polygon in turn
+ {
158
+ // look at each edge of the polygon in turn
159
+
160
+ //ignore segments with nan or inf coordinates
161
+ if ( isnan( inX[i2] ) || isnan( inY[i2] ) || isinf( inX[i2] ) || isinf( inY[i2] )
162
+ || isnan( inX[i1] ) || isnan( inY[i1] ) || isinf( inX[i1] ) || isinf( inY[i1] ) )
163
164
+ i1 = i2;
165
+ continue;
166
+ }
167
168
169
if ( inside( inX[i2], inY[i2], b ) ) // end point of edge is inside boundary
170
{
171
if ( inside( inX[i1], inY[i1], b ) )
0 commit comments