@@ -10,70 +10,70 @@ GeoInterface.isgeometry(::Type{<:AbstractVector{<:AbstractPolygon}}) = true
1010GeoInterface. isgeometry (:: Type{<:AbstractVector{<:AbstractFace}} ) = true
1111GeoInterface. isgeometry (:: Type{<:Mesh} ) = true
1212
13- GeoInterface. geomtrait (:: Point ) = GeoInterface . PointTrait ()
14- GeoInterface. geomtrait (:: Line ) = GeoInterface . LineTrait ()
15- GeoInterface. geomtrait (:: LineString ) = GeoInterface . LineStringTrait ()
16- GeoInterface. geomtrait (:: Polygon ) = GeoInterface . PolygonTrait ()
17- GeoInterface. geomtrait (:: MultiPoint ) = GeoInterface . MultiPointTrait ()
18- GeoInterface. geomtrait (:: MultiLineString ) = GeoInterface . MultiLineStringTrait ()
19- GeoInterface. geomtrait (:: MultiPolygon ) = GeoInterface . MultiPolygonTrait ()
20- GeoInterface. geomtrait (:: Ngon ) = GeoInterface . PolygonTrait ()
21- GeoInterface. geomtrait (:: AbstractMesh ) = GeoInterface . PolyhedralSurfaceTrait ()
13+ GeoInterface. geomtrait (:: Point ) = PointTrait ()
14+ GeoInterface. geomtrait (:: Line ) = LineTrait ()
15+ GeoInterface. geomtrait (:: LineString ) = LineStringTrait ()
16+ GeoInterface. geomtrait (:: Polygon ) = PolygonTrait ()
17+ GeoInterface. geomtrait (:: MultiPoint ) = MultiPointTrait ()
18+ GeoInterface. geomtrait (:: MultiLineString ) = MultiLineStringTrait ()
19+ GeoInterface. geomtrait (:: MultiPolygon ) = MultiPolygonTrait ()
20+ GeoInterface. geomtrait (:: Ngon ) = PolygonTrait ()
21+ GeoInterface. geomtrait (:: AbstractMesh ) = PolyhedralSurfaceTrait ()
2222
23- GeoInterface. geomtrait (:: Simplex{Dim,T,1} ) where {Dim,T} = GeoInterface . PointTrait ()
24- GeoInterface. geomtrait (:: Simplex{Dim,T,2} ) where {Dim,T} = GeoInterface . LineStringTrait ()
25- GeoInterface. geomtrait (:: Simplex{Dim,T,3} ) where {Dim,T} = GeoInterface . PolygonTrait ()
23+ GeoInterface. geomtrait (:: Simplex{Dim,T,1} ) where {Dim,T} = PointTrait ()
24+ GeoInterface. geomtrait (:: Simplex{Dim,T,2} ) where {Dim,T} = LineStringTrait ()
25+ GeoInterface. geomtrait (:: Simplex{Dim,T,3} ) where {Dim,T} = PolygonTrait ()
2626
27- GeoInterface. ncoord (:: GeoInterface. PointTrait , g:: Point ) = length (g)
28- GeoInterface. getcoord (:: GeoInterface. PointTrait , g:: Point , i:: Int ) = g[i]
27+ GeoInterface. ncoord (:: PointTrait , g:: Point ) = length (g)
28+ GeoInterface. getcoord (:: PointTrait , g:: Point , i:: Int ) = g[i]
2929
30- GeoInterface. ngeom (:: GeoInterface. LineTrait , g:: Line ) = length (g)
31- GeoInterface. getgeom (:: GeoInterface. LineTrait , g:: Line , i:: Int ) = g[i]
30+ GeoInterface. ngeom (:: LineTrait , g:: Line ) = length (g)
31+ GeoInterface. getgeom (:: LineTrait , g:: Line , i:: Int ) = g[i]
3232
33- GeoInterface. ngeom (:: GeoInterface. LineStringTrait , g:: LineString ) = length (g) + 1 # n line segments + 1
34- function GeoInterface. getgeom (:: GeoInterface. LineStringTrait , g:: LineString , i:: Int )
33+ GeoInterface. ngeom (:: LineStringTrait , g:: LineString ) = length (g) + 1 # n line segments + 1
34+ function GeoInterface. getgeom (:: LineStringTrait , g:: LineString , i:: Int )
3535 return GeometryBasics. coordinates (g)[i]
3636end
3737
38- GeoInterface. ngeom (:: GeoInterface. PolygonTrait , g:: Polygon ) = length (g. interiors) + 1 # +1 for exterior
39- function GeoInterface. getgeom (:: GeoInterface. PolygonTrait ,
38+ GeoInterface. ngeom (:: PolygonTrait , g:: Polygon ) = length (g. interiors) + 1 # +1 for exterior
39+ function GeoInterface. getgeom (:: PolygonTrait ,
4040 g:: Polygon ,
4141 i:: Int ):: typeof (g. exterior)
4242 return i > 1 ? g. interiors[i - 1 ] : g. exterior
4343end
4444
45- GeoInterface. ngeom (:: GeoInterface. MultiPointTrait , g:: MultiPoint ) = length (g)
46- GeoInterface. getgeom (:: GeoInterface. MultiPointTrait , g:: MultiPoint , i:: Int ) = g[i]
45+ GeoInterface. ngeom (:: MultiPointTrait , g:: MultiPoint ) = length (g)
46+ GeoInterface. getgeom (:: MultiPointTrait , g:: MultiPoint , i:: Int ) = g[i]
4747
48- function GeoInterface. ngeom (:: GeoInterface. MultiLineStringTrait , g:: MultiLineString )
48+ function GeoInterface. ngeom (:: MultiLineStringTrait , g:: MultiLineString )
4949 return length (g)
5050end
51- function GeoInterface. getgeom (:: GeoInterface. MultiLineStringTrait , g:: MultiLineString ,
51+ function GeoInterface. getgeom (:: MultiLineStringTrait , g:: MultiLineString ,
5252 i:: Int )
5353 return g[i]
5454end
5555
56- GeoInterface. ngeom (:: GeoInterface. MultiPolygonTrait , g:: MultiPolygon ) = length (g)
57- GeoInterface. getgeom (:: GeoInterface. MultiPolygonTrait , g:: MultiPolygon , i:: Int ) = g[i]
56+ GeoInterface. ngeom (:: MultiPolygonTrait , g:: MultiPolygon ) = length (g)
57+ GeoInterface. getgeom (:: MultiPolygonTrait , g:: MultiPolygon , i:: Int ) = g[i]
5858
59- function GeoInterface. ncoord (:: GeoInterface. AbstractGeometryTrait ,
59+ function GeoInterface. ncoord (:: AbstractGeometryTrait ,
6060 :: Simplex{Dim,T,N,P} ) where {Dim,T,N,P}
6161 return Dim
6262end
63- function GeoInterface. ncoord (:: GeoInterface. AbstractGeometryTrait ,
63+ function GeoInterface. ncoord (:: AbstractGeometryTrait ,
6464 :: AbstractGeometry{Dim,T} ) where {Dim,T}
6565 return Dim
6666end
67- function GeoInterface. ngeom (:: GeoInterface. AbstractGeometryTrait ,
67+ function GeoInterface. ngeom (:: AbstractGeometryTrait ,
6868 :: Simplex{Dim,T,N,P} ) where {Dim,T,N,P}
6969 return N
7070end
71- GeoInterface. ngeom (:: GeoInterface. PolygonTrait , :: Ngon ) = 1 # can't have any holes
72- GeoInterface. getgeom (:: GeoInterface. PolygonTrait , g:: Ngon , _) = LineString (g. points)
71+ GeoInterface. ngeom (:: PolygonTrait , :: Ngon ) = 1 # can't have any holes
72+ GeoInterface. getgeom (:: PolygonTrait , g:: Ngon , _) = LineString (g. points)
7373
74- function GeoInterface. ncoord (:: GeoInterface. PolyhedralSurfaceTrait ,
74+ function GeoInterface. ncoord (:: PolyhedralSurfaceTrait ,
7575 :: Mesh{Dim,T,E,V} where {Dim,T,E,V})
7676 return Dim
7777end
78- GeoInterface. ngeom (:: GeoInterface. PolyhedralSurfaceTrait , g:: AbstractMesh ) = length (g)
79- GeoInterface. getgeom (:: GeoInterface. PolyhedralSurfaceTrait , g:: AbstractMesh , i) = g[i]
78+ GeoInterface. ngeom (:: PolyhedralSurfaceTrait , g:: AbstractMesh ) = length (g)
79+ GeoInterface. getgeom (:: PolyhedralSurfaceTrait , g:: AbstractMesh , i) = g[i]
0 commit comments