GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Vector library - Building topology. More...
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <grass/glocale.h>
#include <grass/gis.h>
#include <grass/Vect.h>
Go to the source code of this file.
Functions | |
int | Vect_build (struct Map_info *Map) |
Build topology for vector map. More... | |
int | Vect_get_built (struct Map_info *Map) |
Return current highest built level (part) More... | |
int | Vect_build_partial (struct Map_info *Map, int build) |
Build partial topology for vector map. More... | |
int | Vect_save_topo (struct Map_info *Map) |
Save topology file for vector map. More... | |
int | Vect_topo_dump (struct Map_info *Map, FILE *out) |
Dump topology to file. More... | |
int | Vect_save_spatial_index (struct Map_info *Map) |
Save spatial index file. More... | |
int | Vect_spatial_index_dump (struct Map_info *Map, FILE *out) |
Dump spatial index to file. More... | |
Vector library - Building topology.
Higher level functions for reading/writing/manipulating vectors.
(C) 2001-2008 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.
Definition in file build.c.
int Vect_build | ( | struct Map_info * | Map | ) |
Build topology for vector map.
Map | vector map |
Definition at line 53 of file build.c.
References Vect_build_partial().
Referenced by wxdisplay.DisplayDriver::CloseMap(), G_sites_close(), and wxdisplay.DisplayDriver::OpenMap().
Build partial topology for vector map.
Should only be used in special cases of vector processing.
This functions optionally builds only some parts of topology. Highest level is specified by build parameter which may be:
If functions is called with build lower than current value of the Map, the level is downgraded to requested value.
All calls to Vect_write_line(), Vect_rewrite_line(), Vect_delete_line() respect the last value of build used in this function.
Values lower than GV_BUILD_ALL are supported only by GV_FORMAT_NATIVE, other formats ignore build and build always GV_BUILD_ALL
Note that the functions has effect only if requested level is higher than current level, to rebuild part of topology, call first downgrade and then upgrade, for example:
Vect_build() Vect_build_partial(,GV_BUILD_BASE,) Vect_build_partial(,GV_BUILD_AREAS,)
Map | vector map |
build | highest level of build |
Definition at line 107 of file build.c.
References dig_cidx_free(), dig_cidx_init(), dig_cidx_sort(), G_debug(), G_message(), G_verbose_message(), Vect_area_alive(), Vect_get_area_centroid(), Vect_get_name(), Vect_get_num_areas(), and Vect_get_num_lines().
Referenced by wxdisplay.DisplayDriver::CloseMap(), and Vect_build().
int Vect_get_built | ( | struct Map_info * | Map | ) |
int Vect_save_spatial_index | ( | struct Map_info * | Map | ) |
Save spatial index file.
Map | vector map |
Definition at line 390 of file build.c.
References buf, dig__byte_order_out(), dig_file_init(), dig_init_portable(), dig_write_spidx(), fclose(), G__file_name(), G_debug(), G_warning(), NULL, and sprintf().
int Vect_save_topo | ( | struct Map_info * | Map | ) |
Save topology file for vector map.
Map | vector map |
Definition at line 239 of file build.c.
References buf, dig__byte_order_out(), dig_file_init(), dig_init_portable(), dig_write_plus_file(), fclose(), G__file_name(), G_debug(), G_warning(), NULL, and sprintf().
Referenced by Vect_close().
int Vect_spatial_index_dump | ( | struct Map_info * | Map, |
FILE * | out | ||
) |
Dump spatial index to file.
Map | vector map |
out | file for output (stdout/stderr for example) |
Definition at line 433 of file build.c.
References dig_dump_spidx(), and Vect_build_sidx_from_topo().
int Vect_topo_dump | ( | struct Map_info * | Map, |
FILE * | out | ||
) |
Dump topology to file.
Map | vector map |
out | file for output (stdout/stderr for example) |
Definition at line 282 of file build.c.
References tools::box, NULL, and Vect_box_copy().