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

Strange behavior when displaying data from multiple files #17

Open ssokol opened 2 hours ago

ssokol commented 2 hours ago

I can't tell if this is an issue with MapLibre, my map server, or chartmaker. Here's a screenshot of what I'm seeing:

image

I've used chartmaker to build a full set of sectionals, one file per FAA base image. My tile server opens all 53 sectional mbtiles files on startup and queries the bounds values plus minzoom and maxzoom from the metadata table. When it receives a tile request it uses the bounds and zoom data to quickly find a file that contains the desired tile and attempts to serve it. If the tile is not found (perhaps due to some kind of underlap at a boundary) it continues to search the list and, if another file fits the requirements, attempts to serve the tile from that.

It works quite well for OSM vector data and Terrarium terrain data, both of which are loaded on my server with one file per state / territory each (so 53 osm.usa.xx.mbtiles files and 53 terrarium.usa.xx.mbtiles files). I get seamless OSM and terrain when displayed using a very basic MapLibre-based web client.

I was expecting the same kind of seamless coverage of the US with sectional data from tilemaker, but I seem to have gaps at various resolutions. Am I doing something wrong or is chartmaker somehow outputting images with borders?

I'm using the latest version by way of the docker image. Here's my chartmaker config:

root@7b6ef70b2b86:/chartmaker# cat settings.json
{
    "attribution": "Aviation charts <a href='https://github.com/n129bz/chartmaker'>github.com/n129bz/chartmaker</a>",
    "vfrdownloadtemplate": "https://aeronav.faa.gov/visual/<chartdate>/All_Files/<charttype>.zip",
    "vfrindividualtemplate": "https://aeronav.faa.gov/visual/<chartdate>/sectional-files/<charttype>.zip",
    "ifrdownloadtemplate": "https://aeronav.faa.gov/enroute/<chartdate>/<charttype>.zip",
    "usvfrwallplanningtemplate": "https://aeronav.faa.gov/visual/<chartdate>/Planning/US_WallPlan.zip",

    "renameworkarea": false,
    "logtofile": false,
    "cleanprocessfolders": false,

    "tileimagequality" : 60,
    "blendpixels" : 30,
    "zoomrange" : "0-11",
    "centerzoomlevel": "7",
    "dbextension": "mbtiles",
    "externaldbfolder": "",
    "addoverviews": true,

    "chartprocessindexes": [0],
    "fullchartlist": [
        ["Sectional", "vfr", ""],
        ["Caribbean", "vfr", ""],
        ["Grand_Canyon", "vfr", ""],
        ["Terminal", "vfr", ""],
        ["Helicopter", "vfr", ""],
        ["DDECUS", "ifr", "Enroute_Low"],
        ["DDECUS", "ifr", "Enroute_High"],
        ["US_VFR_Wall_Planning", "vfr", ""]
    ],

    "individualchartlist": [
        [0, "Albuquerque"],
        [1, "Anchorage"],
        [2, "Atlanta"],
        [3, "Bethel"],
        [4, "Billings"],
        [5, "Brownsville"],
        [6, "Cape_Lisburne"],
        [7, "Charlotte"],
        [8, "Cheyenne"],
        [9, "Chicago"],
        [10, "Cincinnati"],
        [11, "Cold_Bay"],
        [12, "Dallas-Ft_Worth"],
        [13, "Dawson"],
        [14, "Denver"],
        [15, "Detroit"],
        [16, "Dutch_Harbor"],
        [17, "El_Paso"],
        [18, "Fairbanks"],
        [19, "Great_Falls"],
        [20, "Green_Bay"],
        [21, "Halifax"],
        [22, "Hawaiian_Islands"],
        [23, "Houston"],
        [24, "Jacksonville"],
        [25, "Juneau"],
        [26, "Kansas_City"],
        [27, "Ketchikan"],
        [28, "Klamath_Falls"],
        [29, "Kodiak"],
        [30, "Lake_Huron"],
        [31, "Las_Vegas"],
        [32, "Los_Angeles"],
        [33, "McGrath"],
        [34, "Memphis"],
        [35, "Miami"],
        [36, "Montreal"],
        [37, "New_Orleans"],
        [38, "New_York"],
        [39, "Nome"],
        [40, "Omaha"],
        [41, "Phoenix"],
        [42, "Point_Barrow"],
        [43, "Salt_Lake_City"],
        [44, "San_Antonio"],
        [45, "San_Francisco"],
        [46, "Seattle"],
        [47, "Seward"],
        [48, "St_Louis"],
        [49, "Twin_Cities"],
        [50, "Washington"],
        [51, "Western_Aleutian_Islands"],
        [52, "Wichita"]
    ],

    "layertypeindex": 0,
    "layertypes": [
        "baselayer",
        "overlay"
    ],

    "tiledriverindex": 2,
    "tiledrivers": [
        "png",
        "jpeg",
        "webp"
    ]
}

Any suggestions would be greatly appreciated. Please let me know if you want to try out my server app. It's written in Go and should be easy enough to configure and run on just about any system.

N129BZ commented 2 hours ago

If your intent is to display all 53 areas simultaneously, the first thing I would try would be to process the full vfr sectional, which would give you a single mbtiles database. I'll have a look at my server app to verify the sql that is serving up tiles, I have not had a similar problem with missing tiles. I'm very familiar with GO and would be interested in looking at your server app...

N129BZ commented 2 hours ago

Also - you might set the layertypeindex to 1 which is overlay. I'm not familiar with MapLibre but with OpenLayers there can only be one base map, any others should be overlays.