[Git][debian-gis-team/grass][upstream] New upstream version 7.8.1

Bas Couwenberg gitlab at salsa.debian.org
Sat Nov 9 12:31:02 GMT 2019



Bas Couwenberg pushed to branch upstream at Debian GIS Project / grass


Commits:
87f91edf by Bas Couwenberg at 2019-11-09T11:14:29Z
New upstream version 7.8.1
- - - - -


4 changed files:

- doc/howto_release.md
- include/VERSION
- lib/proj/convert.c
- vector/v.out.ogr/main.c


Changes:

=====================================
doc/howto_release.md
=====================================
@@ -77,6 +77,7 @@ find . -name '*.rej'  | xargs rm
 find . -name '*.o'    | xargs rm
 find . -name '*.pyc'  | xargs rm
 find . -name 'OBJ.*'  | xargs rm -r
+find . -name '__pycache__' | xargs rm -r
 rm -f gui/wxpython/menustrings.py gui/wxpython/build_ext.pyc gui/wxpython/xml/menudata.xml gui/wxpython/xml/module_tree_menudata.xml
 chmod -R a+r *
 ```
@@ -149,6 +150,14 @@ To be done in GH interface:
 
 https://github.com/OSGeo/grass/releases/new
 
+Tag version | target (examples):
+  7.8.1RC1  | releasebranch_7_8
+
+Add release desciption (re-use existing texts as possible)
+
+If RC, then check
+[x] This is a pre-release
+
 ### Packaging of source code tarball
 
 TODO: add checkout of code via release tag (?)
@@ -193,6 +202,8 @@ Example:
 2019
 ```
 
+Commit as "back to dev"
+
 Reset local copy to GH:
 ```bash
 # update from GH


=====================================
include/VERSION
=====================================
@@ -1,4 +1,4 @@
 7
 8
-1RC2
+1
 2019


=====================================
lib/proj/convert.c
=====================================
@@ -423,7 +423,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 		     struct Key_Value **projunits, OGRSpatialReferenceH hSRS1,
 		     int datumtrans)
 {
-    struct Key_Value *temp_projinfo;
+    struct Key_Value *temp_projinfo, *temp_projinfo_ext;
     char *pszProj4 = NULL, *pszRemaining;
     char *pszProj = NULL;
     const char *pszProjCS = NULL;
@@ -432,6 +432,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
     struct gpj_datum dstruct;
     const char *ograttr;
     OGRSpatialReferenceH hSRS;
+    int use_proj_extension;
 
     *projinfo = NULL;
     *projunits = NULL;
@@ -449,6 +450,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
     OSRMorphFromESRI(hSRS);
 
     *projinfo = G_create_key_value();
+    use_proj_extension = 0;
 
     /* use proj4 definition from EXTENSION attribute if existing */
     ograttr = OSRGetAttrValue(hSRS, "EXTENSION", 0);
@@ -501,6 +503,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 
 		/* the original hSRS1 is left as is, ok? */
 		hSRS = hSRS2;
+		use_proj_extension = 1;
 	    }
 	    G_free(proj4ext);
 	}
@@ -542,6 +545,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
     /*      extra work to "GRASSify" the result.                            */
     /* -------------------------------------------------------------------- */
     temp_projinfo = G_create_key_value();
+    temp_projinfo_ext = G_create_key_value();
 
     /* Create "local" copy of proj4 string so we can modify and free it
      * using GRASS functions */
@@ -581,19 +585,16 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 	    pszProj = pszValue;
 	}
 
-	/* discard @null nadgrids */
-	if (G_strcasecmp(pszToken, "nadgrids") == 0 &&
-	    G_strcasecmp(pszValue, "@null") == 0)
-	    continue;
-
 	/* Ellipsoid and datum handled separately below */
 	if (G_strcasecmp(pszToken, "ellps") == 0
 	    || G_strcasecmp(pszToken, "a") == 0
 	    || G_strcasecmp(pszToken, "b") == 0
 	    || G_strcasecmp(pszToken, "es") == 0
 	    || G_strcasecmp(pszToken, "rf") == 0
-	    || G_strcasecmp(pszToken, "datum") == 0)
+	    || G_strcasecmp(pszToken, "datum") == 0) {
+	    G_set_key_value(pszToken, pszValue, temp_projinfo_ext);
 	    continue;
+	}
 
 	/* We will handle units separately */
 	if (G_strcasecmp(pszToken, "to_meter") == 0)
@@ -641,12 +642,17 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
     /* -------------------------------------------------------------------- */
 
     {
-	const char *pszDatumNameConst = OSRGetAttrValue(hSRS, "DATUM", 0);
+	const char *pszDatumNameConst;
 	struct datum_list *list, *listhead;
 	char *dum1, *dum2, *pszDatumName;
 	int paramspresent =
 	    GPJ__get_datum_params(temp_projinfo, &dum1, &dum2);
 
+	if (!use_proj_extension)
+	    pszDatumNameConst = OSRGetAttrValue(hSRS, "DATUM", 0);
+	else
+	    pszDatumNameConst = G_find_key_value("datum", temp_projinfo_ext);
+
 	if (pszDatumNameConst) {
 	    /* Need to make a new copy of the string so we don't mess
 	     * around with the memory inside the OGRSpatialReferenceH? */
@@ -740,7 +746,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 	GPJ_free_datum(&dstruct);
 	G_free(datum);
     }
-    else {
+    else if (!use_proj_extension) {
 	/* If we can't determine the ellipsoid from the datum, derive it
 	 * directly from "SPHEROID" parameters in WKT */
 	const char *pszSemiMajor = OSRGetAttrValue(hSRS, "SPHEROID", 1);
@@ -799,6 +805,18 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 	}
 
     }
+    else if (use_proj_extension) {
+	double a, es, rf;
+
+	if (GPJ__get_ellipsoid_params(temp_projinfo_ext, &a, &es, &rf)) {
+	    char parmstr[100];
+
+	    sprintf(parmstr, "%.16g", a);
+	    G_set_key_value("a", parmstr, *projinfo);
+	    sprintf(parmstr, "%.16g", es);
+	    G_set_key_value("es", parmstr, *projinfo);
+	}
+    }
 
     /* -------------------------------------------------------------------- */
     /*      Finally append the detailed projection parameters to the end    */
@@ -813,6 +831,7 @@ int GPJ_osr_to_grass(struct Cell_head *cellhd, struct Key_Value **projinfo,
 
 	G_free_key_value(temp_projinfo);
     }
+    G_free_key_value(temp_projinfo_ext);
 
     G_free(pszProj4);
 


=====================================
vector/v.out.ogr/main.c
=====================================
@@ -723,7 +723,11 @@ int main(int argc, char *argv[])
 		    ogr_ftype = OFTString;
 		    break;
 		case DB_C_TYPE_DATETIME:
+#if GDAL_VERSION_NUM >= 1320
+		    ogr_ftype = OFTDateTime;
+#else
 		    ogr_ftype = OFTString;
+#endif
 		    break;
 		}
 		G_debug(2, "ogr_ftype = %d", ogr_ftype);



View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/commit/87f91edfbad944550cdcd1f08b0f2ba51059ccc4

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/grass/commit/87f91edfbad944550cdcd1f08b0f2ba51059ccc4
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20191109/c091da59/attachment-0001.html>


More information about the Pkg-grass-devel mailing list