Load your own data#

Register your own imagery as catalog records, so that agents and clients can search for it and preview it. A record holds a footprint, an acquisition time, metadata and a reference to a raster file. The server reads the file in place; nothing is uploaded or copied.

For Sentinel-2 L1B products, use Serve your L1B data as ortho images and embeddings instead.

Prerequisites#

  • A connected client (Use the Python client) with tools:execute to ingest and services:read to search and preview (Sign in and tokens).

  • Raster files on a file system the server reads, under one of the directories in the media_roots setting. No part of the path below that directory may be a symbolic link.

  • For previews, the media gateway turned on (media_gateway_enabled). Your operator sets both; see Server settings.

Steps#

  1. Prepare a record for each scene. Give the footprint as a GeoJSON geometry in WGS84 longitude and latitude, and the acquisition time with a time zone:

    from datetime import datetime, timezone
    from geonemo.client import CatalogRecordDraft
    
    footprint = {
        "type": "Polygon",
        "coordinates": [[
            [4.10, 51.85], [4.35, 51.85], [4.35, 52.00],
            [4.10, 52.00], [4.10, 51.85],
        ]],
    }
    record = CatalogRecordDraft(
        id="harbor-2026-03-14",
        source_uri="/data/imagery/harbor-2026-03-14.tif",
        text="Harbor entrance, clear sky",
        metadata={"platform": "my-sat-1", "gsd_m": 3.0},
        geometry=footprint,
        acquired_at=datetime(
            2026, 3, 14, 10, 42, tzinfo=timezone.utc
        ),
    )
    

    Field

    Holds

    id

    Your record ID, unique in the collection

    source_uri

    The raster’s path on the server, as a plain path or a file:// URI

    text

    Free text that text search matches

    metadata

    JSON values that search filters match, such as platform

    geometry

    The footprint that box search matches

    acquired_at

    The acquisition time; it is stored in UTC

    media

    Optional: a media manifest, described next

    To attach several files to one record, give a media manifest instead of source_uri. product_root is relative to a media root, and each relative_path is relative to product_root:

    from geonemo.client import (
        CatalogMediaAssetDraft,
        CatalogMediaManifestDraft,
    )
    
    media = CatalogMediaManifestDraft(
        product_root="my-imagery/harbor-2026-03-14",
        assets=(
            CatalogMediaAssetDraft(
                id="visual",
                label="True color",
                roles=("preview", "inspection"),
                relative_path="visual.tif",
                media_type="image/tiff",
                byte_size=48_213_504,
            ),
        ),
        default_inspection_asset_id="visual",
    )
    

    Each asset needs id, label, roles (preview, inspection, download), relative_path, media_type and byte_size. byte_size must equal the file’s size; the server refuses to serve a file whose size has changed. An optional sha256 is checked on download. The manifest must name a preview_asset_id or a default_inspection_asset_id. When a record has a manifest, the media service reads the manifest’s files and ignores source_uri.

  2. Ingest the records into a collection. The first ingest into a collection name creates the collection; there is no separate create call.

    from geonemo.client import CatalogIngestRequest
    
    receipt = client.catalog.ingest(
        CatalogIngestRequest(
            collection="my-imagery", records=(record,)
        ),
        idempotency_key="my-imagery-batch-0001",
    )
    print(receipt.accepted, receipt.persisted)
    print(receipt.duplicate)
    

    REST: POST /v1/catalog/ingest with collection and records as JSON and an Idempotency-Key header, which is required.

    One request takes 1 to 500 records with unique IDs. The client sends a hash of the request as the key when you give none, so repeating the same call is safe. Repeating a key with the same body returns the first receipt with duplicate set to True and writes nothing. Repeating a key with a different body fails with 409 (ServicesConflictError). Ingesting an existing record ID under a new key replaces that record.

  3. Confirm that the record is found by a box search:

    from geonemo.client import CatalogSearchRequest
    
    page = client.catalog.search(
        CatalogSearchRequest(
            collection="my-imagery",
            bbox=(4.0, 51.8, 4.5, 52.1),
        )
    )
    for hit in page.items:
        print(hit.id, hit.source_uri)
    

    REST: POST /v1/catalog/search. Search results never show a server path: a local file appears as catalog://<collection>/<record_id>. A record without geometry is not matched by a box search.

    Then check that the server can read the raster (Preview imagery):

    info = client.media.inspect(
        "my-imagery", "harbor-2026-03-14"
    )
    print(info.format, info.width, info.height)
    print(info.crs, info.geo_bbox)
    preview = client.media.preview(
        "my-imagery", "harbor-2026-03-14"
    )
    

    REST: GET /v1/media/records/{collection}/{record_id}/inspect and .../preview. crs and geo_bbox come from the raster’s own georeferencing; they are None for a file without it.

  4. Optional: ingest a whole directory the server can read. There is no client method for this; call the REST route:

    curl -N -X POST \
      "https://geonemo.example.com/v1/catalog/ingest-directory" \
      -H "Authorization: Bearer $TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"path": "my-imagery", "batch_size": 16}'
    

    path is absolute or relative to a media root, and must be under one. The server walks the directory and its subdirectories, skips symbolic links, and takes every file whose name has an image/ media type. It writes to the server’s default collection (the catalog_collection setting), not one you choose. Each record gets the ID media_<hash> and the metadata filename, relative_path, width, height, format, source_checksum and media_type. These records have no footprint or acquisition time, so a box or time search does not find them.

    The response is a stream of server-sent events: progress events, then one done event with the counts discovered, upserted, skipped, skipped_existing and errors. Records that already exist are skipped unless you set "replace_existing": true. Files that cannot be read as images are skipped and counted in errors.

Result#

Against FakeGeoNeMoClient (Use the Python client), steps 2 and 3 print:

1 1
False
harbor-2026-03-14 catalog://my-imagery/harbor-2026-03-14

The fake does not read files, so the media calls need a server. Agents find the records with the catalog tools (Search the catalog).

Map a STAC item#

The toolkit has no STAC importer. To load STAC items, copy their fields into a CatalogRecordDraft:

STAC item field

CatalogRecordDraft field

id

id

geometry

geometry

properties.datetime

acquired_at, parsed with its time zone

properties.platform, properties.instruments

metadata keys

assets.<key>.href of a local file

source_uri, or an asset’s relative_path

assets.<key>.type

An asset’s media_type

assets.<key>.title

An asset’s label

A remote href (https, s3, gs, az) can be stored as source_uri and is returned by search, but the media service reads only files on the server, so it cannot preview it.

Formats and limits#

Item

Rule

Raster formats

GeoTIFF and Cloud Optimized GeoTIFF (.tif, .tiff), JPEG 2000 (.jp2, .j2k), PNG, JPEG (.jpg, .jpeg), WebP

Georeferencing

Read from the raster; a manifest asset can also name an annotation file

Records per ingest

1 to 500, with unique IDs

Collection name

Letters, digits, ., _ and -, starting with a letter or digit; at most 256 characters

Record ID

At most 4096 characters

Acquisition time

Must include a time zone

Idempotency key

1 to 256 visible ASCII characters

File location

Under a media_roots directory, with no symbolic links

File size and pixels

max_media_source_bytes and max_media_pixels; for a manifest’s GeoTIFF or JPEG 2000 file, max_manifest_media_source_bytes and max_manifest_media_pixels

Directory ingest

At most max_ingest_directory_files files, each at most max_ingest_media_bytes

The values of these settings are in Server settings. Every route and schema is in Catalog API.