1234567891011121314151617181920212223242526272829303132333435 |
- /****************************************************************************
- *
- * MODULE: r.distance
- *
- * AUTHOR(S): Michael Shapiro - CERL
- *
- * PURPOSE: Locates the closest points between objects in two
- * raster maps.
- *
- * COPYRIGHT: (C) 2003 by the GRASS Development Team
- *
- * This program is free software under the GNU General Public
- * License (>=v2). Read the file COPYING that comes with GRASS
- * for details.
- *
- ***************************************************************************/
- #include <stdlib.h>
- #include <grass/raster.h>
- #include "defs.h"
- void read_labels(struct Map *map)
- {
- if (Rast_read_cats(map->name, map->mapset, &map->labels) < 0)
- exit(1);
- }
- char *get_label(struct Map *map, CELL cat)
- {
- return Rast_get_c_cat(&cat, &map->labels);
- }
|