Forráskód Böngészése

libproj: debug statements added for datum

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68305 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 éve
szülő
commit
b63aca881c
2 módosított fájl, 6 hozzáadás és 0 törlés
  1. 4 0
      lib/proj/convert.c
  2. 2 0
      lib/proj/datum.c

+ 4 - 0
lib/proj/convert.c

@@ -171,6 +171,7 @@ OGRSpatialReferenceH GPJ_grass_to_osr(const struct Key_Value * proj_info,
 	    ellps = G_store(dstruct.ellps);
 	GPJ_free_datum(&dstruct);
     }
+    G_debug(3, "GPJ_grass_to_osr: datum: <%s>", datum);
     G_free(datum);
     if (GPJ_get_ellipsoid_by_name(ellps, &estruct) > 0) {
 	ellpslong = G_store(estruct.longname);
@@ -434,6 +435,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 
 	    pszDatumName = G_store(pszDatumNameConst);
 	    DatumNameMassage(&pszDatumName);
+	    G_debug(3, "GPJ_osr_to_grass: pszDatumNameConst: <%s>", pszDatumName);
 
 	    list = listhead = read_datum_table();
 
@@ -805,6 +807,7 @@ static void DatumNameMassage(char **ppszDatum)
     int i, j;
     char *pszDatum = *ppszDatum;
 
+    G_debug(3, "DatumNameMassage: Raw string found <%s>", (char *)pszDatum);
     /* -------------------------------------------------------------------- */
     /*      Translate non-alphanumeric values to underscores.               */
     /* -------------------------------------------------------------------- */
@@ -834,6 +837,7 @@ static void DatumNameMassage(char **ppszDatum)
     /*      Search for datum equivalences.  Specific massaged names get     */
     /*      mapped to OpenGIS specified names.                              */
     /* -------------------------------------------------------------------- */
+    G_debug(3, "DatumNameMassage: Search for datum equivalences of <%s>", (char *)pszDatum);
     for (i = 0; papszDatumEquiv[i] != NULL; i += 2) {
 	if (EQUAL(*ppszDatum, papszDatumEquiv[i])) {
 	    G_free(*ppszDatum);

+ 2 - 0
lib/proj/datum.c

@@ -177,6 +177,7 @@ int GPJ__get_datum_params(const struct Key_Value *projinfo,
 
     if (NULL != G_find_key_value("datum", projinfo)) {
 	*datumname = G_store(G_find_key_value("datum", projinfo));
+	G_debug(3, "GPJ__get_datum_params: datumname: <%s>", (char *)datumname);
 	returnval = 1;
     }
     else
@@ -184,6 +185,7 @@ int GPJ__get_datum_params(const struct Key_Value *projinfo,
 
     if (G_find_key_value("datumparams", projinfo) != NULL) {
 	*params = G_store(G_find_key_value("datumparams", projinfo));
+	G_debug(3, "GPJ__get_datum_params: datumparams: <%s>", (char *)params);
 	returnval = 2;
     }
     else if (G_find_key_value("nadgrids", projinfo) != NULL) {