Skip to content

Latest commit

 

History

History
163 lines (139 loc) · 5.09 KB

FEATURES.md

File metadata and controls

163 lines (139 loc) · 5.09 KB

pg-featureserv Functionality

This is a list of current and planned functionality. It includes OGC API - Features core requirements (although some of them are not on the current development roadmap).

API

  • determine response format from request headers Content-Type, Accept
  • CORS support
  • GZIP encoding
  • HTTPS support
  • Proxy support via configurable base URL

Schema

  • /api - OpenAPI schema endpoint
  • /conformance - OAF Conformance endpoint

Resources

  • / landing page
  • /collections
  • /collections/id
  • /collections/id/items
  • /collections/id/items/id
  • /functions
  • /functions/id
  • /functions/id/items

Resource Metadata

  • /collections/id JSON includes property names/types
  • /functions/id JSON includes parameter names/types/defaults and property names/types

Query parameters - Standard

  • limit=n
  • offset=n
  • crs=srid
  • bbox=x1,y1,x2,y2
  • bbox (6 numbers)
  • bbox-crs=srid
  • datetime
  • properties list
    • restricts properties included in response
  • sortby to sort output by a property
    • sortby=name, sortby=+name, sortby=-name
  • filtering by property value ( name=value, as per spec sec. 7.15.5 )
  • filter with CQL expressions (see below)
  • filter-lang (only CQL-Text is supported)
  • filter-crs=srid

Query parameters - Extension

  • precision to set output precision of GeoJSON coordinates
    • precision=n
  • transform to specify geometry transformations
    • transform=fn,arg,arg|fn,arg
  • convert transform function names to ST_ equivalents
  • groupBy=colname to group by column (used with a transform spatial aggregate function)
  • f parameter for formats? (e.g. f=json, f=html)

Query parameters - Functions

  • function arguments
    • name=value

CQL expressions

  • property names
  • character literals
  • numeric literals
  • arithemetic expressions
    • +,-,*,/, %, parentheses
  • binary comparisons
    • <,<=,>,>=,=,<>
  • property [NOT] BETWEEN a AND B
  • property [NOT] IN ( value-list )
  • property [NOT] (LIKE | ILIKE) pattern
    • pattern can include % wildcards
  • property [NOT] IS NULL
  • boolean combinations (AND,OR,NOT, parentheses)
  • geometry literals
    • POINT,LINESTRING,POLYGON,MULTIPOINT,MULTILINESTRING,MULTIPOLYGON,GEOMETRYCOLLECTION,ENVELOPE
  • spatial predicates
    • INTERSECTS,DISJOINT,CONTAINS,WITHIN,EQUALS,CROSSES,OVERLAPS,TOUCHES
  • distance predicate
    • DWITHIN
  • temporal literals
    • 1999-01-01, 2001-12-25T10:01:02
  • temporal predicates
  • functions

Output formats

  • GeoJSON
  • JSON for metadata
  • JSON for non-geometry functions
  • next link
  • prev link

Transactions

  • Support POST, PUT, PATCH, DELETE... TBD

User Interface (HTML)

  • /home.html landing page
  • metadata for collection
  • map display of collection
  • attribute display of collection
  • map display of single feature
  • attribute display of single feature
  • function metadata
  • text display for non-geometry functions (items page)

Map UI

  • map display for features (items page)
  • map display for geometry functions (items page)
  • map panel showing features attributes
  • control for limit parameter
  • control for offset parameter
  • control for bbox parameter
  • control for setting function parameter values
  • configurable base map URL

Database

  • PostGIS 2.x AsGeoJSON geometry with attribute encoding
  • PostGIS 3.0 ST_AsGeoJSON record

Data Types

  • common scalar types: text, int, float, numeric
  • Arrays of text, int, float, numeric
  • JSON
  • Other types converted to text representation

Tables / Views

  • table column schema
  • support tables with no primary key
  • support views (with PK as fid or missing)
  • support materialized views
  • read property descriptions from table/view column comments
  • read table estimated and actual extents lazily
  • include/exclude published schemas and tables via configuration

Functions

  • support functions returning geometry
  • support functions returning attribute-only data
  • support geometry functions with id output field
  • support geometry functions with no id output field
  • LIMIT/OFFSET for function output
  • BBOX filter for function output
  • pass LIMIT as function parameter
  • pass BBOX as function parameter

Operational

  • graceful shutdown
  • enforce request timeouts

Configuration

  • read config from file
  • log levels
  • DB pool parameters
  • database connection string
  • whitelist for transformation functions (default: none)

Security

  • Authentication - TBD
  • OpenID - TBD
  • Authorization via database role & grants