build.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "glocale.h"
#include "gis.h"
#include "Vect.h"

Include dependency graph for build.c:

Go to the source code of this file.

Functions

int prnmsg (char *msg,...)
int Vect_build (struct Map_info *Map, FILE *msgout)
 build topology for vector map
int Vect_get_built (struct Map_info *Map)
 return current highest built level (part)
int Vect_build_partial (struct Map_info *Map, int build, FILE *msgout)
 build partial topology for vector map
int Vect_save_topo (struct Map_info *Map)
 save topology file for vector map
int Vect_topo_dump (struct Map_info *Map, FILE *out)
int Vect_save_spatial_index (struct Map_info *Map)
 save spatial index file
int Vect_spatial_index_dump (struct Map_info *Map, FILE *out)

Variables

FILE * Msgout = NULL


Function Documentation

int prnmsg ( char *  msg,
  ... 
)

Definition at line 39 of file build.c.

Referenced by Vect_build_ogr(), and Vect_build_partial().

int Vect_build ( struct Map_info *  Map,
FILE *  msgout 
)

build topology for vector map

Returns:
1 on success, 0 on error
Parameters:
Map_info structure, file for message output (stdout/stderr for example) or NULL

Definition at line 61 of file build.c.

References Vect_build_partial().

int Vect_build_partial ( struct Map_info *  Map,
int  top,
FILE *  msgout 
)

build partial topology for vector map

This functions optionaly builds only some parts of topology. Highest level is specified by build parameter which may be: GV_BUILD_NONE - nothing is build GV_BUILD_BASE - basic topology, nodes, spatial index GV_BUILD_AREAS - build areas and islands, but islands are not attached to areas GV_BUILD_ATTACH_ISLES - attache islands to areas GV_BUILD_CENTROIDS - assign centroids to areas GV_BUILD_ALL - top level, the same as GV_BUILD_CENTROIDS

If fuctions 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,)

Returns:
1 on success, 0 on error
Parameters:
Map vector map
build highest level of build
msgout file pointer for message output (stdout/stderr for example) or NULL

Definition at line 113 of file build.c.

References prnmsg(), and Vect_get_num_lines().

Referenced by Vect_build().

int Vect_get_built ( struct Map_info *  Map  ) 

return current highest built level (part)

Returns:
current highest built level
Parameters:
Map vector map

Definition at line 74 of file build.c.

int Vect_save_spatial_index ( struct Map_info *  Map  ) 

save spatial index file

Returns:
1 on success, 0 on error
Parameters:
Map_info structure

Definition at line 368 of file build.c.

int Vect_save_topo ( struct Map_info *  Map  ) 

save topology file for vector map

Returns:
1 on success, 0 on error
Parameters:
Map_info structure

Definition at line 229 of file build.c.

Referenced by Vect_close().

int Vect_spatial_index_dump ( struct Map_info *  Map,
FILE *  out 
)

Definition at line 409 of file build.c.

References Vect_build_sidx_from_topo().

int Vect_topo_dump ( struct Map_info *  Map,
FILE *  out 
)

Definition at line 270 of file build.c.

References Vect_box_copy().


Variable Documentation

FILE* Msgout = NULL

Definition at line 37 of file build.c.

Referenced by Vect_build_nat(), and Vect_build_ogr().


Generated on Sat Jul 22 22:05:58 2006 for GRASS by  doxygen 1.4.7