-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: patch header/metadata from JSON #63
Comments
Is it always necessary to write to a new file? Given that PMTiles can become quite large, updating the metadata in place would be beneficial. |
Yes, same as flatgeobuf, parquet or video files, there is no extra space left in the file. |
@bdon Since you sort of mentioned it in protomaps/basemaps#160 (comment), it would be really handy if I just could push all my extra data into the metadata json in a simple way. |
the command would be something like
It would be fast+atomic but require temporary disk space as large as the new file, since it writes a completely new file. |
an open question is whether we ever want to expose the ability to modify the header (non-metadata parts) - I guess if you accidentally set the wrong bounds or tile type, or want to change the center position/zoom? |
I vote for just metadata for now. |
Step one is making |
I have a question related to this -- Is it currently possible to add additional metadata to the output pmtiles file when running If this is not currently possible, I assume this would be a bit easier than an in-place method that works against existing pmtiles files? |
( |
Yeah I would say use the |
Needing this now, currently plan:
Writes a JSON representation of the non-offset parts of the header to a file.
Writes the JSON metadata to a file.
Write the JSON representation of the header into a new archive. (maybe we need --inplace where it atomically deletes and renames?) All fields must be specified.
Write the JSON representation of the header into a new archive. (maybe --inplace) ? |
* add new CLI commands for writing header and metadata (stubs)
* add new CLI commands for writing header and metadata (stubs)
define a JSON schema like
to allow modification of pmtiles by writing a new file.
pmtiles show --header-metadata-json
would also be useful to output this.The text was updated successfully, but these errors were encountered: