24#include "local_proto.h"
88 G_warning(
_(
"Unable to create header file for vector map <%s>"),
134 G_warning(
_(
"Unable to open header file of vector <%s>"), map_name);
141 if (!(ptr =
strchr(buff,
':'))) {
142 G_warning(
_(
"Corrupted row in head: %s"), buff);
150 if (
strncmp(buff,
"ORGANIZATION:",
sizeof(
char) * 13) == 0)
152 else if (
strncmp(buff,
"DIGIT DATE:",
sizeof(
char) * 11) == 0)
154 else if (
strncmp(buff,
"DIGIT NAME:",
sizeof(
char) * 11) == 0)
156 else if (
strncmp(buff,
"MAP NAME:",
sizeof(
char) * 9) == 0)
158 else if (
strncmp(buff,
"MAP DATE:",
sizeof(
char) * 9) == 0)
160 else if (
strncmp(buff,
"MAP SCALE:",
sizeof(
char) * 10) == 0)
162 else if (
strncmp(buff,
"OTHER INFO:",
sizeof(
char) * 11) == 0)
164 else if (
strncmp(buff,
"PROJ:",
sizeof(
char) * 5) == 0)
166 else if (
strncmp(buff,
"ZONE:",
sizeof(
char) * 5) == 0 ||
167 strncmp(buff,
"UTM ZONE:",
sizeof(
char) * 9) == 0)
169 else if (
strncmp(buff,
"WEST EDGE:",
sizeof(
char) * 10) == 0) {
171 else if (
strncmp(buff,
"EAST EDGE:",
sizeof(
char) * 10) == 0) {
173 else if (
strncmp(buff,
"SOUTH EDGE:",
sizeof(
char) * 11) == 0) {
175 else if (
strncmp(buff,
"NORTH EDGE:",
sizeof(
char) * 11) == 0) {
177 else if (
strncmp(buff,
"MAP THRESH:",
sizeof(
char) * 11) == 0)
180 G_warning(
_(
"Unknown keyword '%s' in vector head"), buff);
230 Map->fInfo.ogr.layer_name) {
234 snprintf(ptr, len,
"%s@%s",
Map->fInfo.ogr.layer_name,
264 return Map->head.with_z;
292 return Map->head.organization;
323 return (
Map->head.date);
351 return (
Map->head.user_name);
379 return Map->head.map_name;
407 return Map->head.source_date;
420 Map->head.orig_scale = scale;
434 return (
int)
Map->head.orig_scale;
462 return (
Map->head.comment);
475 Map->head.plani_zone = zone;
512 Map->head.proj = proj;
528 return (
Map->head.proj);
559 "Vect_get_proj_name(): "
560 "Vect_get_proj() returned an invalid result (%d)",
593 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 PROJECTION_LL
Projection code - Latitude-Longitude.
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
char * Vect__get_path(char *path, struct Map_info *Map)
Get map directory name (internal use only)