Skip to content

Commit 29d1e70

Browse files
committed
fix GeoInterface for Polygon
1 parent b76616d commit 29d1e70

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
version:
15-
- '1.7'
1615
- '1' # automatically expands to the latest stable 1.x release of Julia
1716
- 'nightly'
1817
os:

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
1010
XML = "72c71f33-b9b6-44de-8c94-c961784809e2"
1111

1212
[compat]
13-
GeoInterface = "1"
13+
GeoInterface = "1.3"
1414
OrderedCollections = "1"
1515
XML = "0.3.0"
1616
julia = "1"

src/KML.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ end
392392
GeoInterface.geomtrait(o::Polygon) = GeoInterface.PolygonTrait()
393393
GeoInterface.ngeom(::GeoInterface.PolygonTrait, o::Polygon) = 1 + length(o.innerBoundaryIs)
394394
GeoInterface.getgeom(::GeoInterface.PolygonTrait, o::Polygon, i) = i == 1 ? o.outerBoundaryIs : o.innerBoundaryIs[i-1]
395+
GeoInterface.ncoord(::GeoInterface.PolygonTrait, o::Polygon) = length(first(o.outerBoundaryIs.coordinates))
395396

396397
#-----------------------------------------------------------------------------# MultiGeometry <: Geometry
397398
Base.@kwdef mutable struct MultiGeometry <: Geometry

0 commit comments

Comments
 (0)