stamen / terrain-classic

World-wide CartoCSS port of Stamen's classic terrain style
ISC License
144 stars 35 forks source link

better contrast minor roads #12

Closed almccon closed 9 years ago

almccon commented 9 years ago

previous screen shot 2015-06-26 at 6 20 11 pm current screen shot 2015-06-26 at 6 20 05 pm

clhenrick commented 9 years ago

@almccon will the gray being used for urban land areas (I'm assuming this is coming from land cover data) be lightened once we composite the hillshade underneath?

almccon commented 9 years ago

Yeah, I think that gray is coming from the landcover. It might imply that the landcover's urban color needs a tweak.

I don't think the hillshade will lighten it. For flat areas the hillshade should have no effect. It will only lighten and darken on slopes as needed.

clhenrick commented 9 years ago

@almccon using color picker on Chrome it looks like the current urban area from the landcover data is being set to a 15% K, where as the og terrain has it set to a 5% K.

If you point me to the process you're using to create the landcover tif I can re-render it.

almccon commented 9 years ago

Here's the file that sets the colors for the various landcover classes: https://github.com/stamen/terrain-classic/blob/master/landcover/LC_500m_MODIS-to-rgb.vrt

If you make changes to that, they should be picked up automatically.

almccon commented 9 years ago

The c1, c2, c3, c4 in that file are rgba values.

clhenrick commented 9 years ago

@almccon great, I will look into it. Looking closer at the original terrain tiles, it appears as if the landcover data is being lightened for each higher zoom level starting around zoom 8 or 7. Should we render multiple tifs then? screen shot 2015-08-27 at 5 49 45 pm screen shot 2015-08-27 at 5 49 43 pm screen shot 2015-08-27 at 5 49 40 pm screen shot 2015-08-27 at 5 49 38 pm screen shot 2015-08-27 at 5 49 33 pm

almccon commented 9 years ago

I've got some commented-out lines at the end of map.mss that lightens the raster as zooms increase. Try fiddling with that and see if you can get a satisfying effect.

almccon commented 9 years ago

You might have to adjust background-color in tandem, however. Not sure. Keep an eye on the coastlines where the raster pixels don't line up well with the high-resolution OSM coastline. That's where you'll notice the the background-color showing through the most.

clhenrick commented 9 years ago

@almccon okay thanks, I'll mess around with it. Do you have a color palette for the landcover that you are using separated from the vrt file? Also how did you figure out what the order of the pixel values are in the vrt file? eg lines 7-23

almccon commented 9 years ago

Here's the source of the landcover: http://glcf.umd.edu/data/lc/ (I realized I hadn't documented that, so I created #22 for myself).

That page includes the code values for the underlying raster, which is how I figured out lines 7-23.

I don't have a palette for that raster anyplace else.

clhenrick commented 9 years ago

@alan thanks, do you know if Stamen still has the color palette from the original terrain tiles lying around any where? I guess we could try to find the source data listed here and match the values to the new global landcover data we are using for terrain-classic.

almccon commented 9 years ago

I think this is the source file: http://nationalmap.gov/small_scale/mld/landcvi.html

Downloading it, I get this classification scheme, w/ RGB values:

      >Value  Class                                  RGB values
      >_________________________________________________________
      >1      Urban and Built-Up Land                255   0   0
      >2      Dryland Cropland and Pasture           160  82  40
      >3      Irrigated Cropland and Pasture         134  82  40
      >4      Mixed Dryland/Irrigated Cropland 
      >       and Pasture                            159  54   0
      >5      Cropland/Grassland Mosaic              184 134  11
      >6      Cropland/Woodland Mosaic               154 205  50
      >7      Grassland                              234 221 130
      >8      Shrubland                              255 140   0
      >9      Mixed Shrubland/Grassland              255 163  67
      >10     Savanna                                255 215   0
      >11     Deciduous Broadleaf Forest              60 179 113
      >12     Deciduous Needleleaf Forest            105 138  65
      >13     Evergreen Broadleaf Forest             122 252   0
      >14     Evergreen Needleleaf Forest             34 121  34
      >15     Mixed Forest                           125 217 152
      >16     Water Bodies                           132 193 255
      >17     Herbaceous Wetland                     136 155 209
      >18     Wooded Wetland                         109 121 188
      >19     Barren or Sparsely Vegetated           150 150 150
      >20     Herbaceous Tundra                      203 130 199
      >21     Wooded Tundra                          188 143 143
      >22     Mixed Tundra                           213 121 180
      >23     Bare Ground Tundra                     253 186 242
      >24     Snow or Ice                            255 255 255
      >255    Unlabelled land area                   129 159 170
clhenrick commented 9 years ago

Oh interesting. I doubt those are the values used for the original terrain tiles though right? For example in the above urban area is red.

almccon commented 9 years ago

Right. I think we'd refer to the old .vrt to find the colors used, but we'd refer to this table to figure out the names of those classes. And then the process of matching those class names with the slightly different classifications used in the MODIS data is the hard part. ...which I mostly did, but apparently not fully. So don't worry about trying to adapt everything color-for-color. Instead just use the old terrain colors as guidelines to do spot fixes as needed with the new colors. Like, I have no idea why I didn't get the urban landuse color right.

Oh, and also, I'm not sure how they did the hillshade compositing on the original terrain. Maybe flat areas had their landuse color modified by the old hillshade, which could explain some color anomalies.

clhenrick commented 9 years ago

Makes sense. It does look like the flat areas do have compositing with hillshading, at least at higher zoom levels.

Do you know if there is a way to alter those RGBA values with GDAL rather than editing the VRT file in a text editor?

almccon commented 9 years ago

Should be possible, but personally I dunno how to do it in gdal.

clhenrick commented 9 years ago

Closing for now screen shot 2015-08-31 at 2 07 22 pm