N129BZ / chartmaker

This application downloads USA VFR and CONUS Enroute IFR digital raster charts and translates them into mbtiles databases
MIT License
13 stars 6 forks source link

Add bounds and center to metadata in MBTiles file #14

Closed ssokol closed 3 weeks ago

ssokol commented 1 month ago

Not a huge deal, but having the bounds and center coordinates in the metadata would make it slightly faster for my use case. My tile server indexes the MBTiles files in a given directory then uses the bounds and/or center values to find the required file when it receives a request.

Here's what tilemaker sets as metadata for those values:

bounds|-106.645646,25.837377,-93.508292,36.500704
center|-100.076969,31.169041,7
N129BZ commented 3 weeks ago

If processing single area chart(s), the app will now add bounds and center values to the metadata table in each mbtiles database.
These new metadata fields will be not be present if processing any of the full charts, since those are actually comprised of multiple individual geotiffs which each have individual extent data, making any overall calculation of extents more involved than I have time or inclination to deal with.

N129BZ commented 3 weeks ago

P.S., also added a new settings.json key+value: centerzoomlevel which defaults to 7. Example below.

In settings.json:

    "tileimagequality" : 40,
    "blendpixels" : 30,
    "zoomrange" : "0-11",
    "centerzoomlevel": "7",   <= new setting
    "dbextension": "mbtiles",
    "externaldbfolder": "",
    "addoverviews": true,

metadata3

ssokol commented 3 weeks ago

Apologies - I was out for part of the weekend. I was specifically referring to the bounds for individual VFR sectionals. What you've added is exactly what I needed. Thank you very much!