GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | Vect_print_header (struct Map_info *Map) |
Print vector map header. More... | |
int | Vect_read_header (struct Map_info *Map) |
Read vector map header from map head file. More... | |
int | Vect_write_header (struct Map_info *Map) |
Write vector map header to map head file. More... | |
int | Vect__write_head (struct Map_info *Map) |
Writes head information to text file. More... | |
int | Vect__read_head (struct Map_info *Map) |
Reads head information from text file (GRASS_VECT_HEAD_ELEMENT). More... | |
const char * | Vect_get_name (struct Map_info *Map) |
Get map name. More... | |
const char * | Vect_get_mapset (struct Map_info *Map) |
Get mapset name. More... | |
const char * | Vect_get_full_name (struct Map_info *Map) |
Get full map name. More... | |
int | Vect_is_3d (struct Map_info *Map) |
Check if vector map is 3D (with z) More... | |
int | Vect_set_organization (struct Map_info *Map, const char *str) |
Set organization string in map header. More... | |
const char * | Vect_get_organization (struct Map_info *Map) |
Get organization string from map header. More... | |
int | Vect_set_date (struct Map_info *Map, const char *str) |
Set date of digitization string in map header. More... | |
const char * | Vect_get_date (struct Map_info *Map) |
Get date of digitization string from map header. More... | |
int | Vect_set_person (struct Map_info *Map, const char *str) |
Set user name string who digitized the map in map header. More... | |
const char * | Vect_get_person (struct Map_info *Map) |
Get user name string who digitized the map from map header. More... | |
int | Vect_set_map_name (struct Map_info *Map, const char *str) |
Set map name string in map header. More... | |
const char * | Vect_get_map_name (struct Map_info *Map) |
Get map name string in map header. More... | |
int | Vect_set_map_date (struct Map_info *Map, const char *str) |
Set date string when the source map was originally produced in map header. More... | |
const char * | Vect_get_map_date (struct Map_info *Map) |
Get date string when the source map was originally produced in map header. More... | |
int | Vect_set_scale (struct Map_info *Map, int scale) |
Set map scale in map header. More... | |
int | Vect_get_scale (struct Map_info *Map) |
Get map scale from map header. More... | |
int | Vect_set_comment (struct Map_info *Map, const char *str) |
Set comment or other info string in map header. More... | |
const char * | Vect_get_comment (struct Map_info *Map) |
Get comment or other info string from map header. More... | |
int | Vect_set_zone (struct Map_info *Map, int zone) |
Set projection zone in map header. More... | |
int | Vect_get_zone (struct Map_info *Map) |
Get projection zone from map header. More... | |
int | Vect_get_proj (struct Map_info *Map) |
Get projection from map header. More... | |
const char * | Vect_get_proj_name (struct Map_info *Map) |
Query cartographic projection name of vector map. More... | |
int | Vect_set_thresh (struct Map_info *Map, double thresh) |
Set threshold used for digitization in map header. More... | |
double | Vect_get_thresh (struct Map_info *Map) |
Get threshold used for digitization from map header. More... | |
int Vect__read_head | ( | struct Map_info * | Map | ) |
Reads head information from text file (GRASS_VECT_HEAD_ELEMENT).
Map | vector map |
Definition at line 122 of file vector/Vlib/header.c.
References buff, fclose(), G_debug(), G_fopen_old(), G_getl2(), G_index(), G_warning(), NULL, sprintf(), Vect_get_full_name(), Vect_set_comment(), Vect_set_date(), Vect_set_map_date(), Vect_set_map_name(), Vect_set_organization(), Vect_set_person(), Vect_set_scale(), Vect_set_thresh(), and Vect_set_zone().
Referenced by Vect__open_old(), and Vect_read_header().
int Vect__write_head | ( | struct Map_info * | Map | ) |
Writes head information to text file.
Map | vector map |
Definition at line 86 of file vector/Vlib/header.c.
References buf, fclose(), G_fopen_new(), G_warning(), NULL, sprintf(), Vect_get_comment(), Vect_get_date(), Vect_get_full_name(), Vect_get_map_date(), Vect_get_map_name(), Vect_get_organization(), Vect_get_person(), Vect_get_scale(), Vect_get_thresh(), and Vect_get_zone().
Referenced by V1_close_nat(), V1_close_ogr(), V1_open_new_nat(), and Vect_write_header().
const char* Vect_get_comment | ( | struct Map_info * | Map | ) |
Get comment or other info string from map header.
Map | vector map |
Definition at line 439 of file vector/Vlib/header.c.
Referenced by G_site_get_head(), Vect__write_head(), and Vect_copy_head_data().
const char* Vect_get_date | ( | struct Map_info * | Map | ) |
Get date of digitization string from map header.
SUGGESTION: this should be coupled to DateTime functions to support time series
Map | vector map |
Definition at line 305 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), and Vect_copy_head_data().
const char* Vect_get_full_name | ( | struct Map_info * | Map | ) |
Get full map name.
Map | vector map |
Definition at line 227 of file vector/Vlib/header.c.
References sprintf().
Referenced by IL_vector_input_data_2d(), Vect__open_old(), Vect__read_head(), Vect__write_head(), Vect_close(), Vect_copy_map_lines(), Vect_get_centroid_area(), Vect_get_line_areas(), Vect_get_line_nodes(), Vect_get_node_line(), Vect_get_node_line_angle(), Vect_get_node_n_lines(), Vect_open_new(), Vect_read_line(), and Vect_read_line_geos().
const char* Vect_get_map_date | ( | struct Map_info * | Map | ) |
Get date string when the source map was originally produced in map header.
Map | vector map |
Definition at line 386 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), Vect_copy_head_data(), and Vect_print_header().
const char* Vect_get_map_name | ( | struct Map_info * | Map | ) |
Get map name string in map header.
Map | vector map |
Definition at line 359 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), Vect_copy_head_data(), and Vect_print_header().
const char* Vect_get_mapset | ( | struct Map_info * | Map | ) |
Get mapset name.
Map | vector map |
Definition at line 215 of file vector/Vlib/header.c.
Referenced by wxdigit.IVDigit::OpenBackgroundMap().
const char* Vect_get_name | ( | struct Map_info * | Map | ) |
Get map name.
Map | vector map |
Definition at line 203 of file vector/Vlib/header.c.
Referenced by G_site_get_head(), wxdigit.IVDigit::OpenBackgroundMap(), and Vect_build_partial().
const char* Vect_get_organization | ( | struct Map_info * | Map | ) |
Get organization string from map header.
Map | vector map |
Definition at line 272 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), Vect_copy_head_data(), and Vect_print_header().
const char* Vect_get_person | ( | struct Map_info * | Map | ) |
Get user name string who digitized the map from map header.
Map | vector map |
Definition at line 332 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), and Vect_copy_head_data().
int Vect_get_proj | ( | struct Map_info * | Map | ) |
Get projection from map header.
Map | vector map |
Definition at line 481 of file vector/Vlib/header.c.
Referenced by Vect_get_proj_name().
const char* Vect_get_proj_name | ( | struct Map_info * | Map | ) |
Query cartographic projection name of vector map.
Returns a pointer to a string which is a printable name for projection code proj (as returned by Vect_get_proj()). Returns NULL if proj is not a valid projection.
Map | vector map |
Definition at line 499 of file vector/Vlib/header.c.
References G__projection_name(), G_store(), n, render::name, and Vect_get_proj().
int Vect_get_scale | ( | struct Map_info * | Map | ) |
Get map scale from map header.
Map | vector map |
Definition at line 412 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), Vect_copy_head_data(), and Vect_print_header().
double Vect_get_thresh | ( | struct Map_info * | Map | ) |
Get threshold used for digitization from map header.
Map | vector map |
Definition at line 543 of file vector/Vlib/header.c.
References G_debug().
Referenced by Vect__write_head(), and Vect_copy_head_data().
int Vect_get_zone | ( | struct Map_info * | Map | ) |
Get projection zone from map header.
Map | vector map |
Definition at line 466 of file vector/Vlib/header.c.
Referenced by Vect__write_head(), and Vect_copy_head_data().
int Vect_is_3d | ( | struct Map_info * | Map | ) |
Check if vector map is 3D (with z)
Map | vector map |
Definition at line 244 of file vector/Vlib/header.c.
Referenced by G_site_describe(), G_site_get(), Gp_load_sites(), Gv_load_vect(), IL_vector_input_data_2d(), wxdigit.IVDigit::InitCats(), wxdigit.IVDigit::IsVector3D(), wxdisplay.DisplayDriver::OpenMap(), Vect_break_lines_list(), Vect_line_to_geos(), Vect_remove_duplicates(), Vedit_move_lines(), and Vedit_move_vertex().
int Vect_print_header | ( | struct Map_info * | Map | ) |
Print vector map header.
Map | vector map |
Definition at line 37 of file vector/Vlib/header.c.
References Vect_get_map_date(), Vect_get_map_name(), Vect_get_organization(), and Vect_get_scale().
int Vect_read_header | ( | struct Map_info * | Map | ) |
Read vector map header from map head file.
Map | vector map |
Definition at line 56 of file vector/Vlib/header.c.
References Vect__read_head().
int Vect_set_comment | ( | struct Map_info * | Map, |
const char * | str | ||
) |
Set comment or other info string in map header.
Map | vector map |
str | comment or other info string |
Definition at line 425 of file vector/Vlib/header.c.
References G_free(), and G_store().
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_set_date | ( | struct Map_info * | Map, |
const char * | str | ||
) |
Set date of digitization string in map header.
SUGGESTION: this should be coupled to DateTime functions to support time series
Map | vector map |
str | data string |
Definition at line 288 of file vector/Vlib/header.c.
References G_free(), and G_store().
Referenced by G_site_put_head(), Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_set_map_date | ( | struct Map_info * | Map, |
const char * | str | ||
) |
Set date string when the source map was originally produced in map header.
Map | vector map |
str | date when the source map was originally produced string |
Definition at line 372 of file vector/Vlib/header.c.
References G_free(), and G_store().
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_set_map_name | ( | struct Map_info * | Map, |
const char * | str | ||
) |
Set map name string in map header.
Map | vector map |
str | map name string |
Definition at line 345 of file vector/Vlib/header.c.
References G_free(), and G_store().
Referenced by G_site_put_head(), Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_set_organization | ( | struct Map_info * | Map, |
const char * | str | ||
) |
Set organization string in map header.
Map | vector map |
str | organization name |
Definition at line 257 of file vector/Vlib/header.c.
References G_free(), and G_store().
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_set_person | ( | struct Map_info * | Map, |
const char * | str | ||
) |
Set user name string who digitized the map in map header.
Map | vector map |
str | user name string |
Definition at line 318 of file vector/Vlib/header.c.
References G_free(), and G_store().
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
Set map scale in map header.
Map | vector map |
map | scale |
Definition at line 399 of file vector/Vlib/header.c.
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_set_thresh | ( | struct Map_info * | Map, |
double | thresh | ||
) |
Set threshold used for digitization in map header.
Map | vector map |
thresh | threshold used for digitization |
Definition at line 529 of file vector/Vlib/header.c.
References G_debug().
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
Set projection zone in map header.
Map | vector map |
zone | projection zone |
Definition at line 452 of file vector/Vlib/header.c.
Referenced by Vect__init_head(), Vect__read_head(), and Vect_copy_head_data().
int Vect_write_header | ( | struct Map_info * | Map | ) |
Write vector map header to map head file.
Map | vector map |
Definition at line 70 of file vector/Vlib/header.c.
References Vect__write_head().