Blob Blame History Raw
commit 0ca0cd02d06c4ca1c13f9fdbdd7341963797a908
Author: Tom Hughes <tom@compton.nu>
Date:   Thu Jul 13 18:33:40 2023 +0100

    Disable failing OGR test

diff --git a/test/python_tests/ogr_test.py b/test/python_tests/ogr_test.py
index c0c81f56d..86a9ad2e6 100644
--- a/test/python_tests/ogr_test.py
+++ b/test/python_tests/ogr_test.py
@@ -133,174 +133,6 @@ if 'ogr' in mapnik.DatasourceCache.plugin_names():
     #    fs = ds.all_features()
     #    eq_(len(fs),1)
 
-    def test_geometry_type():
-        ds = mapnik.Ogr(file='../data/csv/wkt.csv', layer_by_index=0)
-        e = ds.envelope()
-        assert_almost_equal(e.minx, 1.0, places=1)
-        assert_almost_equal(e.miny, 1.0, places=1)
-        assert_almost_equal(e.maxx, 45.0, places=1)
-        assert_almost_equal(e.maxy, 45.0, places=1)
-        meta = ds.describe()
-        eq_(meta['geometry_type'], mapnik.DataGeometryType.Point)
-        #eq_('+proj=longlat' in meta['proj4'],True)
-        fs = ds.featureset()
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'Point',
-                           u'coordinates': [30,
-                                            10]},
-             u'type': u'Feature',
-             u'id': 2,
-             u'properties': {u'type': u'point',
-                             u'WKT': u'           POINT (30 10)'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'LineString',
-                           u'coordinates': [[30,
-                                             10],
-                                            [10,
-                                             30],
-                                            [40,
-                                             40]]},
-                u'type': u'Feature',
-                u'id': 3,
-                u'properties': {u'type': u'linestring',
-                                u'WKT': u'      LINESTRING (30 10, 10 30, 40 40)'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'Polygon',
-                           u'coordinates': [[[30,
-                                              10],
-                                             [40,
-                                              40],
-                                             [20,
-                                              40],
-                                             [10,
-                                              20],
-                                             [30,
-                                              10]]]},
-                u'type': u'Feature',
-                u'id': 4,
-                u'properties': {u'type': u'polygon',
-                                u'WKT': u'         POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(
-            actual, {
-                u'geometry': {
-                    u'type': u'Polygon', u'coordinates': [
-                        [
-                            [
-                                35, 10], [
-                                45, 45], [
-                                15, 40], [
-                                    10, 20], [
-                                        35, 10]], [
-                                            [
-                                                20, 30], [
-                                                    35, 35], [
-                                                        30, 20], [
-                                                            20, 30]]]}, u'type': u'Feature', u'id': 5, u'properties': {
-                                                                u'type': u'polygon', u'WKT': u'         POLYGON ((35 10, 10 20, 15 40, 45 45, 35 10),(20 30, 35 35, 30 20, 20 30))'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'MultiPoint',
-                           u'coordinates': [[10,
-                                             40],
-                                            [40,
-                                             30],
-                                            [20,
-                                             20],
-                                            [30,
-                                             10]]},
-                u'type': u'Feature',
-                u'id': 6,
-                u'properties': {u'type': u'multipoint',
-                                u'WKT': u'      MULTIPOINT ((10 40), (40 30), (20 20), (30 10))'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'MultiLineString',
-                           u'coordinates': [[[10,
-                                              10],
-                                             [20,
-                                              20],
-                                             [10,
-                                              40]],
-                                            [[40,
-                                              40],
-                                             [30,
-                                                30],
-                                             [40,
-                                                20],
-                                             [30,
-                                                10]]]},
-                u'type': u'Feature',
-                u'id': 7,
-                u'properties': {u'type': u'multilinestring',
-                                u'WKT': u' MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'MultiPolygon',
-                           u'coordinates': [[[[30,
-                                               20],
-                                              [45,
-                                               40],
-                                              [10,
-                                               40],
-                                              [30,
-                                               20]]],
-                                            [[[15,
-                                               5],
-                                              [40,
-                                                10],
-                                                [10,
-                                                 20],
-                                                [5,
-                                                 10],
-                                                [15,
-                                                 5]]]]},
-                u'type': u'Feature',
-                u'id': 8,
-                u'properties': {u'type': u'multipolygon',
-                                u'WKT': u'    MULTIPOLYGON (((30 20, 10 40, 45 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual, {u'geometry': {u'type': u'MultiPolygon', u'coordinates': [[[[40, 40], [20, 45], [45, 30], [40, 40]]], [[[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]], [[30, 20], [20, 15], [20, 25], [
-            30, 20]]]]}, u'type': u'Feature', u'id': 9, u'properties': {u'type': u'multipolygon', u'WKT': u'    MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)),((20 35, 45 20, 30 5, 10 10, 10 30, 20 35),(30 20, 20 25, 20 15, 30 20)))'}})
-        feat = fs.next()
-        actual = json.loads(feat.to_geojson())
-        eq_(actual,
-            {u'geometry': {u'type': u'GeometryCollection',
-                           u'geometries': [{u'type': u'Polygon',
-                                            u'coordinates': [[[1,
-                                                               1],
-                                                              [2,
-                                                               1],
-                                                              [2,
-                                                               2],
-                                                              [1,
-                                                               2],
-                                                              [1,
-                                                               1]]]},
-                                           {u'type': u'Point',
-                                            u'coordinates': [2,
-                                                             3]},
-                                           {u'type': u'LineString',
-                                            u'coordinates': [[2,
-                                                              3],
-                                                             [3,
-                                                              4]]}]},
-                u'type': u'Feature',
-                u'id': 10,
-                u'properties': {u'type': u'collection',
-                                u'WKT': u'      GEOMETRYCOLLECTION(POLYGON((1 1,2 1,2 2,1 2,1 1)),POINT(2 3),LINESTRING(2 3,3 4))'}})
-
 if __name__ == "__main__":
     setup()
     exit(run_all(eval(x) for x in dir() if x.startswith("test_")))