Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSM Street map-type merged tile show grayscale color #1

Open
vafrcor opened this issue Jul 7, 2020 · 4 comments
Open

OSM Street map-type merged tile show grayscale color #1

vafrcor opened this issue Jul 7, 2020 · 4 comments

Comments

@vafrcor
Copy link

vafrcor commented Jul 7, 2020

@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

@jimutt
Copy link
Owner

jimutt commented Jul 17, 2020

@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

@Cj-Malone
Copy link
Contributor

@jimutt I added that in georeference_raster_tile and it worked.

@mishagrol
Copy link

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

@Jinunmeng
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants