The GetBySpatial query is used to search datasets based on spatial methods and spatial inputs. This query allows users to specify a location using different input types and perform spatial functions on the given input with the requested dataset.
Supported datasets are:
- Addresses
- Buildings
- Parcels
- Places
- WildfireRisk
- FloodRisk
Query syntax:
getBySpatial(
wkt: String
geoJson: String
address: String
country: String = "USA"
spatialFunction: SpatialFunction!
inputID: String
): SpatialRelationEntity| Parameter | Type | Required | Description |
|---|---|---|---|
| wkt | String | Optional | Well-Known Text (WKT) of a location. Either one of GeoJson, WKT, or Address input is required. |
| geoJson | String | Optional | Geometry of a location (Optional). Either one of GeoJson, WKT, or Address input is required. |
| address | String | Optional | The address to search on. Either one of GeoJson, WKT, or Address input is required. |
| country | String | Optional | The country in which the spatial search is being performed:
|
| spatialFunction | SpatialFunction | Required | The type of spatial query. Possible values are:
|
| inputID | String | Optional | A user-supplied identifier that helps track or correlate the request. |
Example: Spatial query with Well-Known Text (WKT) input
This query provides an example of using a WKT polygon to intersect Flood Risk.
query propertyAttributesByAddress {
getBySpatial(wkt: "POLYGON ((-105.284476 40.013667, -105.284031 40.013758, -105.283569 40.013766, -105.283483 40.014156, -105.283913 40.014185, -105.284331 40.014247, -105.284589 40.014304, -105.284476 40.013667))"
spatialFunction:INTERSECTS) {
floodRisk {
data {
floodZone
baseFloodElevationFeet
femaMapPanelIdentifier
mapEffectiveDate
}
}
}
}Example: Spatial query with GeoJson input
Returns all addresses that intersect with the specified point.
{
getBySpatial(
geoJson: "{
\"type\":\"Point\",
\"coordinates\":[-83.204538,30.677129],
\"crs\":{
\"type\":\"name\",
\"properties\":{
\"name\":\"epsg:4326\"
}
}
}"
spatialFunction: INTERSECTS
) {
addresses {
data {
preciselyID
addressNumber
streetName
unitType
unit
city
}
}
}
}