aboutsummaryrefslogtreecommitdiff
path: root/src/pj_datum_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pj_datum_set.c')
-rw-r--r--src/pj_datum_set.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/pj_datum_set.c b/src/pj_datum_set.c
index 8bfe796d..5e351b21 100644
--- a/src/pj_datum_set.c
+++ b/src/pj_datum_set.c
@@ -40,7 +40,7 @@
int pj_datum_set(projCtx ctx, paralist *pl, PJ *projdef)
{
- const char *name, *towgs84, *nadgrids;
+ const char *name, *towgs84, *nadgrids, *catalog;
projdef->datum_type = PJD_UNKNOWN;
@@ -93,6 +93,21 @@ int pj_datum_set(projCtx ctx, paralist *pl, PJ *projdef)
}
/* -------------------------------------------------------------------- */
+/* Check for grid catalog parameter, and optional date. */
+/* -------------------------------------------------------------------- */
+ else if( (catalog = pj_param(ctx, pl,"scatalog").s) != NULL )
+ {
+ const char *date;
+
+ projdef->datum_type = PJD_GRIDSHIFT;
+ projdef->catalog_name = strdup(catalog);
+
+ date = pj_param(ctx, pl, "sdate").s;
+ if( date != NULL)
+ projdef->datum_date = pj_gc_parsedate( ctx, date);
+ }
+
+/* -------------------------------------------------------------------- */
/* Check for towgs84 parameter. */
/* -------------------------------------------------------------------- */
else if( (towgs84 = pj_param(ctx, pl,"stowgs84").s) != NULL )