Site Geometry
Site geometry is any feature you place on a site map — building footprints, capture boundaries, power and cooling systems, access gates, solar arrays, or utility routes. You can add geometry through the Raad web app or import it through the API, which is useful when you already have the locations in another system.
Typical API use cases:
- Bulk onboarding — import hundreds of building outlines from a CAD or GIS export when a new site is set up.
- Field surveys — push GPS points collected in the field into the map.
- System integration — sync geometry updates from your asset-management platform.
- Capture area prep — draw the boundary where you want a drone capture to fly.
All geometry is sent and returned as GeoJSON in WGS84 coordinates. You can also add simple points by passing a latitude and longitude.
Before You Start
Every API request needs a valid JWT token. If you do not have one, see the Authentication guide first. Set these variables at the top of your shell session so the snippets below just work:
export JWT_TOKEN="YOUR_JWT_TOKEN"
export SITE_UUID="YOUR_SITE_UUID"
You can find your site UUID from the site page URL or by listing your sites:
curl https://app.raad.com/api/v1/sites -H "Authorization: Bearer $JWT_TOKEN"
List Existing Geometries
Before importing, check what is already on the site.
curl "https://app.raad.com/api/v1/sites/$SITE_UUID/geometries?per_page=100" \
-H "Authorization: Bearer $JWT_TOKEN"
Optional filters:
| Filter | Example | Result |
|---|---|---|
system_type |
system_type=building_structure |
Only geometries with that system type. |
geometry_type |
geometry_type=polygon |
Only point, linestring, polygon, or multipolygon. |
page |
page=2 |
Page through large result sets. |
per_page |
per_page=25 |
Number of results per page (max 100). |
The response is a JSON:API list. Each geometry includes an id, label, systemType, geometryType, and the geometry GeoJSON:
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "siteGeometry",
"attributes": {
"label": "Building A",
"systemType": "building_structure",
"geometryType": "polygon",
"geometry": {
"type": "Polygon",
"coordinates": [[[-97.743, 30.267], [-97.742, 30.267], [-97.742, 30.266], [-97.743, 30.266], [-97.743, 30.267]]]
}
}
}
]
}
Add a Point from Latitude and Longitude
The fastest way to add a single marker, such as a gate, transformer, or monitoring station.
curl -X POST "https://app.raad.com/api/v1/sites/$SITE_UUID/geometries" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{
"latitude": 30.2672,
"longitude": -97.7431,
"label": "Main entrance gate",
"system_type": "linear_asset"
}'
Required:
latitudeandlongitude(WGS84).
Optional but recommended:
label— shown on the map.system_type— drives styling and filtering.
You will get back the created geometry with its UUID and a Location header.
Add a Polygon or Line from GeoJSON
For building outlines, capture boundaries, or any non-point shape, pass full GeoJSON.
curl -X POST "https://app.raad.com/api/v1/sites/$SITE_UUID/geometries" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{
"geojson": {
"type": "Polygon",
"coordinates": [
[
[-118.4081,33.7425],
[-118.4071,33.7425],
[-118.4071,33.7435],
[-118.4081,33.7435],
[-118.4081,33.7425]
]
]
},
"label": "Building A outline",
"system_type": "building_structure"
}'
Supported GeoJSON types are:
| GeoJSON type | Equivalent geometry_type |
Use for |
|---|---|---|
Point |
point |
Single markers such as gates or transformers. Equivalent to passing latitude and longitude. |
LineString |
linestring |
Utility corridors, roads, or array centerlines. |
Polygon |
polygon |
Building footprints, capture areas, equipment pads. |
MultiPolygon |
multipolygon |
Complex shapes or multiple disconnected parts. |
Working with GeoJSON polygons: the ring must be closed — the last coordinate must match the first. Each ring needs at least four positions. If you are copying from a GIS export, it is usually already closed; if you are drawing by hand, double-check.
Common System Types
The system_type field groups geometry by purpose. Pick the closest match from the list below.
| System type | Label | Use for |
|---|---|---|
capture_area |
Capture Area | Drone flight boundary for a capture |
building_structure |
Building Structure | Buildings, warehouses, data halls, enclosures |
grid_power |
Grid Power | Incoming utility power infrastructure |
on_site_power |
On-Site Power | Generators, solar arrays, fuel cells |
backup_power |
Backup Power | UPS rooms, battery banks |
cooling |
Cooling | Cooling towers, chillers, HVAC zones |
parking_lot |
Parking Lot | Parking or staging areas |
construction |
Construction | Temporary work areas or construction zones |
solar_array_centerline |
Solar Array Centerline | Rows or centerlines of solar arrays |
linear_asset |
Linear Asset | Roads, fences, utility corridors, access routes |
If you are unsure, building_structure or capture_area are safe defaults.
Update or Relabel Geometry
You can edit the label, description, or shape of an existing geometry.
Replace just the label:
curl -X PATCH "https://app.raad.com/api/v1/sites/$SITE_UUID/geometries/$GEOMETRY_UUID" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{"label":"Revised building outline","description":"Updated after site survey"}'
Replace the shape with new GeoJSON:
curl -X PATCH "https://app.raad.com/api/v1/sites/$SITE_UUID/geometries/$GEOMETRY_UUID" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
-d '{
"geojson": {
"type": "Polygon",
"coordinates": [
[
[-118.4082,33.7424],
[-118.4070,33.7424],
[-118.4070,33.7436],
[-118.4082,33.7436],
[-118.4082,33.7424]
]
]
}
}'
Geometry that has been used for flight planning may be locked. Locked records still allow label and description edits, but they reject shape or
system_typechanges. If you get a409response, that geometry is locked.
Geometry Validation Tips
Imports can fail if GeoJSON is malformed. The validation rules are:
| Rule | Requirement |
|---|---|
| Coordinate order | GeoJSON uses [longitude, latitude], not [latitude, longitude]. |
| WGS84 only | Coordinates must be within normal latitude/longitude ranges. |
| Closed rings | The first and last position of a polygon ring must be identical. |
| Minimum ring length | Polygons need at least 4 positions including the closing repeat. |
| Duplicate geometry | The exact same shape cannot be added twice to the same site. |
| Vertex limit | Keep a single geometry under 10,000 positions. |
| Properties size | Keep properties under 1 MiB and 50 keys. |
If an import fails, the API returns 422 Unprocessable Entity with a message explaining which rule was broken:
{
"error": "Validation failed",
"messages": ["Geojson polygon rings must have at least four positions and be closed"]
}
Next Steps
Once your site geometry is in place, you can:
- Reference the capture area in campaigns to request a drone flight.
- View geometries in the site map or pull them through WFS/vector tiles.
- Sync updated CAD exports back via the same
PATCHendpoint.