22#include "local_proto.h"
86 G_warning(
_(
"Unable to create header file for vector map <%s>"),
132 G_warning(
_(
"Unable to open header file of vector <%s>"), map_name);
139 if (!(ptr =
strchr(buff,
':'))) {
140 G_warning(
_(
"Corrupted row in head: %s"), buff);
148 if (
strncmp(buff,
"ORGANIZATION:",
sizeof(
char) * 13) == 0)
150 else if (
strncmp(buff,
"DIGIT DATE:",
sizeof(
char) * 11) == 0)
152 else if (
strncmp(buff,
"DIGIT NAME:",
sizeof(
char) * 11) == 0)
154 else if (
strncmp(buff,
"MAP NAME:",
sizeof(
char) * 9) == 0)
156 else if (
strncmp(buff,
"MAP DATE:",
sizeof(
char) * 9) == 0)
158 else if (
strncmp(buff,
"MAP SCALE:",
sizeof(
char) * 10) == 0)
160 else if (
strncmp(buff,
"OTHER INFO:",
sizeof(
char) * 11) == 0)
162 else if (
strncmp(buff,
"PROJ:",
sizeof(
char) * 5) == 0)
164 else if (
strncmp(buff,
"ZONE:",
sizeof(
char) * 5) == 0 ||
165 strncmp(buff,
"UTM ZONE:",
sizeof(
char) * 9) == 0)
167 else if (
strncmp(buff,
"WEST EDGE:",
sizeof(
char) * 10) == 0) {
169 else if (
strncmp(buff,
"EAST EDGE:",
sizeof(
char) * 10) == 0) {
171 else if (
strncmp(buff,
"SOUTH EDGE:",
sizeof(
char) * 11) == 0) {
173 else if (
strncmp(buff,
"NORTH EDGE:",
sizeof(
char) * 11) == 0) {
175 else if (
strncmp(buff,
"MAP THRESH:",
sizeof(
char) * 11) == 0)
178 G_warning(
_(
"Unknown keyword '%s' in vector head"), buff);
228 Map->fInfo.ogr.layer_name) {
232 snprintf(ptr, len,
"%s@%s",
Map->fInfo.ogr.layer_name,
262 return Map->head.with_z;
290 return Map->head.organization;
321 return (
Map->head.date);
349 return (
Map->head.user_name);
377 return Map->head.map_name;
405 return Map->head.source_date;
418 Map->head.orig_scale = scale;
432 return (
int)
Map->head.orig_scale;
460 return (
Map->head.comment);
473 Map->head.plani_zone = zone;
510 Map->head.proj = proj;
526 return (
Map->head.proj);
557 "Vect_get_proj_name(): "
558 "Vect_get_proj() returned an invalid result (%d)",
591 return Map->head.digit_thresh;
AMI_err name(char **stream_name)
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
void G_free(void *)
Free allocated memory.
void G_warning(const char *,...) __attribute__((format(printf
const char * G_projection_name(int)
Get projection name.
FILE * G_fopen_new(const char *, const char *)
Open a new database file.
FILE * G_fopen_old(const char *, const char *, const char *)
Open a database file for reading.
int G_zone(void)
Query cartographic zone.
char * G_store(const char *)
Copy string to allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
const char * G_database_projection_name(void)
Query cartographic projection for the current location.
void Vect__init_head(struct Map_info *)
Initialize Map_info head structure (dig_head)
#define GV_FORMAT_OGR_DIRECT
OGR format (direct access)
#define GV_HEAD_ELEMENT
Native format, header information.
#define PROJECTION_OTHER
Projection code - other projection (other then noted above)
#define PROJECTION_XY
Projection code - XY coordinate system (unreferenced data)
#define PROJECTION_UTM
Projection code - UTM.
#define G_UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
#define PROJECTION_LL
Projection code - Latitude-Longitude.
char * Vect__get_path(char *path, struct Map_info *Map)
Get map directory name (internal use only)