public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-phyghtmap] f44: Try to further fix package: GDAL swapped coordinates (rhbz#2469045)
@ 2026-06-04 4:35 Federico Pellegrin
0 siblings, 0 replies; only message in thread
From: Federico Pellegrin @ 2026-06-04 4:35 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-phyghtmap
Branch : f44
Commit : 9a9d2c7642faae7e89bd9f9d172538c5924b02a8
Author : Federico Pellegrin <fede@evolware.org>
Date : 2026-06-03T06:41:05+02:00
Stats : +58/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-phyghtmap/c/9a9d2c7642faae7e89bd9f9d172538c5924b02a8?branch=f44
Log:
Try to further fix package: GDAL swapped coordinates (rhbz#2469045)
---
diff --git a/0004-New_gdal_swapped_coords.patch b/0004-New_gdal_swapped_coords.patch
new file mode 100644
index 0000000..b5da0d9
--- /dev/null
+++ b/0004-New_gdal_swapped_coords.patch
@@ -0,0 +1,52 @@
+diff -ruN phyghtmap-2.23-c/phyghtmap/hgt.py phyghtmap-2.23-d/phyghtmap/hgt.py
+--- phyghtmap-2.23-c/phyghtmap/hgt.py 2026-05-14 05:47:13.077972255 +0200
++++ phyghtmap-2.23-d/phyghtmap/hgt.py 2026-05-25 06:49:34.200861430 +0200
+@@ -132,8 +132,12 @@
+ return minLon+corrx, minLat+corry, maxLon+corrx, maxLat+corry
+
+ def getTransform(o, reverse=False):
++ import osgeo
+ from osgeo import gdal, osr
+ n = osr.SpatialReference()
++ if int(osgeo.__version__[0]) >= 3:
++ # GDAL 3 changes axis order: https://github.com/OSGeo/gdal/issues/1546
++ n.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
+ n.ImportFromEPSG(4326)
+ oAuth = o.GetAttrValue("AUTHORITY", 1)
+ nAuth = n.GetAttrValue("AUTHORITY", 1)
+@@ -168,6 +172,7 @@
+ return minLon, minLat, maxLon, maxLat
+
+ def parseGeotiffBbox(filename, corrx, corry, doTransform):
++ import osgeo
+ from osgeo import gdal, osr
+ try:
+ g = gdal.Open(filename)
+@@ -177,6 +182,9 @@
+ filename, geoTransform))
+ raise hgtError
+ fileProj = osr.SpatialReference()
++ if int(osgeo.__version__[0]) >= 3:
++ # GDAL 3 changes axis order: https://github.com/OSGeo/gdal/issues/1546
++ fileProj.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
+ fileProj.ImportFromWkt(g.GetProjectionRef())
+ numOfCols = g.RasterXSize
+ numOfRows = g.RasterYSize
+@@ -536,6 +544,7 @@
+ def initAsGeotiff(self, corrx, corry, polygon, checkPoly, voidMax):
+ """init this hgtFile instance with data from a geotiff image.
+ """
++ import osgeo
+ from osgeo import gdal, osr
+ try:
+ g = gdal.Open(self.fullFilename)
+@@ -543,6 +552,9 @@
+ # we don't need to check for the geo transform, this was already done when
+ # calculating the area name from main.py
+ fileProj = osr.SpatialReference()
++ if int(osgeo.__version__[0]) >= 3:
++ # GDAL 3 changes axis order: https://github.com/OSGeo/gdal/issues/1546
++ fileProj.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
+ fileProj.ImportFromWkt(g.GetProjectionRef())
+ self.numOfCols = g.RasterXSize
+ self.numOfRows = g.RasterYSize
diff --git a/python-phyghtmap.spec b/python-phyghtmap.spec
index 1e8cc25..965e06b 100644
--- a/python-phyghtmap.spec
+++ b/python-phyghtmap.spec
@@ -2,7 +2,7 @@
Name: python-phyghtmap
Version: 2.23
-Release: 20%{?dist}
+Release: 21%{?dist}
Summary: Generate OSM contour lines from NASA SRTM data
License: GPL-2.0-or-later
URL: http://katze.tfiu.de/projects/phyghtmap/
@@ -13,6 +13,8 @@ Patch0: 0001-phyghtmap_numpy_arrays.patch
Patch1: 0002-Fix_matplotlib_after_3_6_0.patch
# Compatibility with changes of newer numpys: array comparison and inputs are arrays of arrays
Patch2: 0003-Array_all_array_equal.patch
+# GDAL swapped coordinates in new versions: https://gis.stackexchange.com/questions/423635/phyghtmap-2-23-reversing-flipping-coordinates
+Patch3: 0004-New_gdal_swapped_coords.patch
BuildArch: noarch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@@ -72,6 +74,9 @@ install -Dpm 644 docs/%{modname}.1 %{buildroot}%{_mandir}/man1/%{modname}.1
%{_mandir}/man1/%{modname}.1*
%changelog
+* Mon May 25 2026 Federico Pellegrin <fede@evolware.org> - 2.23-21
+- Try to further fix package: GDAL swapped coordinates (rhbz#2469045)
+
* Sat May 23 2026 Federico Pellegrin <fede@evolware.org> - 2.23-20
- Try to further fix package with new numpy changes (rhbz#2469045)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-04 4:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 4:35 [rpms/python-phyghtmap] f44: Try to further fix package: GDAL swapped coordinates (rhbz#2469045) Federico Pellegrin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox