Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aggregate_spatial and raster_to_vector return AggregatePolygonResult in dry run #276

Closed
JeroenVerstraelen opened this issue Mar 21, 2024 · 0 comments · Fixed by #279
Closed
Assignees

Comments

@JeroenVerstraelen
Copy link
Contributor

This is a legacy from the very first commit of the DryRunDataCube where aggregate_spatial returns a AggregatePolygonResult instead of a DryRunDataCube. Raster_to_vector also returns an AggregatePolygonResult.

Normally we should be able to change this without breaking too many of the existing processes.

run_udf in the ProcessGraphDeserializer does contain the following check:

    if dry_run_tracer and isinstance(data, AggregatePolygonResult):
        return JSONResult({})

We should be able to just check if the current run is a dry_run instead.
Note that run_udf in the ProcessGraphDeserializer is only used for top level UDFs. It's mainly used when running UDFs on an entire vector cube.

There was also a discussion on if raster_to_vector should provide a weak_spatial_extent for the entire raster, because we don't know the geometries during the dry run.

@JeroenVerstraelen JeroenVerstraelen self-assigned this Mar 21, 2024
@JeroenVerstraelen JeroenVerstraelen changed the title aggregate_spatial and vector_to_raster return AggregatePolygonResult in dry run aggregate_spatial and raster_to_vector return AggregatePolygonResult in dry run Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant