#include <grass/gis.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <math.h>
Go to the source code of this file.
Functions | |
int | G__make_location (char *location_name, struct Cell_head *wind, struct Key_Value *proj_info, struct Key_Value *proj_units, FILE *report_file) |
int | G_make_location (char *location_name, struct Cell_head *wind, struct Key_Value *proj_info, struct Key_Value *proj_units, FILE *report_file) |
create a new location | |
int | G_compare_projections (struct Key_Value *proj_info1, struct Key_Value *proj_units1, struct Key_Value *proj_info2, struct Key_Value *proj_units2) |
compare projections |
int G__make_location | ( | char * | location_name, | |
struct Cell_head * | wind, | |||
struct Key_Value * | proj_info, | |||
struct Key_Value * | proj_units, | |||
FILE * | report_file | |||
) |
Definition at line 47 of file make_loc.c.
References G__file_name(), G__put_window(), G__setenv(), G_gisdbase(), G_write_key_value_file(), and NULL.
Referenced by G_make_location().
int G_compare_projections | ( | struct Key_Value * | proj_info1, | |
struct Key_Value * | proj_units1, | |||
struct Key_Value * | proj_info2, | |||
struct Key_Value * | proj_units2 | |||
) |
compare projections
proj_info1 | ||
proj_units1 | ||
proj_info2 | ||
proj_units2 |
Definition at line 176 of file make_loc.c.
References G_find_key_value(), and NULL.
int G_make_location | ( | char * | location_name, | |
struct Cell_head * | wind, | |||
struct Key_Value * | proj_info, | |||
struct Key_Value * | proj_units, | |||
FILE * | report_file | |||
) |
create a new location
This function creates a new location in the current database, initializes the projection, default window and current window.
char | * location_name The name of the new location. Should not include the full path, the location will be created within the current database. | |
struct | Cell_head *wind Contains the default window setting for the new location. All fields should be set in this structure, and care should be taken to ensure that the proj/zone fields match the definition in the proj_info parameter (see G_set_cellhd_from_projinfo()). | |
struct | Key_Value *proj_info Projection definition suitable to write to the PROJ_INFO file, or NULL for PROJECTION_XY. | |
struct | Key_Value *proj_units Projection units suitable to write to the PROJ_UNITS file, or NULL. | |
FILE | *report_file File to which creation information should be written (can be stdout). Currently not used. |
Definition at line 131 of file make_loc.c.
References G__make_location(), and G_fatal_error().