3 #ifndef DIG___EXTERNS___ 4 #define DIG___EXTERNS___ 82 double,
double,
double *,
double *);
86 double,
double,
double,
double,
int,
87 double *,
double *,
double *,
double *,
int dig_spindex_init(struct Plus_head *)
int dig__fwrite_port_P(const plus_t *, size_t, struct gvfile *)
Write plus_t to the Portable Vector Format.
int dig_read_frmt_ascii(FILE *, struct Format_info *)
Read external vector format file.
void dig_spidx_free_areas(struct Plus_head *)
Reset spatial index for areas.
void dig_rewind(struct gvfile *file)
Rewind file position.
int dig_line_set_area(struct Plus_head *, plus_t, int, plus_t)
Set area number on line side.
int SearchHitCallback(int id, const struct RTree_Rect *rect, void *arg)
void dig_init_portable(struct Port_info *, int)
Set Port_info structure to byte order of file.
plus_t ** dig_get_cont_lines(struct Map_info *, plus_t, double, int)
size_t dig_fwrite(const void *ptr, size_t size, size_t nmemb, struct gvfile *file)
Write struct gvfile.
int dig_dump_spidx(FILE *, const struct Plus_head *)
Dump spatial index.
int dig__fwrite_port_I(const int *, size_t, struct gvfile *)
Write integers to the Portable Vector Format.
int dig_spidx_del_isle(struct Plus_head *, int)
Delete isle from spatial index.
int dig_type_to_store(int)
Convert type to store type.
struct P_isle * dig_alloc_isle()
Allocate new isle structure.
double dig_find_poly_orientation(struct line_pnts *)
int dig__fwrite_port_C(const char *, size_t, struct gvfile *)
Write chars to the Portable Vector Format.
int dig_point_by_line(struct Map_info *, double, double, double, double, char)
int dig__fread_port_I(int *, size_t, struct gvfile *)
Read integers from the Portable Vector Format.
int dig_spidx_del_line(struct Plus_head *, int, double, double, double)
Delete line from spatial index.
struct P_area * dig_alloc_area()
Allocate new area structure.
int dig__fread_port_C(char *, size_t, struct gvfile *)
Read chars from the Portable Vector Format.
int dig_Rd_spidx_head(struct gvfile *, struct Plus_head *)
Read spatial index header from sidx file.
int dig_area_get_box(struct Plus_head *, plus_t, struct bound_box *)
int dig_select_isles(struct Plus_head *, const struct bound_box *, struct boxlist *)
Select isles with boxes by box.
void dig_free_plus_nodes(struct Plus_head *)
Free Plus->Node structure.
plus_t dig_line_get_area(struct Plus_head *, plus_t, int)
Get area number on line side.
int dig_line_box(const struct line_pnts *, struct bound_box *)
plus_t * dig__long_convert_to_plus_t(long *, plus_t *, int, struct dig_head *)
void * dig_alloc_topo(char)
Allocate new topo struct.
void dig_cidx_free(struct Plus_head *)
int dig_area_add_isle(struct Plus_head *, int, int)
Add isle to area if does not exist yet.
int dig_Wr_P_node(struct Plus_head *, int i, struct gvfile *)
int dig_head_to_map(struct Plus_head *, struct Map_info *)
double * dig__double_convert(double *, double *, int, struct dig_head *)
int dig_write_nodes(struct gvfile *, struct Plus_head *)
Writes topo structure (nodes) to topo file.
float dig_calc_end_angle(const struct line_pnts *, double)
int dig_add_isle(struct Plus_head *, int, plus_t *, struct bound_box *)
Allocate space for new island and create boundary info from array.
int dig_box_extend(struct bound_box *, struct bound_box *)
float * dig__float_convert(float *, float *, int, struct dig_head *)
int dig_set_distance_to_line_tolerance(double)
int dig__fread_port_L(long *, size_t, struct gvfile *)
Read longs from the Portable Vector Format.
char * dig_stop_clock_str(long *)
int dig_write_areas(struct gvfile *, struct Plus_head *)
Writes topo structure (areas) to topo file.
int dig_isle_get_box(struct Plus_head *, plus_t, struct bound_box *)
int dig_out_of_memory(void)
For now just print message and return error code.
int dig_start_clock(long *)
int dig_Wr_spidx(struct gvfile *, struct Plus_head *)
Write spatial index to file.
int dig_load_plus(struct Plus_head *, struct gvfile *, int)
Reads topo file to topo structure.
int dig__read_head(struct Map_info *)
void dig_free_plus(struct Plus_head *)
Free Plus structure.
off_t dig_ftell(struct gvfile *file)
Get struct gvfile position.
void dig_cidx_sort(struct Plus_head *)
int dig_del_line(struct Plus_head *, int, double, double, double)
Delete line from Plus_head structure.
size_t dig_fread(void *ptr, size_t size, size_t nmemb, struct gvfile *file)
Read struct gvfile.
int dig__fwrite_port_F(const float *, size_t, struct gvfile *)
Write floats to the Portable Vector Format.
int dig__fwrite_port_O(const off_t *, size_t, struct gvfile *, size_t)
Write off_ts to the Portable Vector Format.
void dig_spidx_free_nodes(struct Plus_head *)
Free spatial index for nodes.
int dig_boxlist_add(struct boxlist *, int, const struct bound_box *)
int dig_struct_copy(void *, void *, int)
int dig_write_isles(struct gvfile *, struct Plus_head *)
Writes topo structure (isles) to topo file.
int dig_write_plus_file(struct gvfile *, struct Plus_head *)
Writes topo structure to topo file.
int dig_fflush(struct gvfile *file)
Flush struct gvfile.
int dig_write_head_ascii(FILE *, struct dig_head *)
void dig_spidx_free(struct Plus_head *)
Free spatial index (nodes, lines, areas, isles)
void dig_node_reset_updated(struct Plus_head *)
Reset number of updated nodes.
int dig_cidx_add_cat(struct Plus_head *, int, int, int, int)
int dig_alloc_cats(struct line_cats *, int)
Allocate room for 'num' fields and category arrays in struct line_cats.
int dig_add_line(struct Plus_head *, int, const struct line_pnts *, const struct bound_box *, off_t)
Add new line to Plus_head structure.
int dig_spidx_add_area(struct Plus_head *, int, const struct bound_box *)
Add new area to spatial index.
double dig_x_intersect(double, double, double, double, double)
int rtree_search(struct RTree *, struct RTree_Rect *, SearchHitCallback, void *, struct Plus_head *)
Search spatial index file Can't use regular RTreeSearch() here because sidx must be read with dig__fr...
int dig_Rd_P_area(struct Plus_head *, int i, struct gvfile *)
int dig_alloc_lines(struct Plus_head *, int)
Reallocate array of pointers to lines.
int dig_angle_next_line(struct Plus_head *, plus_t, int, int, float *)
Find line number of next angle to follow a line.
long * dig__long_convert(long *, long *, int, struct dig_head *)
plus_t dig_get_next_cont_line(struct Map_info *, plus_t, double, int)
void dig_spidx_free_isles(struct Plus_head *)
Reset spatial index for isles.
Feature geometry info - coordinates.
float dig_calc_begin_angle(const struct line_pnts *, double)
int dig_check_dist(struct Map_info *, int, double, double, double *)
int dig_restore_line(struct Plus_head *, int, int, const struct line_pnts *, const struct bound_box *, off_t)
Restore line in Plus_head structure.
int dig_cidx_init(struct Plus_head *)
Initialize Plus_head structure (cidx)
float dig_node_line_angle(struct Plus_head *, int, int)
Return line angle.
Basic topology-related info.
int dig_cidx_del_cat(struct Plus_head *, int, int, int, int)
int dig_find_area_box(struct Plus_head *, int, struct bound_box *)
Find bounding box for given area.
int dig_node_add_line(struct Plus_head *, int, int, const struct line_pnts *, int)
Add line info to node.
int dig_alloc_areas(struct Plus_head *, int)
Reallocate array of pointers to areas.
void * dig__falloc(int, int)
int dig_Rd_P_node(struct Plus_head *, int i, struct gvfile *)
int dig_box_copy(struct bound_box *, struct bound_box *)
int dig_file_load(struct gvfile *file)
Load opened struct gvfile to memory.
void dig_node_add_updated(struct Plus_head *, int)
Add node to updated.
int dig_Wr_P_line(struct Plus_head *, int i, struct gvfile *)
int dig_point_to_line(struct Map_info *, double, double, char)
int dig_spidx_del_node(struct Plus_head *, int)
Delete node from spatial index.
int dig_type_from_store(int)
Convert type from store type.
void * dig__frealloc(void *, int, int, int)
int dig_del_isle(struct Plus_head *, int)
Delete island from Plus_head structure.
int dig_select_nodes(struct Plus_head *, const struct bound_box *, struct ilist *)
Select nodes by bbox.
char * dig__convert_buffer(int)
int dig_Wr_spidx_head(struct gvfile *, struct Plus_head *)
Write spatial index header to file.
double dig_distance2_point_to_line(double, double, double, double, double, double, double, double, double, int, double *, double *, double *, double *, int *)
void dig_free_area(struct P_area *)
Free area structure.
struct P_line * dig_alloc_line()
Allocate new line structure.
int dig_which_node(struct Plus_head *, double, double, double)
Return actual index into node arrays of the first set of matching coordinates.
char * dig_float_point(char *, int, double)
int dig_find_isle_box(struct Plus_head *, int, struct bound_box *)
Find box for isle.
int dig_alloc_points(struct line_pnts *, int)
allocate room for 'num' X and Y arrays in struct line_pnts
int dig_write_lines(struct gvfile *, struct Plus_head *)
Writes topo structure (lines) to topo file.
void dig_file_init(struct gvfile *file)
Initialize gvfile strcuture.
int dig_read_head_ascii(FILE *, struct dig_head *)
struct dig_head * dig__get_head(void)
int dig_write_frmt_ascii(FILE *, struct Format_info *, int)
int dig_node_alloc_line(struct P_node *, int)
Allocate space in P_node struct.
int * dig__long_convert_to_int(long *, int *, int, struct dig_head *)
struct P_node * dig_alloc_node()
Allocate new node structure.
void dig_file_free(struct gvfile *file)
Free struct gvfile.
Topological feature - node.
int dig_find_intersection(double, double, double, double, double, double, double, double, double *, double *)
int dig_spidx_add_isle(struct Plus_head *, int, const struct bound_box *)
Add new island to spatial index.
int dig_read_cidx_head(struct gvfile *, struct Plus_head *)
Read header of cidx file.
int dig_write_file_checks(struct gvfile *, struct Plus_head *)
int dig_Rd_Plus_head(struct gvfile *, struct Plus_head *)
Read Plus_head from file.
int dig_Wr_P_area(struct Plus_head *, int i, struct gvfile *)
int dig_spidx_add_node(struct Plus_head *, int, double, double, double)
Add new node to spatial index.
int dig_map_to_head(struct Map_info *, struct Plus_head *)
int dig_init_boxlist(struct boxlist *, int)
void * dig_alloc_space(int, int *, int, void *, int)
int dig_add_area(struct Plus_head *, int, plus_t *, struct bound_box *)
Allocate space for new area and create boundary info from array.
int dig_test_for_intersection(double, double, double, double, double, double, double, double)
void dig_line_add_updated(struct Plus_head *, int, off_t)
Add new line to updated.
short * dig__short_convert(short *in, short *out, int, struct dig_head *)
void * dig__alloc_space(int, int *, int, void *, int)
long * dig__plus_t_convert(plus_t *, long *, int, struct dig_head *)
int dig_get_poly_points(int, struct line_pnts **, int *, struct line_pnts *)
int dig_area_alloc_isle(struct P_area *, int)
Allocate space in P_area for add new isles.
void dig_free_node(struct P_node *)
Free node structure.
int dig_Wr_Plus_head(struct gvfile *, struct Plus_head *)
struct dig_head * dig_get_head(void)
double dig_unit_conversion(void)
int dig__fread_port_F(float *, size_t, struct gvfile *)
Read floats from the Portable Vector Format.
int dig_add_node(struct Plus_head *, double, double, double)
Add new node to plus structure.
void * dig_falloc(int, int)
int dig_stop_clock(long *)
int dig__fread_port_S(short *, size_t, struct gvfile *)
Read shorts from the Portable Vector Format.
int dig__fread_port_O(off_t *, size_t, struct gvfile *, size_t)
Read off_ts from the Portable Vector Format.
int dig_area_alloc_line(struct P_area *, int)
allocate space in P_area for add new lines
void dig_line_reset_updated(struct Plus_head *)
Reset number of updated lines.
int dig_node_angle_check(struct Plus_head *, int, int)
Check if angles of adjacent lines differ.
int dig__byte_order_out()
Get byte order.
int dig__fwrite_port_S(const short *, size_t, struct gvfile *)
Write shorts to the Portable Vector Format.
int dig_select_areas(struct Plus_head *, const struct bound_box *, struct boxlist *)
Select areas with boxes by box.
int dig_spidx_init(struct Plus_head *)
Initit spatial index (nodes, lines, areas, isles)
int dig_do_file_checks(struct Map_info *, char *, char *)
int dig_find_line_box(struct Plus_head *, int, struct bound_box *)
Find box for line.
List of bounding boxes with id.
void dig_spidx_free_lines(struct Plus_head *)
Free spatial index for lines.
int dig_spidx_del_area(struct Plus_head *, int)
Delete area from spatial index.
int dig_point_to_next_area(struct Map_info *, double, double, double *)
void dig_free_isle(struct P_isle *)
Free isle structure.
int dig_write_cidx_head(struct gvfile *, struct Plus_head *)
int dig__fread_port_P(plus_t *, size_t, struct gvfile *)
Read plus_t from the Portable Vector Format.
int dig_write_cidx(struct gvfile *, struct Plus_head *)
int dig_find_node(struct Plus_head *, double, double, double)
Find one node by coordinates.
int dig_read_cidx(struct gvfile *, struct Plus_head *, int)
Read spatial index file.
int dig_alloc_isles(struct Plus_head *, int)
Reallocate array of pointers to isles.
int dig_area_del_isle(struct Plus_head *, int, int)
Delete isle from area.
int dig_Wr_P_isle(struct Plus_head *, int i, struct gvfile *)
void dig_free_line(struct P_line *)
Free line structure.
int dig_isle_alloc_line(struct P_isle *, int)
Allocate space in P_isle for add new lines.
int dig_spidx_add_line(struct Plus_head *, int, const struct bound_box *)
Add new line to spatial index.
int dig_set_cur_port(struct Port_info *)
Set current Port_info structure.
long * dig__int_convert(int *, long *, int, struct dig_head *)
int dig_build_area_with_line(struct Plus_head *, plus_t, int, plus_t **)
Build topo for area from lines.
int dig__fwrite_port_L(const long *, size_t, struct gvfile *)
Write longs to the Portable Vector Format.
int dig_line_degenerate(const struct line_pnts *)
int dig_Rd_P_line(struct Plus_head *, int i, struct gvfile *)
void dig_free_plus_isles(struct Plus_head *)
Free Plus->Isle structure.
int dig_Rd_spidx(struct gvfile *, struct Plus_head *)
Read spatial index from sidx file Only needed when old vector is opened in update mode...
int dig__write_head(struct Map_info *)
int dig_del_area(struct Plus_head *, int)
Delete area from Plus_head structure.
int dig_cidx_add_cat_sorted(struct Plus_head *, int, int, int, int)
int dig_Rd_P_isle(struct Plus_head *, int i, struct gvfile *)
int dig_prune(struct line_pnts *, double)
int dig_is_line_degenerate(const struct line_pnts *, double)
int dig__check_dist(struct Map_info *, struct line_pnts *, double, double, double *)
int dig_alloc_nodes(struct Plus_head *, int)
Reallocate array of pointers to nodes.
int dig_fseek(struct gvfile *file, off_t offset, int whence)
Set struct gvfile position.
int dig_init_plus(struct Plus_head *)
Initialize Plus_head structure.
void * dig_frealloc(void *, int, int, int)
void dig_free_plus_areas(struct Plus_head *)
Free Plus->Area structure.
int dig_point_to_area(struct Map_info *, double, double)
int dig__fwrite_port_D(const double *, size_t, struct gvfile *)
Write doubles to the Portable Vector Format.
void dig_free_plus_lines(struct Plus_head *)
Free Plus->Line structure.
int dig_find_area_poly(struct line_pnts *, double *)
int dig_select_lines(struct Plus_head *, const struct bound_box *, struct boxlist *)
Select lines with boxes by box.
int dig__fread_port_D(double *, size_t, struct gvfile *)
Read doubles from the Portable Vector Format.