Spatial Analysis

Search at location

Performs a spatial search on a table using geometry or address input, with optional buffer distance. Supports INTERSECTS, WITHIN, and CONTAINS query semantics and returns matching feature attributes (or all attributes using '*'). Supports attribute filters and pagination via limit/offset.

post/v1/spatial/searchAtLocation

Request

  • Base URL: https://api.cloud.precisely.com
  • URL: https://api.cloud.precisely.com/v1/spatial/searchAtLocation
  • Auth: one of:
    • bearerAuth (a scheme the document does not define)
    • ApiKeyAuth (a scheme the document does not define)

Query parameters

sortBystring

Single attribute used to order returned results. If omitted, records are ordered by table primary key.

sortOrderstring

Sort direction. Allowed values: ASC or DESC. Default: ASC.

limitinteger

Maximum number of records returned. Min 1, max 1000, default 10.

offsetinteger

Offset applied to limit. Default 0.

Headers

X-Request-Idstring

The X-Request-Id header is optional but helpful for tracking requests. It acts as a unique identifier for troubleshooting and debugging issues effectively. Maximum length: 38 characters.Example: e02f00d5-e3a9-4fd6-aen1-3e5451abee46

Request body

tableNamestring required

Name of the table containing spatial data used by the operation.

attributeFilterstring

Optional scalar attribute filter expression using logical operators (AND/OR/NOT) and comparison operators such as =, <>, <, <=, >, >=, IS NULL, LIKE, BETWEEN, and IN.

spatialOperationstring

Type of spatial query. Allowed values: intersects, within, contains. Default value is "intersects".

bufferDistancestring

Optional buffer around the input geometry (for example "100 m" or "1 km"). Supports positive values for all geometries; negative values are supported for polygon input to create inward buffers.

attributesstring[] required

List of table attributes to include in the response. Use ["*"] to return all attributes.

Example request

{
  "tableName": "/risks/flood_risk",
  "location": {
    "format": "wkt",
    "value": "\"geometry\": \"POLYGON(((-96.8,30.5),(-97.7,30.5),\n(-97.7,29.9),(-96.8,29.9),(-96.8,30.5)))\"",
    "country": "USA"
  },
  "attributeFilter": "rms_err < 50",
  "spatialOperation": "intersects",
  "bufferDistance": "\"100 m\"",
  "attributes": [
    "id",
    "name",
    "location"
  ]
}

Response

Successful retrieval of searchAtLocation operations

Changes

No recorded changes to this operation across all 1 revision of this API.