7 * This file is part of fGIS C library
8 * fgisCount.c Various routines to perform area counting on rasters
10 int count_to_array(Tcl_Interp *interp,RASTER_OBJECT raster,char *array /* here geomerty spec should be*/)
13 RECLASS r=raster->reclass;
14 int v,i,j,size=Fgis_RasterMax(raster)+1;
15 accumulate=calloc(ize,sizeof(int));
16 /* loop should vary according to geometry specifications */
17 for (i=e->fr;i<e->lr;i++)
18 for (j=e->fc;j<e->lc;j++) {
24 for (i=0;i<size;i++) {
26 char result[32],index[8];
27 Tcl_PrintDouble(interp,accumulate[i]*e->cell_area,result);
28 sprintf(index,"%d",i);
29 Tcl_SetVar2(interp,array.index,result)