create_map.c 928 B

1234567891011121314151617181920212223242526272829303132
  1. /****************************************************************************
  2. *
  3. * MODULE: r.digit
  4. *
  5. * AUTHOR(S): Michael Shapiro - CERL
  6. *
  7. * PURPOSE: Interactive tool used to draw and save vector features
  8. * on a graphics monitor using a pointing device (mouse)
  9. * and save to a raster map.
  10. *
  11. * COPYRIGHT: (C) 2006 by the GRASS Development Team
  12. *
  13. * This program is free software under the GNU General Public
  14. * License (>=v2). Read the file COPYING that comes with GRASS
  15. * for details.
  16. *
  17. ***************************************************************************/
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. int create_map(char *name, char *polyfile)
  21. {
  22. char buf[1024];
  23. sprintf(buf, "r.in.poly rows=512 i=\"%s\" o=\"%s\"", polyfile, name);
  24. fprintf(stdout, "Creating raster map %s\n", name);
  25. return system(buf);
  26. }