[GRASS-dev] ascii export and import, large file problem

Hamish hamish_nospam at yahoo.com
Fri Apr 20 03:28:50 EDT 2007

Paul Kelly wrote:
> Hello Hamish
> Thanks for bringing this up again. ISTR being too busy to reply
> straight  away the last time and then forgetting...
> On Wed, 18 Apr 2007, Hamish wrote:
> [...]
> > --relevant quotes--
> > [1...]
> > For a real y-axis label I think we need to add a new (optional)
> > "units" element to the raster format (e.g. in cell_misc/).
> OK this seems like a very good idea. Several times Helena has
> suggested  the idea of adding "vertical datum" support to a location,
> but I was  always quite negative about it in pointing out that there
> was not even  any way of indicating that a particular raster map
> contained elevation  data. But in fact, the obvious answer seems now
> to be that it should be  done on a per-raster map basis rather than a
> per-location basis. I.e. if  the metadata for a raster map indicates
> that it contains elevation data  (i.e. units are a length measure)
> then there should also be a facility to  specify the vertical datum
> the length measure is relative to.
> > [2...]
> >> The user should be able to add a title for the legend.
> >
> > For vlegends that's doable. For raster legends I hope to add
> > G_set_raster_units() and G_get_raster_units() to write/read a simple
> > string containing raster data units (set from "r.support units=")
> > which will be stored in $MAPSET/cell_misc/$RASTERMAP/units. Raster
> > legends and things like lat/lon NVIZ and r.shaded.relief could use
> > the tag if it existed.
> > --endquote--
> I think it's worth putting enough thought in so that the feature is
> easily  usable for more than just legend titles. Especially how to
> specify  vertical datums. I suppose there are a few very standard
> ones, like WGS84  ellipsoidal height and that kind of thing. Actually
> I think the EPSG  co-ordinate system database also includes vertical
> datums. Maybe it has  some kind of unique codes that we could re-use.
> Maybe we should have a  vdatum.table file with descriptions. Or maybe
> we should just put a  human-readable name in and leave it for manual
> interpretation.
> I'm really not too sure.

ok, proposal:

add raster map specific cell_misc/units and cell_misc/vertical_datum

Each would hold a single line string containing the info.
You could set the value with e.g. "r.support units="
You could query with e.g. "r.info -u"

read/write using new cell_misc libgis fns described by Glynn in an
earlier email.

both fully optional, and non-existing by default, so fully backwards
compatible with old maps.

for use by modules, just start with strcmp(tolower(*string), "meters")
for hinting. units can be anything, so I prefer to allow freeform
metadata there, not just something from a list. I fear that vertical
datums may use very local names so while a common table would be helpful
we need to allow a custom entries. I'm not too sure about them though.


More information about the grass-dev mailing list