ogcapi features action OGC Api Feature Get Item Action

Provided by: "Apache Software Foundation"

Support Level for this Kamelet is: "Stable"

Returns the items of the collection provided of an OGC API Features server. The collection must be a valid collection name on the server.

Query can be defined in the body too.

Configuration Options

The following table summarizes the configuration options available for the ogcapi-features-action Kamelet:

Property Name Description Type Default Example

collection

Collection

Required Name of the collection we want to extract items from.

string

url

URL

Required The URL to fetch for data.

string

https://emotional.byteroad.net

bbox

Bounding Box

Bounding Box of the items we want to retrieve.

string

-180,-90,180,90

160.6,-55.95,-170,-25.89

limit

Limit

Maximum number of items to retrieve. Must be a number between 1 and 10 000.

integer

10

query

Query

Separated list by & of properties we want to query.

string

property1=1&property2=dos

split

Split by Feature

When true, instead of returning the full geojson, split the message into each feature.

boolean

false

Dependencies

At runtime, the ogcapi-features-action Kamelet relies upon the presence of the following dependencies:

  • camel:core

  • camel:http

  • camel:kamelet

  • camel:jsonpath

  • camel:jackson

Usage

This section describes how you can use the ogcapi-features-action.

Knative action

You can use the ogcapi-features-action Kamelet as an intermediate step in a Knative binding.

ogcapi-features-action-binding.yaml
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: ogcapi-features-action-binding
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1alpha1
      name: timer-source
      properties:
        message: Hello
  steps:
    - ref:
        kind: Kamelet
        apiVersion: camel.apache.org/v1alpha1
        name: ogcapi-features-action
      properties:
        collection: The Collection
        url: https://emotional.byteroad.net
  sink:
    ref:
      kind: Channel
      apiVersion: messaging.knative.dev/v1
      name: mychannel

Prerequisite

You have Camel K installed on the cluster.

Procedure for using the cluster CLI

  1. Save the ogcapi-features-action-binding.yaml file to your local drive, and then edit it as needed for your configuration.

  2. Run the action by using the following command:

    kubectl apply -f ogcapi-features-action-binding.yaml

Procedure for using the Kamel CLI

Configure and run the action by using the following command:

kamel bind ogcapi-features-action -p "step-0.collection=The Collection" -p "step-0.url=\https://emotional.byteroad.net" channel:mychannel

This command creates the KameletBinding in the current namespace on the cluster.

Kafka action

You can use the ogcapi-features-action Kamelet as an intermediate step in a Kafka binding.

ogcapi-features-action-binding.yaml
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
  name: ogcapi-features-action-binding
spec:
  source:
    ref:
      kind: Kamelet
      apiVersion: camel.apache.org/v1alpha1
      name: timer-source
      properties:
        message: Hello
  steps:
    - ref:
        kind: Kamelet
        apiVersion: camel.apache.org/v1alpha1
        name: ogcapi-features-action
      properties:
        collection: The Collection
        url: https://emotional.byteroad.net
  sink:
    ref:
      kind: KafkaTopic
      apiVersion: kafka.strimzi.io/v1beta1
      name: my-topic

Prerequisites

  • You’ve installed Strimzi.

  • You’ve created a topic named my-topic in the current namespace.

  • You have Camel K installed on the cluster.

Procedure for using the cluster CLI

  1. Save the ogcapi-features-action-binding.yaml file to your local drive, and then edit it as needed for your configuration.

  2. Run the action by using the following command:

    kubectl apply -f ogcapi-features-action-binding.yaml

Procedure for using the Kamel CLI

Configure and run the action by using the following command:

kamel bind ogcapi-features-action -p "step-0.collection=The Collection" -p "step-0.url=\https://emotional.byteroad.net" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic

This command creates the KameletBinding in the current namespace on the cluster.