This webmap shows raster tiles overlaid on OSM rastertiles. One such tile, for example the 10/508/336
tile looks like this:
I would like to create a directory of such tiles using command line tools. Here is an example of GeoJSON:
{
"type": "FeatureCollection",
"name": "source",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "LineString", "coordinates": [ [ 4.90571755, 50.00687119 ], [ 4.26413271, 50.41744784 ], [ 3.53584721, 49.9399581 ], [ 3.54162726, 49.39377674 ], [ 4.36817349, 49.03887689 ], [ 4.9924182, 49.27701689 ], [ 5.00397829, 49.55902504 ], [ 4.36817349, 49.55527559 ] ] } }
]
}
It covers the 7/65/43
tile:
In the directory structure I would like to create, 7/65/43.png would look something like this (I left the red boundary, so it is easier to see where the boundary of the image is):
I know about tippecanoe, and vector tiles in general. Here, I am asking about raster tiles. In Directly generating XYZ tiles from GeoJSON, tippecanoe is suggested. In Converting GeoJSON file to XYZ tiles, QGIS is suggested. I would like to use command line tools. GDAL can do many things, I hope it can do this as well (but I'm open to other tools as well). I have read about gdal2xyz
, but the input is a raster file, not a vector file.
How to create a directory tree of raster tiles from a GeoJSON using command line tools?
gdal2xyx
isn't for xyz tiles, it outputs XYZ delimited text files. How big is your area? You couldgdal_rasterize
at highest resolution thengdal2tiles