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

support reusable templates in recipes #45

Open
trey-stafford opened this issue Jan 7, 2025 · 2 comments
Open

support reusable templates in recipes #45

trey-stafford opened this issue Jan 7, 2025 · 2 comments
Assignees

Comments

@trey-stafford
Copy link
Member

trey-stafford commented Jan 7, 2025

  • We want to be able to support re-use of "templates" that we define in recipes. E.g., the ADC's viz workflow
  • Support the use of a reusable template in a new ogdc recipe. Update the recipe meta yaml spec to support such input.
  • Start with something simple. Maybe our "add compression and overviews" template, as this is a standard qgreenland packaging step for rasters.

This will establish the foundation for work on #38

@trey-stafford trey-stafford moved this to In Progress in QGreenland-Net Jan 7, 2025
@trey-stafford trey-stafford self-assigned this Jan 7, 2025
@rushirajnenuji
Copy link
Member

Thank you @trey-stafford, it makes sense to make re-usable templates that we can use for each recipes.

Sharing the default Viz workflow config as below:

{
  "version": null,
  "dir_geotiff": "geotiff",
  "dir_web_tiles": "web_tiles",
  "dir_3dtiles": "3dtiles",
  "dir_staged": "staged",
  "dir_input": "input",
  "dir_footprints": "footprints",
  "filename_staging_summary": "staging_summary.csv",
  "filename_rasterization_events": "rasterization_events.csv",
  "filename_rasters_summary": "rasters_summary.csv",
  "filename_config": "config.json",
  "ext_web_tiles": ".png",
  "ext_input": ".shp",
  "ext_staged": ".gpkg",
  "ext_footprints": ".gpkg",
  "prop_centroid_x": "staging_centroid_x",
  "prop_centroid_y": "staging_centroid_y",
  "prop_area": "staging_area",
  "prop_tile": "staging_tile",
  "prop_centroid_tile": "staging_centroid_tile",
  "prop_filename": "staging_filename",
  "prop_identifier": "staging_identifier",
  "prop_centroid_within_tile": "staging_centroid_within_tile",
  "prop_duplicated": "staging_duplicated",
  "input_crs": null,
  "simplify_tolerance": 0.0001,
  "tms_id": "WGS1984Quad",
  "tile_path_structure": [
    "style",
    "tms",
    "z",
    "x",
    "y"
  ],
  "z_range": [
    0,
    13
  ],
  "tile_size": [
    256,
    256
  ],
  "statistics": [
    {
      "name": "polygon_count",
      "weight_by": "count",
      "property": "centroids_per_pixel",
      "aggregation_method": "sum",
      "resampling_method": "sum",
      "val_range": [
        0,
        null
      ],
      "nodata_val": 0,
      "nodata_color": "#ffffff00"
    },
    {
      "name": "coverage",
      "weight_by": "area",
      "property": "area_per_pixel_area",
      "aggregation_method": "sum",
      "resampling_method": "average",
      "val_range": [
        0,
        1
      ],
      "nodata_val": 0,
      "nodata_color": "#ffffff00"
    }
  ],
  "geometricError": null,
  "z_coord": 0,
  "deduplicate_at": null,
  "deduplicate_method": null,
  "deduplicate_keep_rules": [],
  "deduplicate_overlap_tolerance": 0.5,
  "deduplicate_overlap_both": true,
  "deduplicate_centroid_tolerance": null,
  "deduplicate_distance_crs": "EPSG:3857",
  "deduplicate_clip_to_footprint": true,
  "deduplicate_clip_method": "intersects"
}

Note: the above config is for the entire workflow, and can be broken down to a generalized recipe config template. And it might evolve to include additional metadata as @alonakos makes progress on getting the WMTS and STAC support.

Looking forward to discussing this further.

@trey-stafford
Copy link
Member Author

Thanks @rushirajnenuji for the viz workflow config example! I think this will be most useful when we start working on #38 . I'm using this issue to focus on a mechanism for defining and using reusable templates with recipes. This foundational work can then be leveraged for implementing the viz workflow template in #38 .

trey-stafford added a commit that referenced this issue Jan 15, 2025
Streamlines the process of submitting a workflow and then waiting for
completion.

This refactor was something that was developed while exploring options for
#45. Use case: submitting
one workflow, waiting for it to successuflly complete, and then running the next
one in a 'chain'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants