Skip to content

Commit

Permalink
add tests for interiorRing
Browse files Browse the repository at this point in the history
  • Loading branch information
yeesian authored and visr committed Sep 4, 2022
1 parent ccfe4a7 commit 443006d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_geos_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ end
exterior = LibGEOS.exteriorRing(polygon)
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(exterior)) ==
Vector{Float64}[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(LibGEOS.interiorRing(polygon, 1))) ==
Vector{Float64}[[1, 8], [2, 8], [2, 9], [1, 9], [1, 8]]
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(LibGEOS.interiorRing(polygon, 2))) ==
Vector{Float64}[[8, 1], [9, 1], [9, 2], [8, 2], [8, 1]]
@test_throws ErrorException LibGEOS.interiorRing(polygon, 0)
@test_throws ErrorException LibGEOS.interiorRing(polygon, 3)
interiors = LibGEOS.interiorRings(polygon)
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(interiors[1])) ==
Vector{Float64}[[1, 8], [2, 8], [2, 9], [1, 9], [1, 8]]
Expand Down

0 comments on commit 443006d

Please sign in to comment.