Bugfix s.surf.idw

Bill Brown brown at gomez.gis.uiuc.edu
Tue Dec 14 14:27:54 EST 1999



In general, G_site_new_struct should always come after G_site_describe,
e.g.:

G_site_describe (Sitefd, &ndim, &rtype, &nstr, &ndec);
G_site_new_struct (rtype, ndim, nstr, ndec);

Then the new structure will have the correct fields for the file that
was described.

An EASY program somebody could write would be something like 
s.support or s.format, which could change CAT values to be FP
attributes or the reverse.  This could help fix site files that
were put in the wrong format.

s.format -d sites=name
    converts CAT to double
s.format sites=name [cell=value | fcell=value | dcell=value]
    converts double to CELL/FCELL/or DCELL CAT

given "places" site file containing:
739865.8|4279785.5|#2965 %396685 %2.473222 @"St. Louis"
    s.format places -d
        <would automatically convert any CAT to a double attribute>
        would change to:
        739865.8|4279785.5|%2965 %396685 %2.473222 @"St. Louis"

given "places" site file containing:
739865.8|4279785.5|%2965 %2.473222 @"St. Louis"
    s.format places c=1
        <would automatically convert the FIRST DOUBLE to (CELL)CAT>
        would change to:
        739865.8|4279785.5|#2965 %2.473222 @"St. Louis"
    s.format places c=2
        <would automatically convert the SECOND DOUBLE to (CELL)CAT>
        would change to:
        739865.8|4279785.5|#2 %2965 @"St. Louis"
    s.format places fc=2
        <would automatically convert the SECOND DOUBLE to (FCELL)CAT>
        would change to:
        739865.8|4279785.5|#2.473222 %2965 @"St. Louis"
    s.format places dc=2
        <would automatically convert the SECOND DOUBLE to (DCELL)CAT>
        would change to:
        739865.8|4279785.5|#2.473222 %2965 @"St. Louis"

ANY VOLUNTEERS?

    converts CAT to double
s.format sites=name [cell=value | fcell=value | dcell=value]
    converts double to CELL/FCELL/or DCELL CAT

given "places" site file containing:
739865.8|4279785.5|#2965 %396685 %2.473222 @"St. Louis"
    s.format places -d
        <would automatically convert any CAT to a double attribute>
        would change to:
        739865.8|4279785.5|%2965 %396685 %2.473222 @"St. Louis"

given "places" site file containing:
739865.8|4279785.5|%2965 %2.473222 @"St. Louis"
    s.format places c=1
        <would automatically convert the FIRST DOUBLE to (CELL)CAT>
        would change to:
        739865.8|4279785.5|#2965 %2.473222 @"St. Louis"
    s.format places c=2
        <would automatically convert the SECOND DOUBLE to (CELL)CAT>
        would change to:
        739865.8|4279785.5|#2 %2965 @"St. Louis"
    s.format places fc=2
        <would automatically convert the SECOND DOUBLE to (FCELL)CAT>
        would change to:
        739865.8|4279785.5|#2.473222 %2965 @"St. Louis"
    s.format places dc=2
        <would automatically convert the SECOND DOUBLE to (DCELL)CAT>
        would change to:
        739865.8|4279785.5|#2.473222 %2965 @"St. Louis"

ANY VOLUNTEERS?

- Bill



More information about the grass-user mailing list