1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #include <grass/gis.h>
- #include <grass/raster3d.h>
- #include "globals.h"
- #include "globals3.h"
- #include "expression.h"
- #include "func_proto.h"
- /****************************************************************
- ewres() east-west resolution
- nsres() north-south resolution
- tbres() top-bottom resolution
- ****************************************************************/
- int f_ewres(int argc, const int *argt, void **args)
- {
- DCELL *res = args[0];
- int i;
- if (argc > 0)
- return E_ARG_HI;
- if (argt[0] != DCELL_TYPE)
- return E_RES_TYPE;
- for (i = 0; i < columns; i++)
- res[i] = current_region3.ew_res;
- return 0;
- }
- int f_nsres(int argc, const int *argt, void **args)
- {
- DCELL *res = args[0];
- int i;
- if (argc > 0)
- return E_ARG_HI;
- if (argt[0] != DCELL_TYPE)
- return E_RES_TYPE;
- for (i = 0; i < columns; i++)
- res[i] = current_region3.ns_res;
- return 0;
- }
- int f_tbres(int argc, const int *argt, void **args)
- {
- DCELL *res = args[0];
- int i;
- if (argc > 0)
- return E_ARG_HI;
- if (argt[0] != DCELL_TYPE)
- return E_RES_TYPE;
- for (i = 0; i < columns; i++)
- res[i] = current_region3.tb_res;
- return 0;
- }
|