tiles-to-tiff
tiles-to-tiff copied to clipboard
OSM Street map-type merged tile show grayscale color
@jimutt : Thanks for your great code at this tutorial
I tried to run this source code from 2 map provider:
- MapBox Satellite >> work perfectly
- Open Street Map (street-map type) >> output became grayscale color (see this file:
merged-lonmn-112.63309967611916_lonmx-112.63508032388084_latmn--7.97799_latmx--7.9759899999999995_z-18_a.tile.openstreetmap.org-street.tif)
Output result can be seen at GDrive
Map Sample: https://osm.org/go/txBGlWzGF--?relation=9674152
Map Coordinate: geo:-7.97699,112.63409?z=18
Any thought how to solve this problem?
Thanks in advance
@vafrcor Hi! I'm sorry for the late reply.
Can you try add the rgbExpand='rgb' option when running gdal.Translate? 🙂 As mentioned in this comment to the Dev.to article: https://dev.to/arc12/comment/bkdo
@jimutt I added that in georeference_raster_tile and it worked.
@jimutt I recieve error ERROR 1: Error : band 1 has no color table during
gdal.Translate(os.path.join(temp_dir, f'{temp_dir}/{x}_{y}_{z}.tif'),
path,
outputSRS='EPSG:4326',
outputBounds=bounds,
rgbExpand='rgb')
@jimutt I recieve error
ERROR 1: Error : band 1 has no color tableduringgdal.Translate(os.path.join(temp_dir, f'{temp_dir}/{x}_{y}_{z}.tif'), path, outputSRS='EPSG:4326', outputBounds=bounds, rgbExpand='rgb')
i have same error ,but i remove the rgbExpand='rgb' option and it worked.