Services

A Service is a frontend format for FeatureServer. Services parse requests – including POST/PUT data, GET data via URL parameters and path_info, etc.

If your configuration file has the following:

[metadata]
default_service=GeoJSON

then the default service will be GeoJSON instead of JSON. The same can be applied to any of the other services.

Currently included in FeatureServer:

  • JSON

    The default Service. Input and output is GeoJSON. Requires simplejson Python module.

  • GeoJSON

    Spec-following of GeoJSON. To be merged with JSON eventually. Requires simplejson Python module.

  • GeoRSS

    Supports reading full range of GeoRSS Simple geometries for Atom and RSS2.0. The output from this service is Atom Publishing Protocol friendly Atom with GeoRSS Simple geometries.

  • KML

    KML 2.0 compatible. Encodes feature attributes into a Metadata element.

  • GML/WFS

    This service is output only.

  • HTML

    Requires Cheetah templating engine.

Datasource Properties

Some Datasource properties affect service output. These are described below.

  • Adding a ‘template’ property will cause the file location described by the property to be used when creating HTML templates.

  • adding ‘gaping_security_hole=yes’ to any datasource will allow it to be loaded via JSON callbacks. You should only enable this option if the data you are serving should have unlimited distribution. Enabling this option can allow users to obtain data from your server even if you are behind a firewall. Again, you should only enable this option if the data you are working with has unlimited distribution.

    Once you do this, simply specify ‘callback=’ as a parameter, and the JSON data will be wrapped inside the following:

    callback_value({'data':'here'})
    
  • title_property will cause KML/GeoRSS to use the value you set it to as a key for the property which fills the <title> property of the feeds.

  • debug will cause some layers to issue debug information instead of failing silently.

Table Of Contents

Previous topic

DataSources

Next topic

Querying FeatureServer

This Page