Reference implementation of the OCG API - Features specification
10K+
GOAF is a OGC API - Features implementation in golang.
If you are looking for a very fast OGC API - Features application and are not afraid of some data tuning, this could be the application for you!
GOAF supports the following datasources:
A a GeoJSON implementation with a Geopackage as a data provider.
The specification is a preliminary one, with go generate the routing based on api spec, provider interfaces en types structs and convenient parameter extractions are generated to stay easily up to date.
docker build -t pdok/goaf:latest .
The GeoPackage provider is a minimal config for GeoPackages that tend to be relative small e.g. < 3 GB.
docker run --rm -v `pwd`/example:/example -e CONFIG=/example/config-addresses-gpkg-minimal.yaml -p 8080:8080 pdok/goaf:latest
More elaborate config optimised performance for huge db (10M+ features/collection)
docker run -v `pwd`/example:/example -e CONFIG=/example/config-addresses-postgis-localhost.yaml' -p 8080:8080 pdok/goaf:latest
CREATE TABLE addresses.addresses
(
fid text COLLATE pg_catalog."default" NOT NULL,
offsetid bigint NOT NULL,
properties jsonb,
geom geometry,
bbox geometry,
CONSTRAINT addresses_addresses_pk PRIMARY KEY (fid)
)
WITH (
OIDS = FALSE
)
CREATE INDEX addresses_geom_sidx ON addresses.addresses USING GIST (geom);
CREATE INDEX addresses_offsetid_idx ON addresses.addresses(offsetid);
Some of the code is generated based on the given oas.yaml:
codegen/provider.go
codegen/types.go
server/routing.gen.go
go generate generate/gen.go
go test ./... -covermode=atomic
Make a pull request...
Distributed under MIT License, please see license file within the code for more details.
Inspiration and code copied from:
The main differences with regards to jivan is the data provider setup, some geopackage query speedups for larger Geopackages and some tweaks for scanning the SQL features
Content type
Image
Digest
sha256:bb980ec54…
Size
8.9 MB
Last updated
about 3 years ago
Requires Docker Desktop 4.37.1 or later.