[Git][debian-gis-team/libgeotiff][master] 2 commits: Add upstream patches to fix test failures.
Bas Couwenberg
gitlab at salsa.debian.org
Tue Apr 2 06:06:15 BST 2019
Bas Couwenberg pushed to branch master at Debian GIS Project / libgeotiff
Commits:
2f96770f by Bas Couwenberg at 2019-04-02T04:58:04Z
Add upstream patches to fix test failures.
- - - - -
b388db90 by Bas Couwenberg at 2019-04-02T04:58:37Z
Set distribution to experimental.
- - - - -
4 changed files:
- debian/changelog
- + debian/patches/0001-GTIFDecToDMS-avoid-invalid-double-int-cast-on-invali.patch
- + debian/patches/0001-GTIFDecToDMS-fix-rounding-issue-refs-16.patch
- + debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+libgeotiff (1.5.1-1~exp2) experimental; urgency=medium
+
+ * Add upstream patches to fix test failures.
+
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 02 Apr 2019 06:58:24 +0200
+
libgeotiff (1.5.1-1~exp1) experimental; urgency=medium
* New upstream release.
=====================================
debian/patches/0001-GTIFDecToDMS-avoid-invalid-double-int-cast-on-invali.patch
=====================================
@@ -0,0 +1,57 @@
+Description: GTIFDecToDMS(): avoid invalid double->int cast on invalid coordinates
+Author: Even Rouault <even.rouault at spatialys.com>
+Origin: https://github.com/OSGeo/libgeotiff/commit/4b41ca6ce332f0c21504c2da3da850275d9da5ae
+Bug: https://github.com/OSGeo/libgeotiff/issues/16
+
+--- a/bin/listgeo.c
++++ b/bin/listgeo.c
+@@ -198,8 +198,16 @@ static int GTIFReportACorner( GTIF *gtif
+ }
+ else
+ {
+- fprintf( fp_out, " (%s,", GTIFDecToDMS( x, "Long", 2 ) );
+- fprintf( fp_out, "%s)", GTIFDecToDMS( y, "Lat", 2 ) );
++ const char* pszLong = GTIFDecToDMS( x, "Long", 2 );
++ if( pszLong[0] == 0 )
++ {
++ fprintf( fp_out, " (invalid)" );
++ }
++ else
++ {
++ fprintf( fp_out, " (%s,", pszLong );
++ fprintf( fp_out, "%s)", GTIFDecToDMS( y, "Lat", 2 ) );
++ }
+ }
+ }
+
+--- a/geo_normalize.c
++++ b/geo_normalize.c
+@@ -2721,6 +2721,9 @@ const char *GTIFDecToDMS( double dfAngle
+ double dfRound;
+ int i;
+
++ if( !(dfAngle >= -360 && dfAngle <= 360) )
++ return "";
++
+ dfRound = 0.5/60;
+ for( i = 0; i < nPrecision; i++ )
+ dfRound = dfRound * 0.1;
+--- a/test/testlistgeo_out.dist
++++ b/test/testlistgeo_out.dist
+@@ -221,11 +221,11 @@ Prime Meridian: 8901/Greenwich (0.000000
+ Projection Linear Units: 9036/kilometre (1000.000000m)
+
+ Corner Coordinates:
+-Upper Left ( 440720.000, 3751320.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
+-Lower Left ( 440720.000, 3751260.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
+-Upper Right ( 440780.000, 3751320.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
+-Lower Right ( 440780.000, 3751260.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
+-Center ( 440750.000, 3751290.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
++Upper Left ( 440720.000, 3751320.000) (invalid)
++Lower Left ( 440720.000, 3751260.000) (invalid)
++Upper Right ( 440780.000, 3751320.000) (invalid)
++Lower Right ( 440780.000, 3751260.000) (invalid)
++Center ( 440750.000, 3751290.000) (invalid)
+
+ Testing listgeo ../test/data/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif
+ Geotiff_Information:
=====================================
debian/patches/0001-GTIFDecToDMS-fix-rounding-issue-refs-16.patch
=====================================
@@ -0,0 +1,39 @@
+Description: GTIFDecToDMS(): fix rounding issue
+Author: Even Rouault <even.rouault at spatialys.com>
+Origin https://github.com/OSGeo/libgeotiff/commit/7cb9b68ea72fb2a6023bb98796fd3ba6dc7b64a1
+Bug: https://github.com/OSGeo/libgeotiff/issues/16
+
+--- a/geo_normalize.c
++++ b/geo_normalize.c
+@@ -2727,6 +2727,11 @@ const char *GTIFDecToDMS( double dfAngle
+
+ nDegrees = (int) ABS(dfAngle);
+ nMinutes = (int) ((ABS(dfAngle) - nDegrees) * 60 + dfRound);
++ if( nMinutes == 60 )
++ {
++ nDegrees ++;
++ nMinutes = 0;
++ }
+ dfSeconds = ABS((ABS(dfAngle) * 3600 - nDegrees*3600 - nMinutes*60));
+
+ if( EQUAL(pszAxis,"Long") && dfAngle < 0.0 )
+--- a/test/testlistgeo_out.dist
++++ b/test/testlistgeo_out.dist
+@@ -1429,7 +1429,7 @@ PCS = 2046 (Hartebeesthoek94 / Lo15)
+ Projection = 17515 (South African Survey Grid zone 15)
+ Projection Method: CT_TransvMercator_SouthOrientated
+ ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
+- ProjNatOriginLongGeoKey: 15.000000 ( 14d60' 0.00"E)
++ ProjNatOriginLongGeoKey: 15.000000 ( 15d 0' 0.00"E)
+ ProjScaleAtNatOriginGeoKey: 1.000000
+ ProjFalseEastingGeoKey: 0.000000 m
+ ProjFalseNorthingGeoKey: 0.000000 m
+@@ -1791,7 +1791,7 @@ Geotiff_Information:
+ PCS = 3410 (NSIDC EASE-Grid Global)
+ Projection = 19869 (US NSIDC Equal Area global projection)
+ Projection Method: CT_CylindricalEqualArea
+- ProjStdParallel1GeoKey: 30.000000 ( 29d60' 0.00"N)
++ ProjStdParallel1GeoKey: 30.000000 ( 30d 0' 0.00"N)
+ ProjNatOriginLongGeoKey: 0.000000 ( 0d 0' 0.00"E)
+ ProjFalseEastingGeoKey: 0.000000 m
+ ProjFalseNorthingGeoKey: 0.000000 m
=====================================
debian/patches/series
=====================================
@@ -0,0 +1,2 @@
+0001-GTIFDecToDMS-fix-rounding-issue-refs-16.patch
+0001-GTIFDecToDMS-avoid-invalid-double-int-cast-on-invali.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/libgeotiff/compare/2ba42915ae72e2750419ac186d9a5930402b6703...b388db90f495fc49d541d7cd4550ee751375ee09
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/libgeotiff/compare/2ba42915ae72e2750419ac186d9a5930402b6703...b388db90f495fc49d541d7cd4550ee751375ee09
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/20190402/e921d8ac/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list