[GRASS5] Tools for importing data from mapping servers

Markus Neteler neteler at itc.it
Thu Mar 9 03:56:11 EST 2006


On Thu, Mar 09, 2006 at 12:45:49PM +1300, Hamish wrote:
> > HISTFILE=$LOCATION/hist/$RASTERMAP
> > #determine total length:
> > STRINGLENGTH=`echo $meta | wc -c | awk '{printf $1}'`
> > 
> > #maximal allowed string length for GRASS hist file 62 chars:
> > #(max 20 lines accepted, rest silently truncated by GRASS modules)
> > LINELENGTH=62
> 
> ?
> gis.h:
> ...
> #define MAXEDLINES  50
> #define RECORD_LEN  80
> ...
> struct History
> {
>     char    mapid[RECORD_LEN];
>     char    title[RECORD_LEN];
>     char    mapset[RECORD_LEN];
>     char    creator[RECORD_LEN];
>     char    maptype[RECORD_LEN];
>     char    datsrc_1[RECORD_LEN];
>     char    datsrc_2[RECORD_LEN];
>     char    keywrd[RECORD_LEN];
>     int     edlinecnt;
>     char    edhist[MAXEDLINES][RECORD_LEN];
> };
> 
> 
> so 50 rows x 80 cols.
> 
> 62 may be the limit that r.info will show? 'r.info -h' should show all.
> 
> In G_command_history() I used 70. Seems ok.

Ah, I forgot to mention that I wrote the script a few years
ago.

> > Of course it's highly desired to get this added to r.support.
> 
> yes.

I will do sit and wait strategy :-)

Markus




More information about the grass-dev mailing list