[GRASS5] readsites() TODO list...
Bill Brown - staff
brown at gis.uiuc.edu
Thu Sep 21 11:07:56 EDT 2000
>
>Here's the deal. I just picked this up, cause I saw it on the TODO list
>on the website(s). Anyway, I've coded this thing up, tested it, and it
>works as planned. The question of course, is this functionality worthy
>of a library function? I will have to concede, I think it isn't. I
>guessed that there must've been a significant demand for this limited
>function, but perhaps the more general is desirable.
I think your G_readxyzsites would be quite useful. I'd still like to
see "cat" added as an attribute, though. G_writexyzsites might be good
too. I think these would be more useful to the programmer because it
hides all the messy Site structure stuff. For G_writexyzsites, if "cat"
is selected, you could default to writing a double cat or add another
RASTER_MAP_TYPE parameter which would be ignored if string or floating
point attribute are chosen.
>int type, /* 0 = Z-dim, 1 = double, 2 = string */
>
>--- This is the attribute type. By "Z-dim", I mean any of the n-dims
>--- in the Site file spec. Double, is double attribute, string is
>--- string attribute. Yes, an enum or #define's are in order.
Z-dim is still confusing to me. Maybe I'm just being dense. So is
Z-dim 1 the same as easting and Z-dim 2 the same as northing? If so,
let's just call it "dim" - if not, "n-dim" might be better. When I
wrote d.sites.qual, I considered dim 1 to be the same as easting.
( http://www2.gis.uiuc.edu:2280/modviz/gsoils/doc/dsites_qual.html )
Here's a chunk from the Sites Format Specification:
------------------------
Part 1 of a Site Record: Location
Part 1 of a site record gives information about location. The
field separator in part 1 of the site record is a "pipe" (ASCII
0x7c) character. The last (non-escaped) pipe signifies the end
of part 1 (an escaped character is defined as one prefixed by a
"backslash" (ASCII 0x5c)). Any additional fields are
considered attribute information.
Each field in part 1 indicates a coordinate in some space.
There must be at least two fields in part 1: the first describing
a geographic easting and the second describing a geographic
northing. These may be in either decimal or
degrees-minutes-second format.
Additional fields in part 1 are optional but must be stored in
decimal format. They should only be used to represent
coordinate information about some space (e.g., elevation,
time; depending upon how a space is defined).
------------------------
>
>Anyway, shall I look at writing a generalized G_readsites() (and maybe
>G_writesites() ?) using the standard Site struct? I'm ambivalent.
>
Me too. I'd consider these "convenience" functions.
Thanks!
- Bill
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list