#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "glocale.h"
#include "gis.h"
#include "Vect.h"
Include dependency graph for open.c:
Go to the source code of this file.
Defines | |
#define | MAX_OPEN_LEVEL 2 |
Functions | |
void | fatal_error (int ferror, char *errmsg) |
int | Vect_set_open_level (int level) |
Predetermine level at which a map will be opened for reading. If it can't open that level, the open will fail. The specified level must be set before any call to open. The default is to try to open the highest level possible, and keep stepping down until success. | |
int | Vect__open_old (struct Map_info *Map, char *name, char *mapset, int update, int head_only) |
Returns Level of openness. [ 1, 2 ] or -1 for error. In case of error, the functions respect fatal error settings. | |
int | Vect_open_old (struct Map_info *Map, char *name, char *mapset) |
Open old vector for reading. | |
int | Vect_open_update (struct Map_info *Map, char *name, char *mapset) |
Open old vector for reading/writing. | |
int | Vect_open_old_head (struct Map_info *Map, char *name, char *mapset) |
Reads only info about vector from headers of 'head', 'dbln', 'topo' and 'cidx' file. | |
int | Vect_open_update_head (struct Map_info *Map, char *name, char *mapset) |
Open old vector head for updating (mostly for database link updates). | |
int | Vect_open_new (struct Map_info *Map, char *name, int with_z) |
Open new vector for reading/writing. | |
int | Vect_coor_info (struct Map_info *Map, struct Coor_info *Info) |
ADD. | |
char * | Vect_maptype_info (struct Map_info *Map) |
returns maptype (native, shape, postgis) | |
int | Vect_open_topo (struct Map_info *Map, int head_only) |
int | Vect_open_spatial_index (struct Map_info *Map) |
Open spatial index file. |
#define MAX_OPEN_LEVEL 2 |
void fatal_error | ( | int | ferror, | |
char * | errmsg | |||
) |
Vect__open_old | ( | struct Map_info * | Map, | |
char * | name, | |||
char * | mapset, | |||
int | update, | |||
int | head | |||
) |
Returns Level of openness. [ 1, 2 ] or -1 for error. In case of error, the functions respect fatal error settings.
Map | ||
name | ||
mapset | ||
update | open for update | |
head_only | Read only header info from 'head', 'dbln', 'topo' and 'cidx'. 'cidx' is not opened. The headed may be opened on level 2 only. |
Definition at line 116 of file open.c.
References fatal_error(), V2_open_old_ogr(), Vect__init_head(), Vect__read_head(), Vect_cidx_open(), Vect_get_fatal_error(), Vect_get_full_name(), Vect_hist_write(), Vect_new_dblinks_struct(), Vect_open_topo(), Vect_read_dblinks(), Vect_rewind(), and Vect_set_fatal_error().
Referenced by Vect_open_old(), Vect_open_old_head(), Vect_open_update(), and Vect_open_update_head().
int Vect_coor_info | ( | struct Map_info * | Map, | |
struct Coor_info * | Info | |||
) |
ADD.
Map_info | structure, Coor_info structure |
Definition at line 552 of file open.c.
Referenced by check_coor(), V1_close_nat(), Vect_close(), and Vect_open_topo().
char * Vect_maptype_info | ( | struct Map_info * | Map | ) |
int Vect_open_new | ( | struct Map_info * | Map, | |
char * | name, | |||
int | with_z | |||
) |
Open new vector for reading/writing.
Map_info | structure, map name, with_z |
Definition at line 470 of file open.c.
References fatal_error(), V1_open_new_nat(), Vect__init_head(), Vect_delete(), Vect_get_fatal_error(), Vect_get_full_name(), Vect_legal_filename(), Vect_new_dblinks_struct(), and Vect_set_fatal_error().
int Vect_open_old | ( | struct Map_info * | Map, | |
char * | name, | |||
char * | mapset | |||
) |
Open old vector for reading.
Map | ||
name | ||
mapset |
Definition at line 370 of file open.c.
References Vect__open_old().
Vect_open_old_head | ( | struct Map_info * | Map, | |
char * | name, | |||
char * | mapset | |||
) |
Reads only info about vector from headers of 'head', 'dbln', 'topo' and 'cidx' file.
Map | ||
name | ||
mapset |
Definition at line 426 of file open.c.
References Vect__open_old().
Referenced by Vect_copy(), and Vect_delete().
int Vect_open_spatial_index | ( | struct Map_info * | Map | ) |
int Vect_open_topo | ( | struct Map_info * | Map, | |
int | head_only | |||
) |
int Vect_open_update | ( | struct Map_info * | Map, | |
char * | name, | |||
char * | mapset | |||
) |
Open old vector for reading/writing.
Map | ||
name | ||
mapset |
Definition at line 390 of file open.c.
References Vect__open_old(), and Vect_build_sidx_from_topo().
int Vect_open_update_head | ( | struct Map_info * | Map, | |
char * | name, | |||
char * | mapset | |||
) |
Open old vector head for updating (mostly for database link updates).
Map | ||
name | ||
mapset |
Definition at line 441 of file open.c.
References Vect__open_old().
Referenced by Vect_copy(), and Vect_rename().
int Vect_set_open_level | ( | int | level | ) |
Predetermine level at which a map will be opened for reading. If it can't open that level, the open will fail. The specified level must be set before any call to open. The default is to try to open the highest level possible, and keep stepping down until success.
NOTE!! This should only be used to set when you wish to force a lower level open. If you require a higher level, then just check the return to verify the level instead of forcing it. This is because future releases will have higher levels which will be downward compatible and which your programs should support by default.
vector | level |
Definition at line 90 of file open.c.
References MAX_OPEN_LEVEL.
Referenced by Vect_copy(), Vect_delete(), and Vect_rename().