You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/background/sf.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Simple Features
2
-
Simple Features (SF) are OGC standards describing two dimensional geographic features, such as Points and Polygons and the relations between them.
3
-
The standards describe a hierarchy of types (Part 1), an interface with SQL (Part II) and an SQL/MM extension with support for circular geometry.
2
+
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.
3
+
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`.
4
4
5
5
## Type hierarchy
6
6
All types used here come from the SF. We added `Trait` to all geometry types here to distinguish them from actual geometry structs.
@@ -12,7 +12,7 @@ All types used here come from the SF. We added `Trait` to all geometry types her
12
12
While we try to adhere to SF, there are changes and extensions to make it more Julian.
13
13
14
14
### Function names
15
-
All function names are without the `ST_` prefix and are lowercased. In some cases the names have changed as well, to be inline with common Julia functions. `NumX` becomes `nx` and `Xn` becomes `getX`:
15
+
All function names are without the `ST_` prefix and are lowercased. In some cases the names have changed as well, to be inline with common Julia functions. `NumX` becomes `nx` and `geomN` becomes `getgeom`:
16
16
```julia
17
17
GeometryType -> geomtype
18
18
NumGeometries -> ngeom
@@ -24,15 +24,18 @@ NumPatches -> npatch
24
24
We generalized [`ngeom`](@ref) and [`getgeom`](@ref) to apply to
25
25
all geometries, not just a [`AbstractGeometryCollectionTrait`](@ref)s.
26
26
27
-
We also simplified the dimension functions. From the three original (`dimension`, `coordinateDimension`, `spatialDimension`) there's now only the coordinate dimension, so not to overlap with the Julia `ndims`.
27
+
We also simplified the dimension functions. From the three original (`dimension`, `coordinateDimension`, `spatialDimension`) there's now only the coordinate dimension, by using `ncoords`, which represent coordinate dimensions like `X`, `Y`, `Z` and `M`. Topological dimensions (a point is 0-dimensional), and the functions related to it, are not used in this interface to prevent confusion. Similarly, we do not overload the Julia `ndims`, to prevent confusion and possible conflict with custom vector based geometries.
28
+
28
29
```julia
29
30
coordinateDimension -> ncoords # x, y, z, m
31
+
dimension -> unused
32
+
spatialDimension -> unused
30
33
```
31
34
32
-
We've generalized the some functions:
35
+
We've generalized the naming of some functions:
33
36
```julia
34
37
SRID -> crs
35
-
envelope -> extent
38
+
envelope -> extent# also aliased to bbox
36
39
```
37
40
38
41
And added a helper method to clarify the naming of coordinates.
@@ -44,10 +47,9 @@ coordnames = (:X, :Y, :Z, :M)
44
47
Not all SF functions are implemented, either as a possibly slower fallback or empty descriptor or not at all. The following SF functions are not (yet) available.
Where the `getgeom` could be an iterator (without the i) as well. It will return a new geom with the correct `geomtype`. The `ngeom` and `getgeom` are aliases for their geom specific counterparts, such as `npoints` and `getpoint` for LineStrings.
18
+
Where the `getgeom`and `getcoord`could be an iterator (without the `i`) as well. It will return a new geom with the correct `geomtype`. The `ngeom` and `getgeom` are aliases for their geom specific counterparts, such as `npoints` and `getpoint` for LineStrings.
19
19
20
20
You read more about the `geomtype` in the [Type hierarchy](@ref).
And lastly, there are many other optional functions for each specific geometry. GeoInterface provides fallback implementations based on the generic functions above, but these are not optimized. These are detailed in [Fallbacks](@ref).
0 commit comments