23#define FINDERFUNC set_proj_share
24#define PERMANENT "PERMANENT"
27static void alloc_options(
char *);
66 char proj_in[250], *datum, *params;
155 alloc_options(
buffa);
163 if (info->
zone < 0) {
170 alloc_options(
buffa);
174 alloc_options(
buffa);
183 alloc_options(
buffa);
187 alloc_options(
buffa);
194 alloc_options(
buffa);
200 alloc_options(
buffa);
206 alloc_options(
buffa);
212 else if (datum !=
NULL) {
216 alloc_options(
buffa);
225 alloc_options(
buffa);
238 alloc_options(
"type=crs");
243 _(
"Unable to initialise PROJ with the following parameter list:"));
244 for (i = 0; i < nopt; i++) {
270 for (i = 0; i < nopt; i++)
279 for (i = 1; i < nopt; i++) {
288static void alloc_options(
char *
buffa)
327 info->
proj[0] =
'\0';
335 if ((str ==
NULL) || (str[0] ==
'\0')) {
341 alloc_options(
buffa);
349 while (s =
strtok(s,
" \t\n"), s) {
350 if (
strncmp(s,
"+unfact=", 8) == 0) {
361 _(
"Option input overflowed option table"));
364 if (
strncmp(
"zone=", s, 5) == 0) {
369 if (
strncmp(s,
"init=", 5) == 0) {
373 if (
strncmp(
"proj=", s, 5) == 0) {
383 alloc_options(
buffa);
393 alloc_options(
"type=crs");
396 G_warning(
_(
"Unable to initialize pj cause: %s"),
411 for (i = 0; i < nopt; i++)
420 for (i = 1; i < nopt; i++) {
437 static char *buf =
NULL;
479 fprintf(
stderr,
"%s: %s\n",
_(
"Input Projection Parameters"), str);
490 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)