Git Product home page Git Product logo

goaf's Introduction

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:

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.

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:

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.