The Geospatial API allows to model a problem domain when data has a geometric or geographic nature. The geospatial data is organized in feature types that are homogeneous collections of features (geospatial items), each having the same spatial representation, such as points, lines, or polygons, and a common set of typed properties. The Geospatial API is aware of Coordinate Reference Systems, and allows transformations. To learn more about geospatial concepts, see the concept guide.
Required capabilities:
geospatialCrsAcl:READ
List the defined Coordinate Reference Systems. The list can be limited to the custom Coordinate Reference Systems defined for the tenant.
Coordinate reference system list response.
Failed request reponse.
const allCRS = await client.geospatial.crs.list({ filterOnlyCustom : true });
{- "items": [
- {
- "srid": 4326,
- "wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]",
- "projString": "+proj=longlat +datum=WGS84 +no_defs \"\"",
- "createdTime": 1633596134000,
- "lastUpdatedTime": 1633596134000
}
]
}Required capabilities:
geospatialCrsAcl:WRITE
Creates custom Coordinate Reference Systems.
List of custom Coordinate Reference Systems to be created.
required | Array of objects (GeospatialCoordinateReferenceSystem) |
Custom coordinate reference system list response.
Failed request reponse.
{- "items": [
- {
- "srid": 456789,
- "wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]",
- "projString": "+proj=longlat +datum=WGS84 +no_defs \"\""
}
]
}{- "items": [
- {
- "srid": 4326,
- "wkt": "POINT (0 0)",
- "projString": "string",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000
}
]
}Required capabilities:
geospatialCrsAcl:READ
Get Coordinate Reference Systems by their Spatial Reference IDs
required | Array of objects [ 1 .. 1000 ] items |
Coordinate reference system list response.
Failed request reponse.
{- "items": [
- {
- "srid": 4326
}
]
}{- "items": [
- {
- "srid": 4326,
- "wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]",
- "projString": "+proj=longlat +datum=WGS84 +no_defs \"\"",
- "createdTime": 1633596134000,
- "lastUpdatedTime": 1633596134000
}
]
}Required capabilities:
geospatialCrsAcl:WRITE
Delete custom Coordinate Reference Systems.
List of custom Coordinate Reference Systems to be deleted.
required | Array of objects [ 1 .. 1000 ] items |
Empty response.
Failed request reponse.
{- "items": [
- {
- "srid": 4326
}
]
}{ }Required capabilities:
geospatialAcl:WRITE
Creates feature types. Each tenant can have up to 100 feature types.
List of feature types to be created. It is possible to create up to 100 feature types in one request provided the total number of feature types on the tenant will not exceed 100.
required | Array of objects (GeospatialFeatureTypeSpec) [ 1 .. 100 ] items |
Feature type list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "ocean_temperature",
- "properties": {
- "temperature": {
- "type": "DOUBLE"
}, - "location": {
- "type": "POINT",
- "srid": 4326
}
}, - "searchSpec": {
- "location_idx": {
- "properties": [
- "location"
]
}
}
}
]
}{- "items": [
- {
- "externalId": "ocean_temperature",
- "dataSetId": 1278028,
- "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505,
- "properties": {
- "temperature": {
- "type": "DOUBLE"
}, - "location": {
- "type": "POINT",
- "srid": 4326
}, - "createdTime": {
- "type": "LONG"
}, - "lastUpdatedTime": {
- "type": "LONG"
}, - "externalId": {
- "type": "STRING",
- "size": 32
}
}, - "searchSpec": {
- "location_idx": {
- "properties": [
- "location"
]
}, - "createdTimeIdx": {
- "properties": [
- "createdTime"
]
}, - "lastUpdatedTimeIdx": {
- "properties": [
- "lastUpdatedTime"
]
}, - "externalIdIdx": {
- "properties": [
- "externalId"
]
}
}
}
]
}Required capabilities:
geospatialAcl:READ
Retrieves feature types by external ids. It is possible to retrieve up to 100 items per request, i.e. the maximum number of feature types for a tenant.
required | Array of objects [ 1 .. 100 ] items |
Feature type list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "ocean_temperature"
}
]
}{- "items": [
- {
- "externalId": "ocean_temperature",
- "dataSetId": 1278028,
- "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505,
- "properties": {
- "temperature": {
- "type": "DOUBLE"
}, - "location": {
- "type": "POINT",
- "srid": 4326
}, - "createdTime": {
- "type": "LONG"
}, - "lastUpdatedTime": {
- "type": "LONG"
}, - "externalId": {
- "type": "STRING",
- "size": 32
}
}, - "searchSpec": {
- "location_idx": {
- "properties": [
- "location"
]
}, - "createdTimeIdx": {
- "properties": [
- "createdTime"
]
}, - "lastUpdatedTimeIdx": {
- "properties": [
- "lastUpdatedTime"
]
}, - "externalIdIdx": {
- "properties": [
- "externalId"
]
}
}
}
]
}Required capabilities:
geospatialAcl:READ
List all feature types
Feature type list response.
Failed request reponse.
const allFeatureTypes = await client.geospatial.featureType.list();
{- "items": [
- {
- "externalId": "ocean_temperature",
- "dataSetId": 1278028,
- "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505,
- "properties": {
- "temperature": {
- "type": "DOUBLE"
}, - "location": {
- "type": "POINT",
- "srid": 4326
}, - "createdTime": {
- "type": "LONG"
}, - "lastUpdatedTime": {
- "type": "LONG"
}, - "externalId": {
- "type": "STRING",
- "size": 32
}
}, - "searchSpec": {
- "location_idx": {
- "properties": [
- "location"
]
}, - "createdTimeIdx": {
- "properties": [
- "createdTime"
]
}, - "lastUpdatedTimeIdx": {
- "properties": [
- "lastUpdatedTime"
]
}, - "externalIdIdx": {
- "properties": [
- "externalId"
]
}
}
}
]
}Required capabilities:
geospatialAcl:READgeospatialAcl:WRITE
Update one or more feature types
List of feature types to be updated. It is possible to add and remove properties and indexes. WARNING: removing properties will result in data loss in corresponding features.
required | Array of objects (GeospatialUpdateFeatureTypeSpec) [ 1 .. 100 ] items |
Feature type list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "ocean_temperature",
- "update": {
- "properties": {
- "add": {
- "depth": {
- "type": "DOUBLE"
}
}
}, - "searchSpec": {
- "add": {
- "depth_idx": {
- "properties": [
- "depth"
]
}
}
}
}
}
]
}{- "items": [
- {
- "externalId": "ocean_temperature",
- "dataSetId": 1278028,
- "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505,
- "properties": {
- "temperature": {
- "type": "DOUBLE"
}, - "location": {
- "type": "POINT",
- "srid": 4326
}, - "createdTime": {
- "type": "LONG"
}, - "lastUpdatedTime": {
- "type": "LONG"
}, - "externalId": {
- "type": "STRING",
- "size": 32
}
}, - "searchSpec": {
- "location_idx": {
- "properties": [
- "location"
]
}, - "createdTimeIdx": {
- "properties": [
- "createdTime"
]
}, - "lastUpdatedTimeIdx": {
- "properties": [
- "lastUpdatedTime"
]
}, - "externalIdIdx": {
- "properties": [
- "externalId"
]
}
}
}
]
}Required capabilities:
geospatialAcl:WRITE
Delete feature types.
List of feature types to be deleted. It is possible to delete a maximum of 10 feature types per request. Feature types must not have related features. Feature types with related features can be deleted using force flag.
Empty response.
Failed request reponse.
{- "items": [
- {
- "externalId": "ocean_temperature"
}
]
}{ }Required capabilities:
geospatialAcl:READgeospatialAcl:WRITE
Create features
Feature list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}
}
]
}{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}
]
}Required capabilities:
geospatialAcl:READ
Get features with paging support
Feature list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}
], - "nextCursor": "pwGTFXeL-JiWO8CZpgP23g"
}Required capabilities:
geospatialAcl:READ
List features based on the feature property filter passed in the body of the request. This operation supports pagination by cursor.
Feature list response.
Failed request reponse.
{- "filter": {
- "and": [
- {
- "range": {
- "property": "temperature",
- "gt": 4.54
}
}, - {
- "stWithin": {
- "property": "location",
- "value": {
- "wkt": "POLYGON((60.547602 -5.423433, 60.547602 -6.474416, 60.585858 -6.474416, 60.585858 -5.423433, 60.547602 -5.423433))"
}
}
}
]
}, - "limit": 100,
- "cursor": "4zj0Vy2fo0NtNMb229mI9r1V3YG5NBL752kQz1cKtwo"
}{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}
], - "nextCursor": "pwGTFXeL-JiWO8CZpgP23g"
}Required capabilities:
geospatialAcl:READ
Retrieves features by external ids. It is possible to retrieve up to 1000 items per request.
required | Array of objects (GeospatialItemExternalId) [ 1 .. 1000 ] items |
object (GeospatialOutput) Desired output specification. |
Feature list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "measurement_point_765"
}, - {
- "externalId": "measurement_point_863"
}
]
}{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}
]
}Required capabilities:
geospatialAcl:READgeospatialAcl:WRITE
Update features. This is a replace operation, i.e., all feature properties have to be sent in the request body even if their values do not change.
List of features to update.
Feature list response.
Failed request reponse.
{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}
}
]
}{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}
]
}Required capabilities:
geospatialAcl:READgeospatialAcl:WRITE
Delete features.
List of features to be deleted. It is possible to post a maximum of 1000 items per request.
required | Array of objects (GeospatialItemExternalId) [ 1 .. 1000 ] items |
Empty response.
Failed request reponse.
{- "items": [
- {
- "externalId": "measurement_point_765"
}, - {
- "externalId": "measurement_point_863"
}
]
}{ }Required capabilities:
geospatialAcl:READ
Search for features based on the feature property filter passed in the body of the request. The result of the search is limited to a maximum of 1000 items. Results in excess of the limit are truncated. This means that the complete result set of the search cannot be retrieved with this method. However, for a given unmodified feature collection, the result of the search is deterministic and does not change over time.
The feature search response.
Failed request reponse.
{- "filter": {
- "and": [
- {
- "range": {
- "property": "temperature",
- "gt": 4.54
}
}, - {
- "stWithin": {
- "property": "location",
- "value": {
- "wkt": "POLYGON((60.547602 -5.423433, 60.547602 -6.474416, 60.585858 -6.474416, 60.585858 -5.423433, 60.547602 -5.423433))"
}
}
}
]
}, - "limit": 100,
- "sort": [
- "temperature:ASC",
- "location"
]
}{- "items": [
- {
- "externalId": "measurement_point_765",
- "temperature": 5.65,
- "location": {
- "wkt": "POINT(60.547602 -5.423433)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}, - {
- "externalId": "measurement_point_863",
- "temperature": 5.03,
- "location": {
- "wkt": "POINT(60.585858 -6.474416)"
}, - "createdTime": 1629784673505,
- "lastUpdatedTime": 1629784673505
}
]
}Required capabilities:
geospatialAcl:READ
Search for features based on the feature property filter passed in the body of the request. The streaming response format can be length prefixed, new line delimited, record separator delimited or concatenated depending on requested output (see https://en.wikipedia.org/wiki/JSON_streaming).
The feature search streaming response - it can be length prefixed, new line delimited, record separator delimited or concatenated depending on requested output.
Failed request reponse.
{- "filter": {
- "and": [
- {
- "range": {
- "property": "temperature",
- "gt": 4.54
}
}, - {
- "stWithin": {
- "property": "location",
- "value": {
- "wkt": "POLYGON((60.547602 -5.423433, 60.547602 -6.474416, 60.585858 -6.474416, 60.585858 -5.423433, 60.547602 -5.423433))"
}
}
}
]
}, - "limit": 100,
- "output": {
- "jsonStreamFormat": "NEW_LINE_DELIMITED"
}
}{- "property1": "string",
- "property2": "string",
- "externalId": "my.known.id",
- "createdTime": 1730204346000,
- "lastUpdatedTime": 1730204346000
}Required capabilities:
geospatialAcl:READ
Search for features based on the feature property filter and perform requested aggregations on a given property. Aggregations are supported for all filters that do not contain stWithin, stWithinProperly, stContains and stContainsProperly search in 3D geometries.
| allowDimensionalityMismatch | boolean (GeospatialAllowDimensionalityMismatch) Optional parameter indicating if the spatial filter operators allow input geometries with a different dimensionality than the properties they are applied to. For instance, when set to true, if a feature type has a property of type POLYGONZM (4D), its features can be filtered using the |
GeospatialFeatureNotFilter (object) or GeospatialFeatureAndFilter (object) or GeospatialFeatureOrFilter (object) or GeospatialFeatureEqualsFilter (object) or GeospatialFeatureMissingFilter (object) or GeospatialFeatureLikeFilter (object) or GeospatialFeatureRegexFilter (object) or GeospatialFeatureRangeFilter (object) or GeospatialFeatureContainsAnyFilter (object) or GeospatialFeatureInFilter (object) or GeospatialFeatureStIntersectsFilter (object) or GeospatialFeatureStIntersects3dFilter (object) or GeospatialFeatureStWithinFilter (object) or GeospatialFeatureStWithinProperlyFilter (object) or GeospatialFeatureStContainsFilter (object) or GeospatialFeatureStContainsProperlyFilter (object) or GeospatialFeatureStWithinDistanceFilter (object) or GeospatialFeatureStWithinDistance3dFilter (object) (GeospatialFeatureFilter) | |
| aggregates | Array of strings Deprecated This parameter is deprecated. Use |
| property | string Deprecated This parameter is deprecated. Use |
| outputSrid | integer (GeospatialReferenceId) [ 0 .. 1000000 ] EPSG code, e.g. 4326. Only valid for geometry types. See https://en.wikipedia.org/wiki/Spatial_reference_system |
| groupBy | Array of strings names of properties to be used for grouping by |
| sort | Array of strings Sort result by the selected fields (properties or aggregates). Default sort order is ascending if not specified. Available sort direction: ASC, DESC, ASC_NULLS_FIRST, DESC_NULLS_FIRST, ASC_NULLS_LAST, DESC_NULLS_LAST. |
object (GeospatialAggregateOutput) A list of aggregations which are requested. |
The aggregate feature response. The present fields in the response body correspond to requested aggregations.
Failed request reponse.
{- "filter": {
- "and": [
- {
- "range": {
- "property": "temperature",
- "gt": 4.54
}
}, - {
- "stWithin": {
- "property": "location",
- "value": {
- "wkt": "POLYGON((60.547602 -5.423433, 60.547602 -6.474416, 60.585858 -6.474416, 60.585858 -5.423433, 60.547602 -5.423433))"
}
}
}
]
}, - "groupBy": [
- "category"
], - "sort": [
- "average:ASC",
- "category:DESC"
], - "output": {
- "min_temperature": {
- "min": {
- "property": "temperature"
}
}, - "max_speed": {
- "max": {
- "property": "speed"
}
}
}
}{- "items": [
- {
- "category": "first category",
- "max": 12.3,
- "min": 0.5,
- "average": 5.32
}, - {
- "category": "second category",
- "max": 14.3,
- "min": 0.7,
- "average": 8.32
}
]
}Required capabilities:
geospatialAcl:READgeospatialCrsAcl:READ
Compute custom json output structures or well known binary format responses based on calculation or selection of feature properties or direct values given in the request.
required | object |
Compute response.
{- "output": {
- "value": {
- "stTransform": {
- "geometry": {
- "ewkt": "SRID=4326;POLYGON((0 0,10 0,10 10,0 10,0 0))"
}, - "srid": 23031
}
}
}
}{- "items": [
- {
- "value": {
- "wkt": "POLYGON((0 0,10.5 0,10.5 10.5,0 10.5,0 0))",
- "srid": 23031
}
}
]
}Required capabilities:
geospatialAcl:READgeospatialAcl:WRITE
Put a raster into a feature property. The feature property must be of type RASTER.
The raster metadata.
Failed request reponse.
{- "srid": 3857,
- "width": 4,
- "height": 5,
- "numBands": 1,
- "scaleX": 1,
- "scaleY": 1,
- "skewX": 0,
- "skewY": 0,
- "upperLeftX": -0.5,
- "upperLeftY": -0.5
}Required capabilities:
geospatialAcl:READ
Get a raster from a feature property. The feature property must be of type RASTER.
XYZ specification for the output raster
| srid | integer (GeospatialReferenceId) [ 0 .. 1000000 ] EPSG code, e.g. 4326. Only valid for geometry types. See https://en.wikipedia.org/wiki/Spatial_reference_system |
| scaleX | number <double> |
| scaleY | number <double> |
| format required | string Value: "XYZ" |
object |
The binary file of the raster in the specified format
Failed request reponse.
{- "srid": 4326,
- "scaleX": 0,
- "scaleY": 0,
- "format": "GTiff",
- "options": {
- "JPEG_QUALITY": 1
}
}{- "error": {
- "code": 401,
- "message": "Could not authenticate.",
- "missing": [
- { }
], - "duplicated": [
- { }
], - "invalid": [
- { }
], - "dependencies": [
- { }
]
}
}Required capabilities:
geospatialAcl:READgeospatialAcl:WRITE
Delete a raster from a feature property. If there is no raster already, the operation is a no-op.
Empty response.
Failed request reponse.
{ }