I am trying to convert JSON to MVT tiles for Mapbox (directory format) using ogr2ogr. My problem is that no matter what I do on the Mapbox/browser side, the tiles do not show up. I am thinking I am generating the tiles wrong.
What I have is weather radar data, which looks like this in the JSON file :
{
"type": "Feature",
"geometry": { "type": "Polygon",
"coordinates": [
[
[-86.78203526482261, 33.14694835752057],
[-86.7860454984611, 33.13859751774804],
[-86.78673620526779, 33.138838036230396],
[-86.78255333547662, 33.1471287631669],
[-86.78203526482261, 33.14694835752057]
]
]
},
"properties": {
"value": 18.0,
"colorIndex": 6
}
}
I see documentation for doing this at : https://gdal.org/drivers/vector/mvt.html. Here is the command I have used :
ogr2ogr -f MVT -dsco FORMAT=DIRECTORY -dsco MAXZOOM=10 target.mbtiles test.geojson
I am not sure what -dsco means and I can't find it in the documentation, but the script runs with it.
The output generates tiles in directories like I would expect it to look, but it will never load on a map.
Is there something wrong with the way I am converting the data?
I am not an expert here so I think that might be the problem. I am sure it's not a projection issue as the default settings are in EPSG:3857.