1 #include "csf.h" 2 #include "csfimpl.h" 3 4 /* set new minimum cell value 5 * RputMinVal set a new value stored in 6 * the header as the minimum value. 7 * minMaxStatus is set to MM_DONTKEEPTRACK 8 * 9 * NOTE 10 * Note that the header minimum set must be equal or 11 * smaller than the minimum value in the map. 12 * 13 * example 14 * .so examples/set_min.tr 15 */ 16 RputMinVal(MAP * map,const void * minVal)17void RputMinVal( 18 MAP *map, /* map handle */ 19 const void *minVal) /* New minimum value */ 20 { 21 /* use buffer that can hold largest 22 * cell representation 23 */ 24 CSF_VAR_TYPE buf_1; 25 void *buf = (void *)(&buf_1); 26 27 CHECKHANDLE(map); 28 29 /* make a copy */ 30 CsfGetVarType(buf, minVal, map->appCR); 31 32 /* convert */ 33 map->app2file((size_t)1,buf); 34 35 /* set */ 36 CsfGetVarType( (void *)&(map->raster.minVal), buf, RgetCellRepr(map)); 37 38 map->minMaxStatus = MM_DONTKEEPTRACK; 39 } 40