Skip to content

Commit

Permalink
More doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Feb 27, 2020
1 parent eb87610 commit 1798ddb
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 33 deletions.
2 changes: 1 addition & 1 deletion hugo/content/installation/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Install and Deploy"
title: "Installation"
date:
draft: false
weight: 20
Expand Down
15 changes: 7 additions & 8 deletions hugo/content/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 400
---


### Configuration File
## Configuration File

The configuration file is automatically read from the file `config.toml`
in the directory the application starts in, if it exists.
Expand Down Expand Up @@ -73,17 +73,16 @@ LimitMax = 10000
#Description = "Crunchy Data Feature Server for PostGIS"
```

### Configuration Options
## Configuration Options

#### UrlBase
### UrlBase

The Server Base URL is the URL at which users access the service.
The Base URL is the URL endpoint at which users access the service.
It is also used for any URL paths returned by the service (such as response links).

The `UrlBase` can specify a value for the Base URL.
This accomodates running the service behind a reverse proxy.

If `UrlBase` is not set, `pg_featureserv` dynamically detects the base URL
by inspecting the incoming request.
Also, if the HTTP headers `Forwarded` or `X-Forwarded-Proto` and `X-Forwarded-Host` are present
they are respected.
If `UrlBase` is not set, `pg_featureserv` dynamically detects the base URL.
Also, if the HTTP headers `Forwarded` or `X-Forwarded-Proto` and `X-Forwarded-Host` are present they are respected.
Otherwise the base URL is determined by inspecting the incoming request.
3 changes: 1 addition & 2 deletions hugo/content/usage/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ draft: false
weight: 30
---

This section describes how to create or expose database tables, views and functions via
`pg_featureserv`, how to query the API, and how to use the Web user interface provided by the service.
This section describes how to use `pg_featureserv` to expose database tables, views and functions; how to query them using the service API; and how to use the Web user interface provided by the service.
43 changes: 30 additions & 13 deletions hugo/content/usage/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,54 @@ draft: false
weight: 100
---

Following
Following the OCG Features information model, the service API exposes
PostGIS tables and views as **feature collections**.

The available feature collections can be listed.
Each feature collection can report metadata about its definition,
and can be queried to return datasets of features.
It is also possible to query individual features by **id** in tables which have
defined primary keys.

## Expose Tables and Views as Feature Collections

`pg_featureserv` exposes database spatial tables and views in the API as **feature collections**.
`pg_featureserv` exposes all spatial tables and views which are visible in the database.

Spatial tables and views are those which:

* include a geometry column;
* declare a geometry type; and,
* declare an SRID (spatial reference ID)

Each feature collection can report metadata about its definition,
and can be queried to return datasets of features.
It is also possible to query individual features by **id** in tables which have
defined primary keys.

Exposed tables and views are also limited by the database access permissions
defined for the service database user.
Visible tables and views are the available for access by virtue of by the database access permissions defined for the service database user.
See the [Security]({{< relref "security" >}}) section for more information.

The service relies on the database catalog information to provide metadata about a table or view.
The metadata includes:

* The feature collection id is the schema-qualified name of the table or view
* The feature collection description is provided by the comment on the table or view
* The feature geometry is provided by the spatial column of the table or view
* The identifier for features is provided by the primary key column for a table (if any)
* The property names and types are provided by the non-spatial columsn of the table or view
* The description for properties is provided by the comments on table/view columns

## List Feature Collections


`/collections`
The path `/collections` returns a list of the feature collections
available in the service.

- response is JSON containing list of collections

## Describe Feature Collection metadata

`/collections/{collid}`

- response is JSON containing metadata about collection
The path `/collections/{coll-name}` returns a JSON object describing
the metadata for a feature collection.
The `{coll-name}` is the schema-qualified name of the database table or view
backing the feature collection.

The response is a JSON document ontaining metadata about the collection, including:

* The column name providing the feature identifiers (if any)
* A list of the properties and their JSON type
4 changes: 2 additions & 2 deletions hugo/content/usage/query_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ draft: false
weight: 150
---

## Query Features
## Query features

`/collections/{collid}/items`

Expand All @@ -31,7 +31,7 @@ weight: 150

- extent is in lon/lat (4326)

### Specify properties in result
### Specify result properties

`properties=PROP1,PROP2,PROP3...`

Expand Down
15 changes: 8 additions & 7 deletions hugo/content/usage/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,33 @@ The path `/collections.html` shows a list of the feature collections exposed by

The path `/collections/{collid}.html` shows metadata about the specified feature collection.

## View Feature Collection data on a map
## View features on a map

The path `/collections/{collid}/items.html` shows the features returned by a basic query in a web map interface.
The map interface provides a simple UI to allow setting some basic query parameters.

All applicable query parameters may also be appended to the URL.
Any applicable query parameters may be appended to the URL.

## View Feature on a map
## View a feature on a map

The path `/collections/{collid}/items/{fid}` shows the feature requested by the query in a web map interface..

All relevant query parameters may also be used.
Any applicable query parameters may be appended to the URL.

## List Functions

The path `/functions.html` shows a list of the functions exposed by the service.

## Show Function metadata
## Show function metadata

The path `/functions/{funid}.html` shows metadata about the specified function.

## View Function result data on a map
## View function result data on a map

The path `/functions/{funid}/items.html` shows the features returned
by a basic function query in a web map interface.
The map interface provides a simple UI to allow specifying function arguments
and setting some basic query parameters.
Note that only functions with spatial results can be viewed on a map.

All relevant query parameters may also be used.
Any applicable query parameters may be appended to the URL.

0 comments on commit 1798ddb

Please sign in to comment.