tiles-to-tiff icon indicating copy to clipboard operation
tiles-to-tiff copied to clipboard

OSM Street map-type merged tile show grayscale color

Open vafrcor opened this issue 5 years ago • 4 comments
trafficstars

@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 avatar Jul 07 '20 23:07 vafrcor

@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 avatar Jul 17 '20 18:07 jimutt

@jimutt I added that in georeference_raster_tile and it worked.

Cj-Malone avatar Jun 01 '22 07:06 Cj-Malone

@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')

mishagrol avatar Jun 01 '23 18:06 mishagrol

@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')

i have same error ,but i remove the rgbExpand='rgb' option and it worked.

Jinunmeng avatar Nov 03 '23 14:11 Jinunmeng