Skip to content

Commit 9ab7e2c

Browse files
committed
Fixed doc reference. Removed duplicate getring function.
1 parent 49644d7 commit 9ab7e2c

File tree

7 files changed

+68
-66
lines changed

7 files changed

+68
-66
lines changed

docs/src/background/sf.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
CurrentModule = GeoInterface
3+
```
4+
15
# Simple Features
26
Simple Features ([SF](https://en.wikipedia.org/wiki/Simple_Features)) are OGC standards describing two dimensional geographic features, such as Points and Polygons and the relations between them.
37
The standards describe a hierarchy of types (Part 1), a functional interface with SQL (Part II) and an SQL/MM extension with support for circular geometry types, such as `Circularstring`.

docs/src/guides/defaults.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
CurrentModule = GeoInterface
3+
```
4+
15
# Defaults
26
There are *many* function in SF, but most only apply to a single geometry type.
37
Of note here are the `ngeom` and `getgeom` for each geometry type, which translate to the following function for each type automatically:
@@ -9,7 +13,7 @@ Of note here are the `ngeom` and `getgeom` for each geometry type, which transla
913
| [`AbstractPolygonTrait`](@ref) | [`nring(geom)`](@ref) | [`getring(geom)`](@ref) |
1014
| [`AbstractMultiLineStringTrait`](@ref) | [`nlinestring(geom)`](@ref) | [`getlinestring(geom)`](@ref) |
1115
| [`AbstractMultiPolygonTrait`](@ref) | [`npolygon(geom)`](@ref) | [`getpolygon(geom)`](@ref) |
12-
| [`AbstractPolyhedralSurfaceTrait`](@ref) | [`npatch(geom)`](@ref) | [`getpatch(geom)`](@ref) |
16+
| [`AbstractPolyHedralSurfaceTrait`](@ref) | [`npatch(geom)`](@ref) | [`getpatch(geom)`](@ref) |
1317
| [`AbstractGeometryCollectionTrait`](@ref) | [`ngeom(geom)`](@ref) | [`getgeom(geom)`](@ref) |
1418

1519
## Polygons

docs/src/guides/developer.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
CurrentModule = GeoInterface
3+
```
4+
15
# Implementing GeoInterface
26
GeoInterface requires six functions to be defined for a custom geometry. On top of that
37
it could be useful to also implement some optional methods if they apply or are faster than the fallbacks.
@@ -9,7 +13,7 @@ also implement those interfaces where applicable.
913

1014
```julia
1115
GeoInterface.isgeometry(geom::customgeom)::Bool = true
12-
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.XTrait() # <: AbstractGeometryTrait
16+
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.XTraitTrait() # <: AbstractGeometryTrait
1317
GeoInterface.ncoord(geomtype(geom), geom::customgeom)::Integer
1418
GeoInterface.getcoord(geomtype(geom), geom::customgeom, i)::Real # only for PointTraits
1519
GeoInterface.ngeom(geomtype(geom), geom::customgeom)::Integer
@@ -82,7 +86,7 @@ GeoInterface.isgeometry(geom::customgeom)::Bool = true
8286

8387
A `geom::customgeom` with "Point"-like traits implements
8488
```julia
85-
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.Point()
89+
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.PointTrait()
8690
GeoInterface.ncoord(::GeoInterface.PointTrait, geom::customgeom)::Integer
8791
GeoInterface.getcoord(::GeoInterface.PointTrait, geom::customgeom, i)::Real
8892

@@ -93,7 +97,7 @@ GeoInterface.getgeom(::GeoInterface.PointTrait, geom::customgeom, i) = nothing
9397

9498
A `geom::customgeom` with "LineString"-like traits implements the following methods:
9599
```julia
96-
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.LineString()
100+
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.LineStringTrait()
97101
GeoInterface.ncoord(::GeoInterface.LineStringTrait, geom::customgeom)::Integer
98102

99103
# These alias for npoint and getpoint
@@ -107,7 +111,7 @@ GeoInterface.length(::GeoInterface.LineStringTrait, geom::customgeom)::Real
107111
```
108112
A `geom::customgeom` with "Polygon"-like traits can implement the following methods:
109113
```julia
110-
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.Polygon()
114+
GeoInterface.geomtype(geom::customgeom)::DataType = GeoInterface.PolygonTrait()
111115
GeoInterface.ncoord(::GeoInterface.PolygonTrait, geom::customgeom)::Integer
112116

113117
# These alias for nring and getring
@@ -123,15 +127,15 @@ GeoInterface.boundary(::GeoInterface.PolygonTrait, geom::customgeom)::"LineStrin
123127

124128
A `geom::customgeom` with "GeometryCollection"-like traits has to implement the following methods:
125129
```julia
126-
GeoInterface.geomtype(geom::customgeom) = GeoInterface.GeometryCollection()
130+
GeoInterface.geomtype(geom::customgeom) = GeoInterface.GeometryCollectionTrait()
127131
GeoInterface.ncoord(::GeoInterface.GeometryCollectionTrait, geom::customgeom)::Integer
128132
GeoInterface.ngeom(::GeoInterface.GeometryCollectionTrait, geom::customgeom)::Integer
129133
GeoInterface.getgeom(::GeoInterface.GeometryCollectionTrait,geom::customgeomm, i)::"GeometryTrait"
130134
```
131135

132136
A `geom::customgeom` with "MultiPoint"-like traits has to implement the following methods:
133137
```julia
134-
GeoInterface.geomtype(geom::customgeom) = GeoInterface.MultiPoint()
138+
GeoInterface.geomtype(geom::customgeom) = GeoInterface.MultiPointTrait()
135139
GeoInterface.ncoord(::GeoInterface.MultiPointTrait, geom::customgeom)::Integer
136140

137141
# These alias for npoint and getpoint
@@ -141,7 +145,7 @@ GeoInterface.getgeom(::GeoInterface.MultiPointTrait, geom::customgeom, i)::"Poin
141145

142146
A `geom::customgeom` with "MultiLineString"-like traits has to implement the following methods:
143147
```julia
144-
GeoInterface.geomtype(geom::customgeom) = GeoInterface.MultiLineString()
148+
GeoInterface.geomtype(geom::customgeom) = GeoInterface.MultiLineStringTrait()
145149
GeoInterface.ncoord(::GeoInterface.MultiLineStringTrait, geom::customgeom)::Integer
146150

147151
# These alias for nlinestring and getlinestring
@@ -151,7 +155,7 @@ GeoInterface.getgeom(::GeoInterface.MultiLineStringTrait,geom::customgeomm, i)::
151155

152156
A `geom::customgeom` with "MultiPolygon"-like traits has to implement the following methods:
153157
```julia
154-
GeoInterface.geomtype(geom::customgeom) = GeoInterface.MultiPolygon()
158+
GeoInterface.geomtype(geom::customgeom) = GeoInterface.MultiPolygonTrait()
155159
GeoInterface.ncoord(::GeoInterface.MultiPolygonTrait, geom::customgeom)::Integer
156160

157161
# These alias for npolygon and getpolygon

docs/src/reference/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
CurrentModule = GeoInterface
3+
```
4+
15
# API
26

37
## Functions

docs/src/tutorials/usage.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
CurrentModule = GeoInterface
3+
```
4+
15
# Traits interface
26
GeoInterface provides a traits interface, not unlike Tables.jl, by a set of functions and types for geospatial data.
37

0 commit comments

Comments
 (0)