OgrSource

The OgrSource is a source operator that reads vector data using OGR. The counterpart for raster data is the GdalSource.

Parameters

ParameterTypeDescriptionExample ValueDefault Value
datasetDatasetIdThe id of the dataset to be loaded
{
  "type": "internal",
  "datasetId": "e977b123-ca47-4c5b-aace-481119826aaf"
}
attributeProjectionArray<String>(Optional) The list of attributes to load. If nothing is specified, all attributes will be loaded.["name", "population"]
attributeFiltersArray<AttributeFilter>(Optional) The list of filters to apply on the attributes of features. Only the features that match all of the filters will be loaded.
[{"attribute": "populuation",
"ranges": [[1000, 10000]]
}]

Types

The following describes the types used in the parameters.

AttributeFilter

The AttributeFilter defines one or more ranges on the values of an attribute. The ranges include the lower and upper bounds of the range.

FieldTypeDescription
attributeStringThe name of the attribute to filter.
rangesArray<Array<String \| Number>>The list of ranges to filter.
keepNullsbool(Optional) Specifies whether to keep null/no data entries, defaults to false.

Inputs

None

Errors

If the given dataset does not exist or is not readable, an error is thrown.

Example JSON

{
  "type": "OgrSource",
  "params": {
    "dataset": {
      "type": "internal",
      "datasetId": "e977b123-ca47-4c5b-aace-481119826aaf"
    },
    "attributeProjection": ["name", "population"],
    "attributeFilters": [
      {
        "attribute": "population",
        "ranges": [[1000, 10000]],
        "keepNulls": false
      }
    ]
  }
}