Skip to content

pmtiles extract extended functionality - write directly to S3-style bucket, and expose /extract endpoint #268

@jtbaker

Description

@jtbaker

Two feature requests for applications building on PMTiles:

  1. Direct S3 output for pmtiles extract
    pmtiles extract s3://bucket/input.pmtiles s3://bucket/output.pmtiles --bbox=... --maxzoom=...
    Write output directly to S3 instead of local disk (useful in disk-constrained environments)
    Eliminates the extra pmtiles upload step

  2. HTTP extract endpoint in pmtiles serve
    Expose /extract as a GET (or POST?) route that accepts source file, bbox, maxzoom, etc. as parameters, backed by a ExtractToWriter method, that writes back into the HTTP response stream.
    This would enable stateless, on-the-fly extracts useful for cases like pmtiles-offline, where small regional extracts need to be generated dynamically.

I've got some working code implementing these because I wanted to make sure it was possible to reuse the core extract algorithm - and it is, but wanted to raise an issue to discuss first to check your thoughts before opening a PR.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions