diff --git a/docs/src/guides/developer.md b/docs/src/guides/developer.md index 432e2a5..c2b6bfb 100644 --- a/docs/src/guides/developer.md +++ b/docs/src/guides/developer.md @@ -86,6 +86,22 @@ GeoInterface.geometrycolumns(::customcollection) = (:geometry,) # can be multip The `geometrycolumns` enables other packages to know which field in a row, or column in a table, contains the geometry or geometries. +It's important to note that the `geometrycolumns` should always return a `Tuple` of `Symbol`s. However, it does have a fallback method +that uses [DataAPI.jl](https://github.com/JuliaData/DataAPI.jl) metadata, if it exists, to retrieve the geometry columns. This relies on +the `GEOINTERFACE:geometrycolumns` metadata key. GeoInterface.jl compatible writers may set this metadata key if writing to a format +that does not have its own mechanism to store known geometry columns, like Arrow. + +Optionally, the `crs` method can also be implemented: +```julia +GeoInterface.crs(::customcollection) +``` + +This should return a `GeoFormatTypes.CoordinateReferenceSystem` type, such as `EPSG(code::Int)`, `WellKnownText(GeoFormatTypes.CRS(), wkt::String)`, +or `ProjString(p4::String)`. See [GeoFormatTypes.jl](https://github.com/JuliaGeo/GeoFormatTypes.jl) for more information. + +The `crs` method also has a fallback that uses [DataAPI.jl](https://github.com/JuliaData/DataAPI.jl) metadata, if it exists, to retrieve the CRS. +GeoInterface searches for the `GEOINTERFACE:crs` metadata key to retrieve the CRS. + ## Geospatial Operations ```julia distance(geomtrait(a), geomtrait(b), a, b)