[GRASS-user] [off-topic] spoke too soon

Hamish hamish_nospam at yahoo.com
Wed Oct 3 16:25:35 EDT 2007


Dylan wrote:
> > What I had tried to mention was the collection of color palette files here:
> > 
> > http://sview01.wiredworkplace.net/pub/cpt-city/
> > 
> > Perhaps we can convert a pile of these into GRASS-compatible color rules 
> > files.

Benjamin:
> Good stuff

yes! well spotted.

> All the palettes are available in GMT color format, which is just plain
> ASCII and very similar to GRASS' own colour rule files in the 'cols'
> database elements. The only major difference seems to be three 
> additional lines at the end of the file specifying colours for
> foreground, background and no data areas which could simply be
> discarded.
> 
> So how about adding an option cpt=filename to r.colors, to set the
> color rules for a raster map from a GMT ASCII file?

My immediate idea on seeing the site was to write a GMT->GRASS converter in a
shell script, but your idea is nice too.

Rather than a new option I would add it as a new flag which would change the
behaviour of the rules= file input option.

> The best of these styles could still be hardcoded into r.colors'
> database.

note nothing is hardcoded, they are just ascii files in $GISBASE/etc/colors/
 

> P.S.: Some of these palettes actually have licenses attached to them.
> What sort of a world do we live in that requires the most trivial
> things to be licensed? Come on people, you can give _some_ things to
> the public domain w/o conditions ...

Brad:
> (paraphrasing) You can't copyright colors

... but can you copyright a series of colors? Maybe I'm thinking more from a
mathematical standpoint versus a legal one, but if you take the 2D case instead
of the 1D case, then you have an image, which is copyrightable. Presumably we
can incorporate anything from GMT though (GPL). [I like their bathymetry
scheme]

I'll have a look at the GMT format spec later today and get back to the list
with a better idea of how much work would be involved. Writing out to a raster
cats/ file as well is an interesting idea, but would need a second flag.


Hamish



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 




More information about the grass-user mailing list