Search nearby locations
Identifies nearest features from a table relative to an input geometry or address, within a required search distance. Supports result limiting, attribute filtering, custom distance/unit column names, and custom inputPoint/targetPoint/bearing attribute names. By default, results are ordered from nearest to farthest distance, with optional sortBy/sortOrder override.
Request
- Base URL: https://api.cloud.precisely.com
- URL: https://api.cloud.precisely.com/v1/spatial/findNearest
- Auth: one of:
- bearerAuth (a scheme the document does not define)
- ApiKeyAuth (a scheme the document does not define)
Query parameters
Single attribute used to order returned results. If omitted, ordering is by computed distance.
Sort direction. Allowed values: ASC, ASCENDING, DESC, DESCENDING. Default: ASC.
Maximum number of records returned. Min 1, max 1000, default 10.
Offset applied to limit. Default 0.
Headers
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
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",
"distanceAttributeName": "dist",
"withinDistance": "\"10 mi\"",
"attributes": [
"id",
"name",
"location"
],
"maxFeatures": 5,
"uomAttributeName": "measurementUnit",
"inputPointAttributeName": "ip",
"targetPointAttributeName": "tp",
"bearingAttributeName": "bearingAngle"
}Response
Successful retrieval of find nearest operations
Changes
No recorded changes to this operation across all 1 revision of this API.