CartoCSS: raster custom transparency color value?

المشرف العام

Administrator
طاقم الإدارة
In QGIS (and probably other GIS tools) you can style a raster layer such that certain pixel color value(s) will be rendered as transparent. In QGIS 2.6, this can be set in Layer Properties -> Transparency -> Custom Transparency Options -> Transparent pixel list.

How would you accomplish the same thing in CartoCSS (for TileMill)?

For example, on the raster layer in question, 'bluecanyon_labels', pixels with RGB value 0,255,0 (#00ff00 or #0f0) should be transparent; this works correctly in QGIS using the options above.

I tried the following in TileMill:

#bluecanyon_labels { comp-op:fadeout(#0f0,100%); raster-opacity:1; } The cartocss window pane does not give an error message in yellow at the bottom, but, on save and re-render, TileMill gives a gray runtime error dialog box:

failed to parse comp-op: 'rgba(0, 255, 0, 0)' in style 'bluecanyon_labels' in Style at line 313

(Fadeout is not allowed in raster-comp-op; only in comp-op.)



أكثر...
 
أعلى