#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include "gis.h"#include "Vect.h"Include dependency graph for cindex.c:

Go to the source code of this file.
Defines | |
| #define | SEP "------------------------------------------------------------------------------------------\n" |
Functions | |
| int | Vect_cidx_get_num_fields (struct Map_info *Map) |
| get nuber of field in category index | |
| int | Vect_cidx_get_field_number (struct Map_info *Map, int index) |
| get field number for given index | |
| int | Vect_cidx_get_field_index (struct Map_info *Map, int field) |
| get field index for given field number | |
| int | Vect_cidx_get_num_unique_cats_by_index (struct Map_info *Map, int index) |
| get nuber of unique categories for given field index | |
| int | Vect_cidx_get_num_cats_by_index (struct Map_info *Map, int index) |
| get nuber of categories for given field index | |
| int | Vect_cidx_get_num_types_by_index (struct Map_info *Map, int field_index) |
| get nuber of types for given field index | |
| int | Vect_cidx_get_type_count_by_index (struct Map_info *Map, int field_index, int type_index, int *type, int *count) |
| get type count field index and type index | |
| int | Vect_cidx_get_type_count (struct Map_info *Map, int field, int type) |
| get count of features of certain type by field and type | |
| int | Vect_cidx_get_cat_by_index (struct Map_info *Map, int field_index, int cat_index, int *cat, int *type, int *id) |
| int | Vect_cidx_find_next (struct Map_info *Map, int field_index, int cat, int type_mask, int start_index, int *type, int *id) |
| find next line/area id for given category, start_index and type_mask | |
| int | Vect_cidx_dump (struct Map_info *Map, FILE *out) |
| write category index in text form to file | |
| int | Vect_cidx_save (struct Map_info *Map) |
| write category index to file | |
| int | Vect_cidx_open (struct Map_info *Map, int head_only) |
| #define SEP "------------------------------------------------------------------------------------------\n" |
| int Vect_cidx_dump | ( | struct Map_info * | Map, | |
| FILE * | out | |||
| ) |
write category index in text form to file
| Map_info | structure | |
| out | output file |
Definition at line 301 of file cindex.c.
References SEP, Vect_cidx_get_cat_by_index(), Vect_cidx_get_field_number(), Vect_cidx_get_num_cats_by_index(), Vect_cidx_get_num_fields(), Vect_cidx_get_num_types_by_index(), Vect_cidx_get_num_unique_cats_by_index(), and Vect_cidx_get_type_count_by_index().
| int Vect_cidx_find_next | ( | struct Map_info * | Map, | |
| int | field_index, | |||
| int | cat, | |||
| int | type_mask, | |||
| int | start_index, | |||
| int * | type, | |||
| int * | id | |||
| ) |
find next line/area id for given category, start_index and type_mask
-1 not found
| Map | ||
| field_index | ||
| cat | category | |
| type_mask | requested type | |
| start_index | start search at this index (0 - whole category index) | |
| type | returned type | |
| id | returned line/area id |
| int Vect_cidx_get_cat_by_index | ( | struct Map_info * | Map, | |
| int | field_index, | |||
| int | cat_index, | |||
| int * | cat, | |||
| int * | type, | |||
| int * | id | |||
| ) |
| int Vect_cidx_get_field_index | ( | struct Map_info * | Map, | |
| int | field | |||
| ) |
get field index for given field number
| Map_info | structure | |
| field | field number |
Definition at line 69 of file cindex.c.
Referenced by Vect_cidx_get_type_count().
| int Vect_cidx_get_field_number | ( | struct Map_info * | Map, | |
| int | index | |||
| ) |
get field number for given index
| Map_info | structure | |
| index | field index: from 0 to Vect_cidx_get_num_fields()-1 |
Definition at line 51 of file cindex.c.
Referenced by Vect_cidx_dump().
| int Vect_cidx_get_num_cats_by_index | ( | struct Map_info * | Map, | |
| int | index | |||
| ) |
get nuber of categories for given field index
| Map_info | structure | |
| index |
Definition at line 112 of file cindex.c.
Referenced by Vect_cidx_dump().
| int Vect_cidx_get_num_fields | ( | struct Map_info * | Map | ) |
get nuber of field in category index
| Map_info | structure |
Definition at line 36 of file cindex.c.
Referenced by Vect_cidx_dump().
| int Vect_cidx_get_num_types_by_index | ( | struct Map_info * | Map, | |
| int | field_index | |||
| ) |
get nuber of types for given field index
| Map_info | structure | |
| index |
Definition at line 129 of file cindex.c.
Referenced by Vect_cidx_dump().
| int Vect_cidx_get_num_unique_cats_by_index | ( | struct Map_info * | Map, | |
| int | index | |||
| ) |
get nuber of unique categories for given field index
| Map_info | structure | |
| field |
Definition at line 95 of file cindex.c.
Referenced by Vect_cidx_dump().
| int Vect_cidx_get_type_count | ( | struct Map_info * | Map, | |
| int | field, | |||
| int | type | |||
| ) |
get count of features of certain type by field and type
| Map_info | structure | |
| field | ||
| type |
Definition at line 169 of file cindex.c.
References Vect_cidx_get_field_index().
| int Vect_cidx_get_type_count_by_index | ( | struct Map_info * | Map, | |
| int | field_index, | |||
| int | type_index, | |||
| int * | type, | |||
| int * | count | |||
| ) |
get type count field index and type index
0 on error
| Map_info | structure | |
| index |
Definition at line 148 of file cindex.c.
Referenced by Vect_cidx_dump().
| int Vect_cidx_open | ( | struct Map_info * | Map, | |
| int | head_only | |||
| ) |
| int Vect_cidx_save | ( | struct Map_info * | Map | ) |
write category index to file
1 on error
| Map_info | structure |
Definition at line 353 of file cindex.c.
Referenced by Vect_close().
1.4.7