26#define FINDERFUNC set_proj_share
27#define PERMANENT "PERMANENT"
30static void alloc_options(
char *);
69 char proj_in[250], *datum, *params;
158 alloc_options(
buffa);
166 if (info->
zone < 0) {
173 alloc_options(
buffa);
177 alloc_options(
buffa);
186 alloc_options(
buffa);
190 alloc_options(
buffa);
197 alloc_options(
buffa);
203 alloc_options(
buffa);
209 alloc_options(
buffa);
215 else if (datum !=
NULL) {
219 alloc_options(
buffa);
228 alloc_options(
buffa);
241 alloc_options(
"type=crs");
246 _(
"Unable to initialise PROJ with the following parameter list:"));
247 for (i = 0; i < nopt; i++) {
273 for (i = 0; i < nopt; i++)
282 for (i = 1; i < nopt; i++) {
291static void alloc_options(
char *
buffa)
330 info->
proj[0] =
'\0';
338 if ((str ==
NULL) || (str[0] ==
'\0')) {
344 alloc_options(
buffa);
352 while (s =
strtok(s,
" \t\n"), s) {
353 if (
strncmp(s,
"+unfact=", 8) == 0) {
364 _(
"Option input overflowed option table"));
367 if (
strncmp(
"zone=", s, 5) == 0) {
372 if (
strncmp(s,
"init=", 5) == 0) {
376 if (
strncmp(
"proj=", s, 5) == 0) {
386 alloc_options(
buffa);
396 alloc_options(
"type=crs");
399 G_warning(
_(
"Unable to initialize pj cause: %s"),
414 for (i = 0; i < nopt; i++)
423 for (i = 1; i < nopt; i++) {
440 static char *buf =
NULL;
482 fprintf(
stderr,
"%s: %s\n",
_(
"Input Projection Parameters"), str);
493 fprintf(
stderr,
"%s: %s\n",
_(
"Output Projection Parameters"), str);
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
const char * G_find_key_value(const char *, const struct Key_Value *)
Find given key (case sensitive)
char * G_store(const char *)
Copy string to allocated memory.
int GPJ_get_default_datum_params_by_name(const char *, char **)
"Last resort" function to retrieve a "default" set of datum parameters for a datum (N....
int GPJ__get_datum_params(const struct Key_Value *, char **, char **)
Extract the datum transformation-related parameters from a set of general PROJ_INFO parameters.
int GPJ__get_ellipsoid_params(const struct Key_Value *, double *, double *, double *)
Get the ellipsoid parameters from proj keys structure.
int pj_get_kv(struct pj_info *info, const struct Key_Value *in_proj_keys, const struct Key_Value *in_units_keys)
Create a pj_info struct Co-ordinate System definition from a set of PROJ_INFO / PROJ_UNITS-style key-...
int pj_print_proj_params(const struct pj_info *iproj, const struct pj_info *oproj)
Print projection parameters as used by PROJ.4 for input and output co-ordinate systems.
const char * set_proj_share(const char *name)
int pj_get_string(struct pj_info *info, char *str)
Create a pj_info struct Co-ordinate System definition from a string with a sequence of key=value pair...
SYMBOL * err(FILE *fp, SYMBOL *s, char *msg)