Skip to content

Commit

Permalink
fix(elevation_profile): adjust tolerance tests for geos 3.12 and add …
Browse files Browse the repository at this point in the history
…mask for vector_layer_map_units_tolerance
  • Loading branch information
benoitdm-oslandia committed Mar 13, 2024
1 parent 5b123f8 commit 83a7a50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/src/python/test_qgsvectorlayerprofilegenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2220,10 +2220,12 @@ def testPointGenerationFeature(self):
req.setTerrainProvider(terrain_provider)
req.setCrs(QgsCoordinateReferenceSystem('EPSG:3857'))

if (Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() <= 10) or (Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() >= 12):
if Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() <= 10:
self.doCheckPoint(req, 15, vl, [5, 11, 12, 13, 14, 15, 18, 45, 46])
elif Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() == 11:
self.doCheckPoint(req, 16, vl, [5, 11, 12, 13, 14, 15, 18, 45, 46])
elif Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() >= 12:
self.doCheckPoint(req, 15, vl, [5, 11, 12, 13, 14, 15, 18, 45])

self.doCheckPoint(req, 70, vl, [0, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 38, 45, 46, 48])

Expand Down Expand Up @@ -2297,12 +2299,15 @@ def testPolygonGenerationFeature(self):

self.doCheckLine(req, 1, vl, [168, 206, 210, 284, 306, 321], [1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)

if (Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() <= 10) or (Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() >= 12):
if Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() <= 10:
self.doCheckLine(req, 10, vl, [168, 172, 206, 210, 231, 267, 275, 282, 284, 306, 307, 319, 321], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)
self.doCheckLine(req, 11, vl, [168, 172, 206, 210, 231, 255, 267, 275, 282, 283, 284, 306, 307, 319, 321], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)
elif Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() == 11:
self.doCheckLine(req, 9, vl, [168, 172, 206, 210, 231, 267, 275, 282, 284, 306, 307, 319, 321], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)
self.doCheckLine(req, 10, vl, [168, 172, 206, 210, 231, 267, 275, 282, 283, 284, 306, 307, 319, 321], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)
elif Qgis.geosVersionMajor() == 3 and Qgis.geosVersionMinor() >= 12:
self.doCheckLine(req, 10, vl, [168, 172, 206, 210, 231, 267, 275, 282, 283, 284, 306, 307, 319, 321], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)
self.doCheckLine(req, 11, vl, [168, 172, 206, 210, 231, 237, 255, 267, 275, 282, 283, 284, 306, 307, 319, 321], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], Qgis.GeometryType.Line)


if __name__ == '__main__':
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 83a7a50

Please sign in to comment.