[GRASS-user] Can a table imported in the data base (sqlite.db)
used to assign new raster category labels non-interactively?
Nikos Alexandris
nikos.alexandris at felis.uni-freiburg.de
Tue Mar 18 09:00:10 EDT 2008
On Tue, 2008-03-18 at 05:46 -0700, Hamish wrote:
> > Finally it worked like this:
> >
> > 1. db.select -c glc2000_legend | tr '|' ':' > glc2000_legend.csv
> >
> > 2. r.category map=glc2000_eu rules=glc2000_legend.csv
>
> Right, it wants a filename or "-" for the rules= option:
> rules File containing category label rules (or "-" to read from
> stdin)
>
> it was thinking your DB dump was a very large filename....
>
>
> using stdin you could have done like:
> db.select -c glc2000_legend fs=: | r.category map=glc2000_eu rules=-
Great! I didn't really understand the use of "-" before.
>
>
> > > ("TODO: Respect the fs= field separator setting for input rules.")
> > >
> > > Also for GRASS 7 it would be nice to use a consistent fs for all
> > > modules, instead of sometimes |,:,space, ...
> >
> > Why not directly from the db.table(s)
> >
> > Given that the category numbers and labels are there as they should
> be
> > (in a table imported in the data base), wouldn't it be nice to
> enable
> > attachment of such tables in a raster map?
>
> see
>
> http://grass.gdf-hannover.de/wiki/GRASS_SoC_Ideas_2008#Raster_Database
Got it! Unfortunately my know-how stops here ;-(
More information about the grass-user
mailing list