19 #define PERMANENT "PERMANENT"
38 if (access(
path, 0) != 0) {
63 struct Key_Value *in_proj_keys, *in_epsg_keys;
67 if (access(
path, 0) != 0) {
69 G_warning(
_(
"<%s> file not found for location <%s>"),
81 sprintf(buf,
"EPSG:%s", epsgstr);
108 if (access(
path, 0) != 0) {
129 char *wktstring =
NULL;
136 if (access(
path, 0) != 0) {
144 fp = fopen(
path,
"r");
149 wktstring =
G_malloc(1024 *
sizeof(
char));
201 if (wktstring && *wktstring)
203 if (wktstring && *wktstring ==
'\0') {
239 char *sridstring =
NULL;
246 if (access(
path, 0) != 0) {
249 const char *epsg_num;
258 G_debug(1,
"Using <%s> file instead for location <%s>",
270 fp = fopen(
path,
"r");
275 sridstring =
G_malloc(1024 *
sizeof(
char));
316 sridstring[n] =
'\0';
327 if (sridstring && *sridstring)
329 if (sridstring && *sridstring ==
'\0') {
void G_free(void *)
Free allocated memory.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
const char * G_find_key_value(const char *, const struct Key_Value *)
Find given key (case sensitive)
void G_free_key_value(struct Key_Value *)
Free allocated Key_Value structure.
void G_set_key_value(const char *, const char *, struct Key_Value *)
Set value for given key.
int G_asprintf(char **, const char *,...) __attribute__((format(printf
struct Key_Value * G_read_key_value_file(const char *)
Read key/values pairs from file.
const char * G_location(void)
Get current location name.
char * G_chop(char *)
Chop leading and trailing white spaces.
int G_debug(int, const char *,...) __attribute__((format(printf
int G_projection(void)
Query cartographic projection.
struct Key_Value * G_get_projinfo(void)
Gets projection information for location.
struct Key_Value * G_get_projunits(void)
Gets units information for location.
char * G_get_projsrid(void)
Get srid (spatial reference id) for the current location.
char * G_get_projwkt(void)
Get WKT information for the current location.
struct Key_Value * G_get_projepsg(void)
Gets EPSG information for the current location.
#define PROJECTION_XY
Projection code - XY coordinate system (unreferenced data)