From c67d53a0bdff1de6160ab41619aea87389ed0132 Mon Sep 17 00:00:00 2001 From: Alex38Lyon <55714436+Alex38Lyon@users.noreply.github.com> Date: Mon, 31 Aug 2026 23:21:19 +0200 Subject: [PATCH] Refactor SFCGAL test script in build-gdal.yml Refactor SFCGAL test script to improve readability and structure. --- .github/workflows/build-gdal.yml | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-gdal.yml b/.github/workflows/build-gdal.yml index ea3482b..c4ea660 100644 --- a/.github/workflows/build-gdal.yml +++ b/.github/workflows/build-gdal.yml @@ -251,19 +251,13 @@ jobs: - name: Test SFCGAL via OGR shell: bash -el {0} run: | - - python - <<'PY' - + python -c ' from osgeo import ogr from osgeo import gdal - print("========================================") - print("TEST SFCGAL") - print("========================================") + print("GDAL :", gdal.VersionInfo("--version")) - print(gdal.VersionInfo("--version")) - - wkt = """ + geom = ogr.CreateGeometryFromWkt(""" POLYHEDRALSURFACE Z ( ( (0 0 0, @@ -273,27 +267,18 @@ jobs: 0 0 0) ) ) - """ - - geom = ogr.CreateGeometryFromWkt(wkt) - - if geom is None: - raise RuntimeError( - "Impossible de créer la géométrie 3D" - ) + """) print("Type :", geom.GetGeometryName()) print("Geometry type :", geom.GetGeometryType()) print("Has Z :", ogr.GT_HasZ(geom.GetGeometryType())) + print("IsValid() :", geom.IsValid()) - valid = geom.IsValid() + if geom is None: + raise RuntimeError("Impossible de créer la géométrie 3D") - print("IsValid() :", valid) - - print() print("SFCGAL accessible par OGR : OK") - - PY + ' # ============================================================ # 12. Création du package GDAL + SFCGAL