16#ifndef _SHAPEREADER_SHX_H
17#define _SHAPEREADER_SHX_H
64 __attribute__((format(printf, 2, 3)));
shp_header_t shx_header_t
Header.
Definition: shx.h:26
void shx_set_error(shx_file_t *fh, const char *format,...)
Set an error message.
Definition: shx.c:26
shx_file_t * shx_init_file(shx_file_t *fh, FILE *fp, void *user_data)
Initialize a file handle.
Definition: shx.c:20
shp_file_t shx_file_t
File handle.
Definition: shx.h:39
int(* shx_header_callback_t)(shx_file_t *fh, const shx_header_t *header)
Handle the file header.
Definition: shx.h:80
int shx_read(shx_file_t *fh, shx_header_callback_t handle_header, shx_record_callback_t handle_record)
Read an index file.
Definition: shx.c:138
int(* shx_record_callback_t)(shx_file_t *fh, const shx_header_t *header, const shx_record_t *record)
Handle a record.
Definition: shx.h:95
int shx_read_header(shx_file_t *fh, shx_header_t *header)
Read the file header.
Definition: shx.c:39
int shx_read_record(shx_file_t *fh, shx_record_t *record)
Read an index record.
Definition: shx.c:95
int shx_seek_record(shx_file_t *fh, size_t record_number, shx_record_t *record)
Read an index record by record number.
Definition: shx.c:108
File handle.
Definition: shp.h:114
Index record.
Definition: shx.h:31
size_t record_size
Content length in bytes.
Definition: shx.h:33
size_t file_offset
Offset in the ".shp" file in bytes.
Definition: shx.h:32