jivan is a Go server implementation of OGC WFS 3.0.
REQUIRES GO >= 1.8
This project provides a straightforward and simple way to publish your geospatial data on the web. jivan currently supports GeoPackage and PostGIS backends. Providers implement a straightforward interface so others can be added fairly easily.
-
The simplest way to start is to simply put a GeoPackage file in the same directory as the executable and run it.
-
You can provide the connection details for the data backend and the provider will scan your data collection and publish any tables with geographical data each as a separate collection. Support to customize the data published, including collections based on SQL are a short coding effort away.
-
You can also provide a config file. Configuration support is in a fairly early state. Take a look at
jivan-config.toml
for an example, and keep in mind::- Currently the [logging] section is not used
- From the [metadata] section, only the following are currently used:
- title
- description
- In the [server] section, only the following are currently used:
- bind_host
- bind_port
- url_scheme
- url_hostport
- url_basepath
- default_mimetype
- paging_maxlimit
GeoPackage Example:
jivan -d /path/to/my.gpkg
PostGIS Example:
jivan -d 'host=my.dbhost.org port=5432 dbname=mydbname user=myuser password=mypassword'
Then visit http://127.0.0.1:9000 to view your data as a wfs3 service.
jivan provides a number of handy flags to customize where it binds and the links it generates
in results to make it simple for sysadmins to, for example, deploy behind a proxy.
Run jivan --help
for details.
See jivan-config.toml TODO: TOML configuration files
Currently supported TOML:
- config.Configuration.Server.DefaultMimeType
- config.Configuration.Server.MaxLimit
All bug reports, enhancement requests, and other issues are managed on GitHub.
for further details see the README in each folder
-
config/ Responsible for dealing with configuration files & providing the parameters from a config to the rest of the system.
-
server/ Responsible for the actual server and all html traffic specific tasks such as determining content encoding and collecting url query parameters.
-
wfs3/ Responsible for wfs3-specific details such as go versions of wfs3 types and collecting appropriate data for each wfs3 endpoint. The types here implement the supported encodings.
-
data_provider/ Responsible for access to data backends. Essentially a wrapper with some functionality added for tegola data providers
-
main.go Executable entry-point.
Visit http://localhost:9000/api for OpenAPI definition of the service.
Take a look at server/routes.go
for a concise list of supported URLs.
# create directory for local env
mkdir /path/to/golang-env
export GOPATH=/path/to/golang-env
# install jivan
go get github.com/go-spatial/jivan
# install 'dep' dependency manager
go get github.com/golang/dep/...
# install dependencies in vendor/
dep ensure
go build -i -o jivan github.com/go-spatial/jivan
To build for AWS Lambda deployments, add -tags awslambda
when building
# start server on http://localhost:9000/
go run main.go # or go build main.go
dep ensure
will install dependencies at the current HEAD when you run it (equivalent to go get ...
)
Run dep ensure -update
periodically to stay current with these dependencies. (equivalent to subsequent go get ...
)
Please don't add Gopkg.lock
to the repo.
Features are identified by a collection name and feature id pair.
- API landing: http://localhost:9000/
- API definition: http://localhost:9000/api
- Conformance: http://localhost:9000/conformance
- Collections: http://localhost:9000/collections
- Feature collection metadata: http://localhost:9000/collections/{name}
- Features from a single feature collection: http://localhost:9000/collections/{name}/items
- Single feature from a feature collection: http://localhost:9000/collections/{name}/items/{featureid}