int main(int argc, char **argv) { struct GModule *module; struct { struct Option *input; struct Option *output; } params; G_gisinit(argv[0]); module = G_define_module(); G_add_keyword(_("raster")); G_add_keyword(_("hydrology")); module->description = _("Creates a topographic index raster map from an elevation raster map."); params.input = G_define_standard_option(G_OPT_R_ELEV); params.input->key = "input"; params.output = G_define_standard_option(G_OPT_R_OUTPUT); params.output->description = _("Name for output topographic index raster map"); if (G_parser(argc, argv)) exit(EXIT_FAILURE); /* Make sure that the current projection is not lat/long */ if ((G_projection() == PROJECTION_LL)) G_fatal_error(_("Lat/Long location is not supported by %s. Please reproject map first."), G_program_name()); input = params.input->answer; output = params.output->answer; G_get_window(&window); read_cells(); initialize(); calculate_atanb(); write_cells(); exit(EXIT_SUCCESS); }
ErrorCode ReadCCMIO::read_processor(CCMIOID /* stateID */, CCMIOID problemID, CCMIOID processorID, CCMIOID verticesID, CCMIOID topologyID, CCMIOSize_t proc, Range *new_ents) { ErrorCode rval; // vert_map fields: s: none, i: gid, ul: vert handle, r: none //TupleList vert_map(0, 1, 1, 0, 0); TupleList vert_map; rval = read_vertices(proc, processorID, verticesID, topologyID, new_ents, vert_map); CHKERR(rval, NULL); rval = read_cells(proc, problemID, verticesID, topologyID, vert_map, new_ents); CHKERR(rval, NULL); return rval; }