PostGIS
2.4.9dev-r@@SVN_REVISION@@
|
int colmap_read | ( | const char * | fname, |
colmap * | map, | ||
char * | ebuf, | ||
size_t | ebuflen | ||
) |
Read the content of filename into a symbol map.
The content of the file is lines of two names separated by white space and no trailing or leading space:
COLUMNNAME DBFFIELD1 AVERYLONGCOLUMNNAME DBFFIELD2
etc.
It is the reponsibility of the caller to reclaim the allocated space as follows:
free(map->colmap_pgfieldnames[]) to free the column names free(map->colmap_dbffieldnames[]) to free the dbf field names
TODO: provide a clean_colmap()
filename | name of the mapping file |
map | container of colmap where the malloc'd symbol map will be stored. |
errbuf | buffer to write error messages to |
errbuflen | length of buffer to write error messages to |
Definition at line 213 of file shpcommon.c.
References _, colmap_t::dbffieldnames, malloc(), colmap_t::pgfieldnames, and colmap_t::size.
Referenced by ShpDumperOpenTable(), and ShpLoaderOpenShape().