|
373 | 373 | @test coordinates(m) === points |
374 | 374 |
|
375 | 375 | linestring = LineString(Point{2, Int}[(10, 10), (20, 20), (10, 40)]) |
376 | | - @test decompose(Point{2, Int}, linestring) == Point{2, Int64}[[10, 10], [20, 20], [10, 40]] |
| 376 | + pts = Point{2, Int}[(10, 10), (20, 20), (10, 40)] |
| 377 | + linestring = LineString(pts) |
| 378 | + pts_decomp = decompose(Point{2, Int}, linestring) |
| 379 | + @test pts === pts_decomp |
| 380 | + |
| 381 | + pts_ext = Point{2, Int}[(5, 1), (3, 3), (4, 8), (1, 2), (5, 1)] |
| 382 | + ls_ext = LineString(pts_ext) |
| 383 | + pts_int1 = Point{2, Int}[(2, 2), (3, 8),(5, 6), (3, 4), (2, 2)] |
| 384 | + ls_int1 = LineString(pts_int1) |
| 385 | + pts_int2 = Point{2, Int}[(3, 2), (4, 5),(6, 1), (1, 4), (3, 2)] |
| 386 | + ls_int2 = LineString(pts_int2) |
| 387 | + poly_ext = Polygon(ls_ext) |
| 388 | + poly_ext_int = Polygon(ls_ext, [ls_int1, ls_int2]) |
| 389 | + @test decompose(Point{2, Int}, poly_ext) == pts_ext |
| 390 | + @test decompose(Point{2, Int}, poly_ext_int) == [pts_ext..., pts_int1..., pts_int2...] |
377 | 391 | end |
378 | 392 |
|
379 | 393 | @testset "convert mesh + meta" begin |
|
0 commit comments