Skip to content

Commit d180c24

Browse files
return DriverVectorCube in top level vector udf
Previously, result_collections[0].data.to_file() wrote a geojson with a CRS84. Which causes issues when this is passed to the global extent in load_collection.
1 parent 146ad2c commit d180c24

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

openeo_driver/ProcessGraphDeserializer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,8 +1451,7 @@ def run_udf(args: dict, env: EvalEnv):
14511451
result_collections = result_data.get_feature_collection_list()
14521452
if result_collections != None and len(result_collections) > 0:
14531453
with tempfile.NamedTemporaryFile(suffix=".json.tmp", delete=False) as temp_file:
1454-
result_collections[0].data.to_file(temp_file.name, driver='GeoJSON')
1455-
return DelayedVector(temp_file.name)
1454+
return DriverVectorCube.from_geodataframe(data=result_collections[0].data)
14561455
structured_result = result_data.get_structured_data_list()
14571456
if structured_result != None and len(structured_result)>0:
14581457
return JSONResult(structured_result[0].data)

0 commit comments

Comments
 (0)