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 ce017e7 commit dd9d8d2Copy full SHA for dd9d8d2
src/geos_functions.jl
@@ -1102,6 +1102,9 @@ end
1102
# Return NULL on exception, Geometry must be a Polygon.
1103
# Returned object is a pointer to internal storage: it must NOT be destroyed directly.
1104
function interiorRing(ptr::GEOSGeom, n::Integer, context::GEOSContext = _context)
1105
+ if !(0 < n <= numInteriorRings(ptr, context))
1106
+ error("LibGEOS: n=$n is out of bounds for Polygon with $(numInteriorRings(ptr, context)) interior ring(s)")
1107
+ end
1108
result = GEOSGetInteriorRingN_r(context.ptr, ptr, n - 1)
1109
if result == C_NULL
1110
error("LibGEOS: Error in GEOSGetInteriorRingN")
0 commit comments