diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4f12125eaf0cce18a1f2c670965d04a0cb66322..455dcef5b729a6f8667882195c7234032d15ebd4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME variables: - OTBTF_VERSION: 3.3.2 + OTBTF_VERSION: 3.3.3 OTB_BUILD: /src/otb/build/OTB/build # Local OTB build directory OTBTF_SRC: /src/otbtf # Local OTBTF source directory OTB_TEST_DIR: $OTB_BUILD/Testing/Temporary # OTB testing directory @@ -167,6 +167,11 @@ otbtf_api: after_script: - cp $API_TEST_TMP/*.* $ARTIFACT_TEST_DIR/ +geos_enabled: + extends: .applications_test_base + script: + - python -m pytest --junitxml=$ARTIFACT_TEST_DIR/report_geos_enabled.xml $OTBTF_SRC/test/geos_test.py + deploy_cpu-dev-testing: stage: Update dev image extends: .docker_build_base diff --git a/test/geos_test.py b/test/geos_test.py new file mode 100644 index 0000000000000000000000000000000000000000..7b8b39f9ec59822aff3c43c4ae62ed71f730e9a0 --- /dev/null +++ b/test/geos_test.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import pytest +import unittest +from osgeo import ogr + +class APITest(unittest.TestCase): + + def test_geosu_support(self): + wkt1 = "POLYGON ((1208064.271243039 624154.6783778917, 1208064.271243039 601260.9785661874, 1231345.9998651114 601260.9785661874, 1231345.9998651114 624154.6783778917, 1208064.271243039 624154.6783778917))" + wkt2 = "POLYGON ((1199915.6662253144 633079.3410163528, 1199915.6662253144 614453.958118695, 1219317.1067437078 614453.958118695, 1219317.1067437078 633079.3410163528, 1199915.6662253144 633079.3410163528)))" + poly1 = ogr.CreateGeometryFromWkt(wkt1) + poly2 = ogr.CreateGeometryFromWkt(wkt2) + intersection = poly1.Intersection(poly2) + +if __name__ == '__main__': + unittest.main()