1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- ****************************************************************************
- *
- * MODULE: v.transform
- * AUTHOR(S): See other files as well...
- * Eric G. Miller <egm2@jps.net>
- * PURPOSE: To transform a vector layer's coordinates via a set of tie
- * points.
- * COPYRIGHT: (C) 2002 by the GRASS Development Team
- *
- * This program is free software under the GNU General Public
- * License (>=v2). Read the file COPYING that comes with GRASS
- * for details.
- *
- *****************************************************************************/
- /*
- * create_transform_conversion () - main driver routine to prepare
- * the transformation equation.
- *
- * Written by the GRASS Team, 02/16/90, -mh.
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include <grass/glocale.h>
- #include <grass/gis.h>
- #include <grass/vector.h>
- #include "trans.h"
- #include "local_proto.h"
- int create_transform_from_file(struct file_info *Coord)
- {
- int status;
- int n_points;
- init_transform_arrays();
- n_points = 0;
- /* Get the coordinates from the file. */
- if ((n_points = get_coor_from_file(Coord->fp)) < 0)
- G_fatal_error(_("Error reading coordinates file"));
- status = setup_transform(n_points);
- if (status != ALL_OK) {
- G_message(_("Number of points that have been entered [%d]"),
- n_points);
- print_transform_error(status);
- G_fatal_error(_("Error creating transformation"));
- }
- if (G_verbose() > G_verbose_std())
- print_transform_resids(n_points);
- return (0);
- } /* create_transform_from_file() */
|