GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PDOK/goaf: Implementation of the OCG API - Features specification

This repository was archived by the owner on Oct 15, 2024. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

196 Commits
196 Commits

Folders and files

NameName
Last commit message
Last commit date
codegen
codegen
 
 
codegen_templates
codegen_templates
 
 
core
core
 
 
example
example
 
 
generate
generate
 
 
geopackage
geopackage
 
 
hooks
hooks
 
 
postgis
postgis
 
 
server
server
 
 
spec
spec
 
 
swagger-ui
swagger-ui
 
 
templates
templates
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
start.go
start.go
 
 

Repository files navigation

GOAF

ARCHIVED, See GoKoala which is the successor of GOAF.

GitHub license GitHub release Go Report Card Docker Pulls

GOAF is a OGC API - Features implementation in golang.

For who is it?

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!

Datasources

GOAF supports the following datasources:

  • OGC GeoPackage
  • PostGIS (*Postgresql 9.4+)

PDOK server implementation of OGCAPI-FEATURES

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.

  • FeatureCollection is overridden in the GeoPackage provider to use the GeoJSON equivalent for decoding blobs
  • https://github.com/opengeospatial/ogcapi-features/blob/master/core/openapi/ogcapi-features-1.yaml

Build

docker build -t pdok/goaf:latest .

GeoPackage

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

PostGIS

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

Example table

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);

Generate

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

Test

go test ./... -covermode=atomic

How to Contribute

Make a pull request...

License

Distributed under MIT License, please see license file within the code for more details.

Thanks

Inspiration and code copied from:

  • https://github.com/go-spatial/jivan
  • https://github.com/go-spatial/tegola

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

About

Implementation of the OCG API - Features specification

Topics

dockerdocker-composegeopackagegogolanggpkgoafoapifopenapiopenapi-featurespostgisthespecformerlyknownaswfs3

Resources

Readme
MIT license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

8 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.