File optimization
When you upload a file, Sarkoa builds a second copy of it that web maps can read quickly. Vectors become PMTiles, rasters become Cloud Optimized GeoTIFF (COG). Your original is left alone. Download always gives you back the bytes you sent.
Most people never need to think past that. This page covers the parts that do come up.
The four things worth knowing
- Your original is never modified. Optimization writes a new copy alongside it.
- Source uploads stop at 10 GiB. Split or reduce larger sources before upload. Prepared map-ready files have a separate limit below.
- Rasters open in one of three display modes, chosen automatically. You can change it later.
- Optimization is not analysis. See the next section for exactly what that rules out.
What optimization does not do
Sarkoa is a hosting and delivery platform, not a processing pipeline. It will not:
- Mask clouds or shadows
- Apply atmospheric correction
- Harmonize differences between sensors
- Mosaic mixed-resolution sources into a single product
If your work needs any of those, run them first and upload the result.
Size limit for remote optimization
Cloud optimization accepts source files up to 10 GiB. Anything larger is rejected for automatic processing, because the conversion would not finish reliably.
For a source over 10 GiB, split it into smaller files or reduce it before uploading. The current CLI checks this limit on the source and does not use --cloud-native to bypass it or upload a second copy.
The web app and QGIS plugin also accept already optimized PMTiles or COG files up to 500 MiB without processing them again. Use .pmtiles, .cog.tif or _cog.tif filenames so the upload is recognized as prepared data. Build and check these files with your own local tools first; the QGIS dock does not perform local optimization. This is only an option when the prepared file fits the separate size limit.
Watching it happen
Processing usually takes a few minutes. Status shows on the file row while it runs.
- On the upload screen, expand How we'll optimize the copy for a summary of what will happen to the file you queued.
- After processing, the info (ⓘ) control on the files table opens the optimized copy's details. It is read-only.
- If processing fails, the app shows a reference code and a Download original file button. Your upload is still there.
Failures usually come down to an unsupported format, a missing coordinate system, or a source over the size limit. Troubleshooting walks through each one.
How rasters display
Every raster is sorted into one of three kinds at optimize time, based on what is actually in the file.
| Kind | What it is | How it is drawn |
|---|---|---|
| Visual imagery | Photographs: aerial shots, drone captures, satellite RGB | Colours are baked into the tiles, which keeps them small and fast |
| Measurement values | One band of numbers: elevation, temperature, a vegetation index | Values are preserved in the tiles, so colour ramps and thresholds stay adjustable in the viewer |
| Categorical map | Land cover, zoning, anything with a fixed colour table | The file's own palette is used, so classes keep their intended colours |
Sarkoa guesses from the file itself. A colour table means categorical. A three-band file tagged as RGB means visual. Anything else is treated as measurement.
The guess is usually right, and it matters most when it is wrong. A single-band elevation model read as visual imagery cannot be thresholded, and a photo read as measurement will look strange. If that happens, open Processing details on the file and switch between Visual and Measurement. Sarkoa rebuilds the map copy from your original upload, which takes a few minutes. The original is not affected, and maps keep showing the current copy until the new one is ready. If the rebuild fails, they keep the current copy and you get a notification saying so.
One thing to expect: switching kinds resets the layer's saved style on that file, because a colour ramp and an RGB band mapping are not interchangeable. Maps that already use the layer keep their own copy of the style.
Updating a file that maps already use
Maps refer to a file by its ID, and each layer keeps its style against that ID. So when the data changes (a nightly refresh, a corrected survey, this month's numbers) replace the file's contents rather than uploading a new file. The ID stays the same, so every map using it picks up the new data with its styles, popups and legends as they were.
Replacing works through the API, the MCP (upload_presign and upload_complete with replace_asset_id) or a direct replaceAssetId on the upload calls. A few things to expect:
- The current version keeps serving while the new one is optimized. The file stays Active the whole time. Maps switch over only once the new copy is ready.
- If optimizing the new version fails, nothing changes. The previous version stays live, the file's status says the replacement failed, and you get a notification with the reason. Fix the file and replace it again.
- Same kind only. A vector replaces a vector and a raster replaces a raster. The format can change within a kind, for example GeoJSON to GeoParquet, because maps read the optimized copy, not the original format.
- Check what the maps use. If a layer is styled by a field the new file no longer has, or by a band it no longer has, the file's status lists that layer so you can update its style.
- Not for time series. A series gets a new frame instead. Folders, live feeds and a file that is still processing cannot be replaced either.
The previous version is kept for at least an hour after the switch, so anyone with the map already open is not left with missing tiles. A daily cleanup removes it after that, so it can stay in storage for up to about a day. Storage counts the new file's size from the moment it goes live.
Advanced: what conversion actually changes
You can skip this section unless a layer is not drawing the way you expect.
Rasters
Rasters are reprojected to Web Mercator (EPSG:3857) and rewritten as a COG. Scientific data keeps its numeric precision: a 16-bit multi-band stack stays 16-bit. Band layout can change where conversion needs transparency or derived values, such as a speed band for wind components. Reprojection and resampling can change individual pixel values; download the original when you need its exact grid and samples.
A raster on another world, such as the Moon or Mars, gets the same grid, with its numbers computed from longitude and latitude on that world, so x and y there are an angular grid and not metres on its surface. Lengths shown to you are converted to the world's real size. See Maps of other worlds.
Photographic RGB and scientific stacks are treated differently. A file tagged with RGB colour interpretation gets image-style resampling and transparency handling. A multi-band UInt16 export with undefined band roles is treated as data, so it gets no forced RGB tagging and no invented alpha channel. Declared nodata is respected either way.
Transparency is resolved in this order:
Show diagramHide diagram
Rendering diagram…
flowchart TB
RIn[Source raster] --> RNodata{Transparency source?}
RNodata -->|Internal mask| RMask[Keep mask as alpha]
RNodata -->|Band-4 alpha| RAlpha[Keep existing alpha]
RNodata -->|Declared nodata| RDecl[Use metadata nodata]
RNodata -->|Corners exactly 0 or 255| RCorner[Treat border as transparent]
RNodata -->|Photographic RGB otherwise| RZero[Treat 0 as transparent]
RMask --> RStyle[Map-ready COG]
RAlpha --> RStyle
RDecl --> RStyle
RCorner --> RStyle
RZero --> RStyleThe corner rule only applies to photographic RGB, and only when at least three of the four corners are exactly 0 or exactly 255. That catches the black or white borders left by a rotated orthophoto without eating real data.
The rest, briefly:
- Colour tables are carried over, so categorical rasters keep the colours the source intended.
- Display range for continuous rasters is stored as 2nd to 98th percentile hints, so the default view is readable instead of being washed out by a handful of outliers.
- Overviews use nearest-neighbour for categorical and masked rasters, which keeps class edges sharp, and averaging for continuous imagery, which looks better zoomed out.
- Compression is lossless for float bands, 16-bit and up, and anything with a mask or alpha channel. Only 8-bit photographic RGB may use lossy compression, and only because the size saving is large and the quality cost is invisible on a photo.
Vectors
Vectors are encoded to PMTiles in WGS 84 (EPSG:4326). On another world the coordinates are planetocentric, east-positive longitude and latitude on that world instead. A polygon that crosses 180° is cut in two there. See Maps of other worlds.
- Polygon outlines. Sarkoa adds separate outline lines so you can style a fill's border thicker than a hairline. Very large layers skip this and fall back to hairline outlines, since the extra geometry would push tiles over their size budget.
- Feature retention. Encoding avoids the usual point-thinning at low zoom, so attribute filters and range sliders still see your features when the map is zoomed out. Dense layers may still drop some features at the coarsest zooms when a tile would otherwise be too big.
- Detail. Overview zooms are simplified for size. The deepest zoom keeps every vertex from your source. City-scale layers get a higher detail floor so neighbourhoods do not look blocky, and worldwide layers stay coarser so encoding finishes in reasonable time. Shared borders between neighbouring polygons are simplified together, which avoids the gaps and spikes you get when each polygon is simplified on its own.
Will this GeoTIFF link open in QGIS?
For a browser review, send the Clearview map. For local desktop analysis, download the original Clearview GeoTIFF. To read only parts of a remote raster in QGIS, test the exact HTTPS address you intend to send. Here is a public Sentinel-2 red-band COG you can use as a working comparison.
url='https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-l2a-cogs/18/T/VR/2026/11/S2A_18TVR_20261117_0_L2A/B04.tif'
curl --silent --show-error --range 0-15 --dump-header - --output first-16.bin "$url"
gdalinfo "/vsicurl/$url"
The first request returns 206 Partial Content, a Content-Range starting with bytes 0-15/, and a 16-byte file. GDAL identifies a 10,980 × 10,980 GeoTIFF in EPSG:32618 with one band and four overviews. The two checks establish what the server delivers and what the data contain.
In QGIS, open Data Source Manager → Raster, select the network/protocol source option, enter the direct address and add the layer. Zoom to its extent. If your link returns HTML, open it in a browser to identify a viewer or sign-in page. A whole-file 200 OK in response to a range request means the host did not serve the requested slice. For a protected source, repeat the check with the recipient's authorized access. GeoTIFF sharing options
Related
- Concepts: supported formats, and how originals relate to map copies
- Custom maps: styling a layer once it is ready
- CLI and QGIS plugin: upload workflows and limits
- Maps of other worlds: what is accepted and refused on the Moon, Mars and other worlds