@@ -1332,14 +1332,22 @@ def test_run_udf_on_vector_read_vector(api, udf_code):
13321332 },
13331333 }
13341334 resp = api .check_result (process_graph )
1335- assert resp .json == [
1335+ assert resp .json [ "features" ] == [
13361336 {
1337- "type" : "Polygon" ,
1338- "coordinates" : [[[4.47 , 51.1 ], [4.52 , 51.1 ], [4.52 , 51.15 ], [4.47 , 51.15 ], [4.47 , 51.1 ]]],
1337+ "geometry" : {
1338+ "coordinates" : [[[4.47 , 51.1 ], [4.52 , 51.1 ], [4.52 , 51.15 ], [4.47 , 51.15 ], [4.47 , 51.1 ]]],
1339+ "type" : "Polygon" ,
1340+ },
1341+ "properties" : {},
1342+ "type" : "Feature" ,
13391343 },
13401344 {
1341- "type" : "Polygon" ,
1342- "coordinates" : [[[4.45 , 51.17 ], [4.5 , 51.17 ], [4.5 , 51.2 ], [4.45 , 51.2 ], [4.45 , 51.17 ]]],
1345+ "geometry" : {
1346+ "coordinates" : [[[4.45 , 51.17 ], [4.5 , 51.17 ], [4.5 , 51.2 ], [4.45 , 51.2 ], [4.45 , 51.17 ]]],
1347+ "type" : "Polygon" ,
1348+ },
1349+ "properties" : {},
1350+ "type" : "Feature" ,
13431351 },
13441352 ]
13451353
@@ -1377,14 +1385,22 @@ def test_run_udf_on_vector_get_geometries(api, udf_code):
13771385 },
13781386 }
13791387 resp = api .check_result (process_graph )
1380- assert resp .json == [
1388+ assert resp .json [ "features" ] == [
13811389 {
1382- "type" : "Polygon" ,
1383- "coordinates" : [[[4.47 , 51.1 ], [4.52 , 51.1 ], [4.52 , 51.15 ], [4.47 , 51.15 ], [4.47 , 51.1 ]]],
1390+ "geometry" : {
1391+ "coordinates" : [[[4.47 , 51.1 ], [4.52 , 51.1 ], [4.52 , 51.15 ], [4.47 , 51.15 ], [4.47 , 51.1 ]]],
1392+ "type" : "Polygon" ,
1393+ },
1394+ "properties" : {},
1395+ "type" : "Feature" ,
13841396 },
13851397 {
1386- "type" : "Polygon" ,
1387- "coordinates" : [[[4.45 , 51.17 ], [4.5 , 51.17 ], [4.5 , 51.2 ], [4.45 , 51.2 ], [4.45 , 51.17 ]]],
1398+ "geometry" : {
1399+ "coordinates" : [[[4.45 , 51.17 ], [4.5 , 51.17 ], [4.5 , 51.2 ], [4.45 , 51.2 ], [4.45 , 51.17 ]]],
1400+ "type" : "Polygon" ,
1401+ },
1402+ "properties" : {},
1403+ "type" : "Feature" ,
13881404 },
13891405 ]
13901406
@@ -1462,7 +1478,8 @@ def test_run_udf_on_vector_inline_geojson(api, udf_code):
14621478 },
14631479 }
14641480 resp = api .check_result (process_graph )
1465- assert resp .json == [
1481+ geometries = [f ["geometry" ] for f in resp .json ["features" ]]
1482+ assert geometries == [
14661483 ApproxGeoJSONByBounds (0 , 0 , 4 , 4 , types = ["Polygon" ], abs = 0.01 ),
14671484 ApproxGeoJSONByBounds (2 , 1 , 6 , 5 , types = ["Polygon" ], abs = 0.01 ),
14681485 ]
0 commit comments