Maps integrations

The orthophoto path, end to end. Your processing finishes, and a few minutes later your customer has a tiled, shareable map in their own Ollebo space — with no manual upload in between. This page assumes you have a client and a token; if not, start with Integrations.

What you need

One georeferenced raster. It has to carry its coordinate system and its extent — a GeoTIFF straight out of ODM, Pix4D, Metashape or your own GDAL step is exactly right. A cloud-optimised GeoTIFF is welcome but not required; we build the tiles either way.

The one file that always fails

ODM writes both odm_orthophoto.tif and odm_orthophoto_render.tif. The second is a preview with no coordinate system and it cannot be tiled — the map goes failed with a CRS error. Send the first. If you are not sure which you have, gdalinfo on the file: a usable raster names a coordinate system, a preview says CRS is invalid.

Producing the orthophoto in the first place is covered in Make a map.

The whole thing, as a script

Token to tile URL. Drop this at the end of your processing job, with $TOKEN and $SPACE_ID already known for the customer.

#!/usr/bin/env bash
set -euo pipefail

API=https://www.ollebo.com/api/integration
FILE=odm_orthophoto.tif
NAME="Site A — week 12"

# 1. Create the asset and take the upload URL from the same response.
CREATE=$(curl -sS -X POST "$API/spaces/$SPACE_ID/assets" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{
        \"filename\": \"$(basename "$FILE")\",
        \"name\": \"$NAME\",
        \"type\": \"image/tiff\",
        \"sizeBytes\": $(stat -c%s "$FILE"),
        \"tags\": \"site-a\",
        \"width\": 0,
        \"height\": 0
      }")

ASSET_ID=$(jq -r .asset.id <<<"$CREATE")
UPLOAD_URL=$(jq -r .upload.url <<<"$CREATE")

# 2. Send the bytes straight to storage.
curl -sS -X PUT "$UPLOAD_URL" -H "Content-Type: image/tiff" --upload-file "$FILE"

# 3. Publish it as a map.
MAP_ID=$(curl -sS -X POST "$API/spaces/$SPACE_ID/maps" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d "{ \"asset\": \"$ASSET_ID\", \"name\": \"$NAME\",
        \"tags\": \"site-a\", \"type\": \"regular\",
        \"access\": \"public\" }" | jq -r .map.mapid)

# 4. Wait for the tiles. Back off; a big raster takes minutes.
DELAY=5
for _ in $(seq 1 60); do
  MAP=$(curl -sS -H "Authorization: Bearer $TOKEN" \
        "$API/spaces/$SPACE_ID/maps/$MAP_ID" | jq -r .map)
  STATUS=$(jq -r .status <<<"$MAP")
  [ "$STATUS" = ready ]  && { jq -r .tilesurl <<<"$MAP"; exit 0; }
  [ "$STATUS" = failed ] && { echo "tiling failed" >&2; exit 1; }
  sleep "$DELAY"
  DELAY=$(( DELAY < 30 ? DELAY * 2 : 30 ))
done

echo "still not ready after 60 checks" >&2
exit 1

What the statuses mean

POST /maps answers 202. That is accepted, not finished: the raster is handed to our tiling workers and the row starts at pending.

status Meaning
pendingQueued. No worker has picked it up yet.
processingTiles are being generated.
readyDone. tilesurl is populated and servable.
failedThe raster could not be tiled. Almost always the source file.

Roughly: seconds for a small site, a few minutes for a large survey. Poll with a growing delay rather than a tight loop.

Showing it in your own app

tilesurl is an ordinary XYZ template, so any map library can take it directly. MapLibre:

map.addSource('site-a', {
  type: 'raster',
  tiles: [ tilesurl ],
  tileSize: 256,
})

map.addLayer({ id: 'site-a', type: 'raster', source: 'site-a' })

Leaflet's L.tileLayer(tilesurl) and OpenLayers' XYZ source work the same way.

Public or private — read this before you choose

access is not only a permission, it decides who can fetch the tiles and at what resolution.

public

Tiles are fetchable from anywhere with no credentials, so they render in your app, in a client's browser, anywhere. Zoom-limited to about 30 cm/px. Also listed on the customer's public space page.

private

Full drone resolution, visible only to members of the space. Every tile request must carry the end user's Keycloak token.

Private tiles will not render in your frontend today

Our tile host authorises each request against the viewer's own token, which lives in an Ollebo session cookie and never reaches your domain. So a private map viewed from your site returns 401, however valid your backend's token is. Use public for anything you render yourself, and link your customer into Ollebo for the full-resolution private version. We would rather say so here than let you find it in production.

Replacing and deleting

A map is fixed once it is made. A new flight means a new asset and a new map — which is usually what you want, since it keeps the history. Delete the old one when you no longer need it:

curl -sS -X DELETE -H "Authorization: Bearer $TOKEN" \
  "$API/spaces/$SPACE_ID/maps/$MAP_ID"

The source asset survives, so this does not free storage. If you publish weekly, budget storage for every orthophoto you upload, not for the maps you keep.

Troubleshooting

Symptom Cause
Map goes straight to failedThe raster has no coordinate system — usually the _render.tif preview.
Map sits at pending for a long timeA large raster behind a queue. If it has not moved in an hour, tell us the map id.
The PUT succeeds but tiling failsContent-Type on the PUT did not match the type you declared.
413 quota_exceededThe space is full. Old assets still count — deleting maps does not help.
Tiles 401 from your frontendThe map is private. See the note above.
403 space_forbiddenYour customer was removed from that space. Re-read GET /spaces.

Also worth publishing

The same three calls publish vector data and 3D meshes — boundaries, flight lines and inspection points over the imagery, or the textured model beside it. Formats and bodies are on the Integrations overview.