[R-sig-Geo] gdal color tables

Agustin Lobo alobolistas at gmail.com
Sun Dec 23 14:14:03 CET 2012


On Sun, Dec 23, 2012 at 1:42 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> On Sun, Dec 23, 2012 at 11:56 AM, Agustin Lobo <alobolistas at gmail.com> wrote:
>> Is there a function that would write R color tables as gdal color
>> tables such as the one described in
>> http://www.gdal.org/rgb2pct.html
>> ?
>
>  I'm not sure what you mean by an "R color table" - just a vector of colours?
Form the help pages
"A color palette, i.e. a vector of n contiguous colors generated by
functions like rainbow, heat.colors, topo.colors, bpy.colors or one or
your own making, perhaps using colorRampPalette"

>  For output do you mean the XML snippet at the bottom of that page?
> All of it, or just the <colortable> part?
The colortable part.
http://www.gdal.org/classGDALColorTable.html

>
>  Two minute job to do, twenty minute job to do properly...
0 minutes if it already exists and, most important, the obvious
advantage of using an standard function that has already been tested
(or help out by testing it)...

An alternative could be using
http://en.geopublishing.org/gdal%20colorpalette%20to%20symbology%20encoding

but have not tried myself (yet).

I understand, that, as far as you know, such a function does not exist.

Agus

> Barry
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list