Verified display media and local viewing#

Use this procedure for the default single-scene ship-finding report or a visual replay of a completed detection. Network requests, credentials, downloads, and any viewing server belong to the host runtime. The bundled renderer remains an offline, one-shot utility.

NOTICE AND DISCLAIMER: This software automatically retrieves, accesses or interacts with external materials. Those retrieved materials are not distributed with this software and are governed solely by separate terms, conditions and licenses. You are solely responsible for finding, reviewing and complying with all applicable terms, conditions, and licenses, and for verifying the security, integrity and suitability of any retrieved materials for your specific use case. This software is provided “AS IS”, without warranty of any kind. The author makes no representations or warranties regarding any retrieved materials, and assumes no liability for any losses, damages, liabilities or legal consequences from your use or inability to use this software or any retrieved materials. Use this software and the retrieved materials at your own risk.

Discover the authorized API#

Resolve the GeoNeMo HTTP API origin from trusted host configuration or an explicit user-supplied HTTP origin. An MCP endpoint or catalog:// record reference does not identify the media API origin; do not guess ports or treat a catalog URI as a download URL. If the origin is unavailable, continue authorized detection/result retrieval and request the missing origin before downloading.

At that origin, read GET /v1/discovery. Require an available media capability advertising product-manifest, inspect, and download. Keep the discovery response as provenance. Use host-authorized HTTP access with finite timeouts and no redirects to other origins; stop on unavailable capability or incompatible contract instead of probing alternate endpoints.

Exhaust the product manifest and select VV#

First exact-read the succeeded run and exhaust all detector result pages. Preserve the pages unchanged, require stable run/source/model metadata and unique candidate IDs, and check that the aggregate candidate count equals total. Reuse this exact bundle when already available.

Construct record routes using the GeoNeMo media contract: encode the unchanged record ID’s UTF-8 bytes as unpadded URL-safe base64, prefix with b64., and use that as the {record_id} path segment. Preserve the original ID in metadata. The authorized GeoNeMo client performs this encoding when available; do not splice a raw ID containing slashes into a route.

Read GET /v1/media/records/{collection}/{record_id}/product-manifest?limit=100, following every opaque next_cursor on the same record until null. Product manifests require contract 2.1 or newer within major 2, completeness: complete-safe, and stable page metadata. Require collection, record ID, product type, canonical_safe_name, inventory_sha256, and tree_sha256 to match the detector source (canonical_product_name is its corresponding name field). Reject repeated cursors, duplicate asset IDs, changed metadata, or an aggregate file count different from total_files; bound retrieval to the contract’s 4096-file maximum. Keep every original page.

From the complete files list, select exactly one role: measurement, polarization: VV TIFF and exactly one role: annotation, polarization: VV XML. Require exact asset IDs, nonzero sizes, and SHA-256 hashes. These must belong to the detector-bound complete SAFE; never select a preview, quality mask, another product, or a filename guessed from discovery.

Inspect the exact measurement with GET /v1/media/records/{collection}/{record_id}/inspect?asset={asset_id}. Require the same collection, record and asset and one supported method: affine_crs, embedded_gcps, or safe_annotation_gcps. The GeoNeMo server uses embedded affine CRS first, embedded GCPs second, then the manifest-associated retained annotation. Preserve the inspection receipt. Reject missing or ambiguous association; do not repair manifests through remote tools.

Download both exact assets using GET /v1/media/records/{collection}/{record_id}/download?asset={asset_id} into a fresh run-scoped workspace directory. Require response media type, X-GeoNemo-Media-Asset, X-GeoNemo-Asset-SHA256, and X-GeoNemo-SAFE-Inventory-SHA256 to match the selected assets and run provenance. The HTTP representation role is X-GeoNemo-Media-Role: manifest; this is distinct from semantic roles measurement and annotation. Verify exact byte size and computed SHA-256. Range responses require contiguous full assembly and validated Content-Range. Retain original manifest pages, inspection, and download receipts. Stop on any mismatch.

Pass every unchanged result page and a single VV descriptor to the renderer: band: VV, collection, record_id, asset_id, media_contract_version (major 2, minor >=1), media_type: image/tiff, media_role: source, the inspected georeferencing_method, staging-relative file, and sha256. Add annotation containing the exact XML’s file, sha256, and asset_id. The annotation is required when the measurement lacks embedded georeferencing. Original source inputs and receipts stay beside the output under user ownership.

The renderer preserves the native VV pixel grid. Its grayscale uses 20*log10(DN) with 2nd/98th percentile bounds sampled on a grid whose longest edge is at most 2048 pixels; zero/nodata is black. This is presentation derived from source measurement, not calibrated backscatter. It does not modify or reclassify detector findings. The 600-million-pixel, 2-GiB TIFF and 8-MiB annotation limits are enforced; sheets use at most 200 candidates, while the table contains all results (maximum 50,000).

Completion and viewing#

Before reporting completion, verify the output manifest and hashes, source image, hollow candidate circles, searchable table with every candidate, row-to-source-pixel navigation, provenance and limitations, and a working clickable link to report.html. A succeeded zero-candidate run still gets its source image and empty table; never fabricate markers. Missing media, dependencies, rendering, or a usable link means the requested report is incomplete. Preserve the detector’s succeeded status and exact results; state the visualization error without substituting a generic report or declaring zero vessels.

When the user asks to serve or view the report, have the host start a viewing server bound to 127.0.0.1, serving only the generated report/ directory. For example, replace the absolute directory and choose an available port in this host command:

python3 -m http.server 8765 --bind 127.0.0.1 --directory /absolute/run-directory/report

Check an HTTP GET of http://127.0.0.1:8765/report.html and any referenced image assets, then give the working browser link. If execution is remote, provide an SSH local-forward command using the actual SSH host and port, such as ssh -N -L 8765:127.0.0.1:8765 user@execution-host; the user’s browser then opens http://localhost:8765/report.html. Do not claim a remote localhost link is reachable on the user’s machine without that connection. Keep the server available for viewing and report its process/port so the host can stop it when requested. Never expose the staging directory, credentials, or a public interface as part of this viewing step.