The following diagram describes a decision flowchart to select a client class
and a feature source to access GeoJSON feature collections and feature items:
Below you can find few step-by-step instructions how to get started in scenarios
represented in the decision flowchart.
π» Static GeoJSON local resource
π Static GeoJSON web resource
π Web API service conforming to OGC API Features
For the step 5 other alternatives are:
Use source.items() to get feature items by a filtered query (ie. bbox).
Use source.itemById() to get a single feature by an identifier.
Use source.itemsAllPaged() or source.itemsPaged() for accessing paged
feature sets.
In the step 6 itβs also possible to get links to related resources, and
optionally also to get a number of matched or returned features in a response.
π Using the standard HTTP RetryClient
When accessing static GeoJSON web resources or an OGC API Features service, itβs
also possible to define a retry policy using the standard http package.
However you must also manage the life cycle of such a HTTP client instance by
ensuring itβs closed after making API calls.
A sample accessing OGC API Features service with custom HTTP client:
This example of using a retry client requires also following imports: