@@ -15,7 +15,7 @@ Last but not least, we also provide an interface for features--geometries with p
1515
1616``` julia
1717GeoInterface. isgeometry (geom:: customgeom ):: Bool = true
18- GeoInterface. geomtype (geom:: customgeom ):: DataType = GeoInterface . XTrait () # <: AbstractGeometryTrait
18+ GeoInterface. geomtype (geom:: customgeom ):: DataType = XTrait () # <: AbstractGeometryTrait
1919# for PointTraits
2020GeoInterface. ncoord (geomtype (geom), geom:: customgeom ):: Integer
2121GeoInterface. getcoord (geomtype (geom), geom:: customgeom , i):: Real
@@ -93,79 +93,79 @@ GeoInterface.isgeometry(geom::customgeom)::Bool = true
9393
9494A ` geom::customgeom ` with "Point"-like traits implements
9595``` julia
96- GeoInterface. geomtype (geom:: customgeom ):: DataType = GeoInterface . PointTrait ()
97- GeoInterface. ncoord (:: GeoInterface. PointTrait , geom:: customgeom ):: Integer
98- GeoInterface. getcoord (:: GeoInterface. PointTrait , geom:: customgeom , i):: Real
96+ GeoInterface. geomtype (geom:: customgeom ):: DataType = PointTrait ()
97+ GeoInterface. ncoord (:: PointTrait , geom:: customgeom ):: Integer
98+ GeoInterface. getcoord (:: PointTrait , geom:: customgeom , i):: Real
9999
100100# Defaults
101- GeoInterface. ngeom (:: GeoInterface. PointTrait , geom):: Integer = 0
102- GeoInterface. getgeom (:: GeoInterface. PointTrait , geom:: customgeom , i) = nothing
101+ GeoInterface. ngeom (:: PointTrait , geom):: Integer = 0
102+ GeoInterface. getgeom (:: PointTrait , geom:: customgeom , i) = nothing
103103```
104104
105105A ` geom::customgeom ` with "LineString"-like traits implements the following methods:
106106``` julia
107- GeoInterface. geomtype (geom:: customgeom ):: DataType = GeoInterface . LineStringTrait ()
108- GeoInterface. ncoord (:: GeoInterface. LineStringTrait , geom:: customgeom ):: Integer
107+ GeoInterface. geomtype (geom:: customgeom ):: DataType = LineStringTrait ()
108+ GeoInterface. ncoord (:: LineStringTrait , geom:: customgeom ):: Integer
109109
110110# These alias for npoint and getpoint
111- GeoInterface. ngeom (:: GeoInterface. LineStringTrait , geom:: customgeom ):: Integer
112- GeoInterface. getgeom (:: GeoInterface. LineStringTrait , geom:: customgeom , i) # of geomtype Point
111+ GeoInterface. ngeom (:: LineStringTrait , geom:: customgeom ):: Integer
112+ GeoInterface. getgeom (:: LineStringTrait , geom:: customgeom , i) # of geomtype Point
113113
114114# Optional
115- GeoInterface. isclosed (:: GeoInterface. LineStringTrait , geom:: customgeom ):: Bool
116- GeoInterface. issimple (:: GeoInterface. LineStringTrait , geom:: customgeom ):: Bool
117- GeoInterface. length (:: GeoInterface. LineStringTrait , geom:: customgeom ):: Real
115+ GeoInterface. isclosed (:: LineStringTrait , geom:: customgeom ):: Bool
116+ GeoInterface. issimple (:: LineStringTrait , geom:: customgeom ):: Bool
117+ GeoInterface. length (:: LineStringTrait , geom:: customgeom ):: Real
118118```
119119A ` geom::customgeom ` with "Polygon"-like traits can implement the following methods:
120120``` julia
121- GeoInterface. geomtype (geom:: customgeom ):: DataType = GeoInterface . PolygonTrait ()
122- GeoInterface. ncoord (:: GeoInterface. PolygonTrait , geom:: customgeom ):: Integer
121+ GeoInterface. geomtype (geom:: customgeom ):: DataType = PolygonTrait ()
122+ GeoInterface. ncoord (:: PolygonTrait , geom:: customgeom ):: Integer
123123
124124# These alias for nring and getring
125- GeoInterface. ngeom (:: GeoInterface. PolygonTrait , geom:: customgeom ):: Integer
126- GeoInterface. getgeom (:: GeoInterface. PolygonTrait , geom:: customgeom , i): :" LineStringTrait"
125+ GeoInterface. ngeom (:: PolygonTrait , geom:: customgeom ):: Integer
126+ GeoInterface. getgeom (:: PolygonTrait , geom:: customgeom , i): :" LineStringTrait"
127127
128128# Optional
129- GeoInterface. area (:: GeoInterface. PolygonTrait , geom:: customgeom ):: Real
130- GeoInterface. centroid (:: GeoInterface. PolygonTrait , geom:: customgeom ): :" PointTrait"
131- GeoInterface. pointonsurface (:: GeoInterface. PolygonTrait , geom:: customgeom ): :" PointTrait"
132- GeoInterface. boundary (:: GeoInterface. PolygonTrait , geom:: customgeom ): :" LineStringTrait"
129+ GeoInterface. area (:: PolygonTrait , geom:: customgeom ):: Real
130+ GeoInterface. centroid (:: PolygonTrait , geom:: customgeom ): :" PointTrait"
131+ GeoInterface. pointonsurface (:: PolygonTrait , geom:: customgeom ): :" PointTrait"
132+ GeoInterface. boundary (:: PolygonTrait , geom:: customgeom ): :" LineStringTrait"
133133```
134134
135135A ` geom::customgeom ` with "GeometryCollection"-like traits has to implement the following methods:
136136``` julia
137- GeoInterface. geomtype (geom:: customgeom ) = GeoInterface . GeometryCollectionTrait ()
138- GeoInterface. ncoord (:: GeoInterface. GeometryCollectionTrait , geom:: customgeom ):: Integer
139- GeoInterface. ngeom (:: GeoInterface. GeometryCollectionTrait , geom:: customgeom ):: Integer
140- GeoInterface. getgeom (:: GeoInterface. GeometryCollectionTrait ,geom:: customgeomm , i): :" GeometryTrait"
137+ GeoInterface. geomtype (geom:: customgeom ) = GeometryCollectionTrait ()
138+ GeoInterface. ncoord (:: GeometryCollectionTrait , geom:: customgeom ):: Integer
139+ GeoInterface. ngeom (:: GeometryCollectionTrait , geom:: customgeom ):: Integer
140+ GeoInterface. getgeom (:: GeometryCollectionTrait ,geom:: customgeomm , i): :" GeometryTrait"
141141```
142142
143143A ` geom::customgeom ` with "MultiPoint"-like traits has to implement the following methods:
144144``` julia
145- GeoInterface. geomtype (geom:: customgeom ) = GeoInterface . MultiPointTrait ()
146- GeoInterface. ncoord (:: GeoInterface. MultiPointTrait , geom:: customgeom ):: Integer
145+ GeoInterface. geomtype (geom:: customgeom ) = MultiPointTrait ()
146+ GeoInterface. ncoord (:: MultiPointTrait , geom:: customgeom ):: Integer
147147
148148# These alias for npoint and getpoint
149- GeoInterface. ngeom (:: GeoInterface. MultiPointTrait , geom:: customgeom ):: Integer
150- GeoInterface. getgeom (:: GeoInterface. MultiPointTrait , geom:: customgeom , i): :" PointTrait"
149+ GeoInterface. ngeom (:: MultiPointTrait , geom:: customgeom ):: Integer
150+ GeoInterface. getgeom (:: MultiPointTrait , geom:: customgeom , i): :" PointTrait"
151151```
152152
153153A ` geom::customgeom ` with "MultiLineString"-like traits has to implement the following methods:
154154``` julia
155- GeoInterface. geomtype (geom:: customgeom ) = GeoInterface . MultiLineStringTrait ()
156- GeoInterface. ncoord (:: GeoInterface. MultiLineStringTrait , geom:: customgeom ):: Integer
155+ GeoInterface. geomtype (geom:: customgeom ) = MultiLineStringTrait ()
156+ GeoInterface. ncoord (:: MultiLineStringTrait , geom:: customgeom ):: Integer
157157
158158# These alias for nlinestring and getlinestring
159- GeoInterface. ngeom (:: GeoInterface. MultiLineStringTrait , geom:: customgeom ):: Integer
160- GeoInterface. getgeom (:: GeoInterface. MultiLineStringTrait ,geom:: customgeomm , i): :" LineStringTrait"
159+ GeoInterface. ngeom (:: MultiLineStringTrait , geom:: customgeom ):: Integer
160+ GeoInterface. getgeom (:: MultiLineStringTrait ,geom:: customgeomm , i): :" LineStringTrait"
161161```
162162
163163A ` geom::customgeom ` with "MultiPolygon"-like traits has to implement the following methods:
164164``` julia
165- GeoInterface. geomtype (geom:: customgeom ) = GeoInterface . MultiPolygonTrait ()
166- GeoInterface. ncoord (:: GeoInterface. MultiPolygonTrait , geom:: customgeom ):: Integer
165+ GeoInterface. geomtype (geom:: customgeom ) = MultiPolygonTrait ()
166+ GeoInterface. ncoord (:: MultiPolygonTrait , geom:: customgeom ):: Integer
167167
168168# These alias for npolygon and getpolygon
169- GeoInterface. ngeom (:: GeoInterface. MultiPolygonTrait , geom:: customgeom ):: Integer
170- GeoInterface. getgeom (:: GeoInterface. MultiPolygonTrait , geom:: customgeom , i): :" PolygonTrait"
169+ GeoInterface. ngeom (:: MultiPolygonTrait , geom:: customgeom ):: Integer
170+ GeoInterface. getgeom (:: MultiPolygonTrait , geom:: customgeom , i): :" PolygonTrait"
171171```
0 commit comments