At this point, you've installed pygeoapi, set configurations and started the server.
pygeoapi's default configuration comes setup with two simple vector datasets, a STAC collection and a sample process. Note that these resources are straightforward examples of pygeoapi's baseline functionality, designed to get the user up and running with as little barriers as possible.
Let's check things out. In your web browser, go to http://localhost:5000
All pygeoapi URLs have HTML and JSON representations. If you are working through a web browser, HTML is always returned as the default, whereas if you are working programmatically, JSON is always returned.
To explicitly ask for HTML or JSON, simply add f=html
or f=json
to any URL accordingly.
Each web page provides breadcrumbs for navigating up/down the server's data. In addition, the upper right of the UI always has JSON and JSON-LD links to provide you with the current page in JSON if desired.
The landing page provides a high level overview of the pygeoapi server (contact information, licensing), as well as specific sections to browse data, processes and geospatial files.
http://localhost:5000/collections
The collections page displays all the datasets available on the pygeoapi server with their title and abstract. Let's drill deeper into a given dataset.
http://localhost:5000/collections/obs
Let's drill deeper into a given dataset. Here we can see the obs
dataset is described along
with related links (other related HTML pages, dataset download, etc.).
The 'View' section provides the default to start browsing the data.
The 'Queryables' section provides a link to the dataset's properties.
http://localhost:5000/collections/obs/queryables
The queryables endpoint provides the collection's queryable properties and associated datatypes.
http://localhost:5000/collections/obs/items
This page displays a map and tabular view of the data. Features are clickable on the interactive map, allowing the user to drill into more information about the feature. The table also allows for drilling into a feature by clicking the link in a given table row.
Let's inspect the feature close to Toronto, Ontario, Canada.
http://localhost:5000/collections/obs/items/297
This page provides an overview of the feature and its full set of properties, along with an interactive map.
.. seealso:: :ref:`ogcapi-features` for more OGC API - Features request examples.
Add an item to a collection (using curl):
curl -XPOST -H "Content-Type: application/geo+json" http://localhost:5000/collections/canada-metadata/items -d @new-item.json
Update an item in a collection (using curl):
curl -XPUT -H "Content-Type: application/geo+json" http://localhost:5000/collections/canada-metadata/items/item1 -d @updated-feature.json
Delete an item from a collection:
curl -XDELETE http://localhost:5000/collections/canada-metadata/items/item1
This page provides information on a collection coverage information.
http://localhost:5000/collections/gdps-temperature/schema
This page provides a coverage in CoverageJSON format.
http://localhost:5000/collections/gdps-temperature/coverage
.. seealso:: :ref:`ogcapi-coverages` for more OGC API - Coverages request exampless.
Datasets can be made available as dynamic maps:
http://localhost:5000/collections/mapserver_world_map/map
.. seealso:: :ref:`ogcapi-maps` for more OGC API - Maps request examples.
A given collection or any data type can additionally be made available as tiles (map tiles, vector tiles, etc.). The following page provides an overview of a collection's tiles capabilities (tile matrix sets, URI templates, etc.)
http://localhost:5000/collections/lakes/tiles
From the abovementioned page, we can find the URI template:
This page provides freeform tiles metadata.
http://localhost:5000/collections/lakes/tiles/WorldCRS84Quad/metadata
http://localhost:5000/collections/metadata-records/items?q=crops&bbox=-142,42,-52,84
This page provides metadata catalogue search capabilities
.. seealso:: :ref:`ogcapi-records` for more OGC API - Records request examples.
See the :ref:`transactions_examples` section for examples.
The processes page provides a list of process integrated onto the server, along with a name and description.
.. todo:: Expand with more info once OAProc HTML is better flushed out.
.. seealso:: :ref:`ogcapi-processes` for more OGC API - Processes request examples.
http://localhost:5000/collections/edr-test
This page provides, in addition to a common collection description, specific link relations for EDR queries if the collection has an EDR capability, as well as supported parameter names to select.
http://localhost:5000/collections/edr-test/position?coords=POINT(111 13)¶meter-name=SST&f=json
This page executes a position query against a given parameter name, providing a response in CoverageJSON.
.. seealso:: :ref:`ogcapi-edr` for more OGC API - EDR request examples.
This page provides a Web Accessible Folder view of raw geospatial data files. Users can navigate and click to browse directory contentsor inspect files. Clicking on a file will attempt to display the file's properties/metadata, as well as an interactive map with a footprint of the spatial extent of the file.
.. seealso:: :ref:`stac` for more STAC request examples.
http://localhost:5000/openapi?f=json
The API documentation links provide a Swagger page of the API as a tool for developers to provide example request/response/query capabilities. A JSON representation is also provided.
.. seealso:: :ref:`openapi`
http://localhost:5000/conformance
The conformance page provides a list of URLs corresponding to the OGC API conformance classes supported by the pygeoapi server. This information is typically useful for developers and client applications to discover what is supported by the server.
The OGC API - Moving Features Standard is an extension of the OGC API - Common and the OGC API - Features Standards. MovingFeatures – Part 1: Core is described in the here.
http://localhost:5000/collections
Retrieve catalogs of a moving features collection.
http://localhost:5000/{collectionId}/items
Retrieve the moving feature collection to access the static information of the moving feature by simple filtering and a limit.
http://localhost:5000/{collectionId}/items/{mf_id}
Access the static data of the moving feature with id {mFeatureId}. The static data of a moving feature is not included temporal geometries and temporal properties.
http://localhost:5000/{collectionId}/items/{mf_id}/tgsequence
Retrieve the movement data of the single moving feature with id {mFeatureId}.
http://localhost:5000/{collectionId}/items/{mf_id}/tgsequence/{tGeometryId}
Get a time-to-distance curve of a temporal primitive geometry with id {tGeometryId}.
http://localhost:5000/{collectionId}/items/{mf_id}/tproperties
Retrieve the static information of the temporal property data that included a single moving feature with id {mFeatureId}. The static data of a temporal property is not included temporal values (property values).
.. seealso:: :ref:`ogcapi-mfapi` for more OGC API - MF-API request examples.
Register metadata about a collection of moving features. (using curl):
curl -X POST http://localhost:5000/collections \
-H "Content-Type: application/json" \
-d "{\"title\": \"moving_feature_collection_sample\",
\"updateFrequency\": 1000,
\"description\": \"example\",
\"itemType\": \"movingfeature\"
}"