You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
raster-workflow --cutline clips to a polygon (#344). --target-extent clips only to a box, so a build scoped to a country needed a hand-written gdalwarp -cutline step. --cutline <vector> (GeoParquet, GeoPackage, GeoJSON, zipped shapefile; path or URL; any CRS) and --cutline-where now clip the COG step on raster-workflow and raster. Pixels whose centre falls outside the polygons become nodata, and the step refuses to run without a nodata value rather than write 0. A source already in EPSG:4326 keeps its grid: the extent is the polygons' bounds snapped outward to the source pixels and cut to the source, and the warp is nearest, so values inside pass through unchanged, even for a continuous source warped otherwise with bilinear.
Fixed
A clip of a single source is no longer ignored (#344). raster-workflow with one --source-url and --target-extent added the preprocess-cog step, but the raster command only clipped a mosaic of several inputs, so the COG covered the whole source with no warning. One input with --target-extent, --target-resolution or --cutline now goes through the same clip as several, in RasterProcessor as well. --target-resolution on one source that is already a COG now adds the preprocess-cog step too; it used to be dropped.
Repartition sorts a large h0 partition in id ranges (#339). repartition wrote each h0 partition with one COPY … ORDER BY, so DuckDB sorted every joined row of the partition, attributes included, before writing any. Its scratch grew with the partition's row count rather than with the file it wrote: PAD-US 4.1 combined's 700M-row partition was OOM-killed at 32Gi and, at 64Gi, spilled past a 200Gi disk limit for a 1.4 GB file. Each partition is now planned as contiguous _cng_fid ranges, each range is joined and sorted on its own, and the sorted ranges are streamed in order into the one data_0.parquet. The file is the same, rows and order. A feature's rows never straddle two ranges. A range is 50M rows per 40GiB of --memory-limit (the ratio that worked on PAD-US), at most 50M; --sort-range-rows or CNG_SORT_RANGE_ROWS overrides it. A partition that fits in one range is written as before. Each partition's row count is now checked against the chunks before it is uploaded, so a source with duplicate ids, which multiplied rows in the join without error, now fails. DuckDB's thread count is now the pod's cpu request (CNG_POD_CPU, which the generated manifest sets, or an enforced quota), else at most 8, rather than the host's core count: at 48 threads in a 4-cpu pod, the same sort under a 3GiB limit passed or ran out of memory by chance, on the released code as well.
A fractions build no longer overwrites the mode build of the same layer (#343). raster-workflow --hex-resampling fractions wrote to the same hex/ and hex-chunks/ paths, and emitted the same job names, as a mode build of the same --dataset. A categorical layer usually wants both, so running both replaced the first table with the second and the second kubectl apply collided with the first build's jobs. A fractions build now writes <dataset>/hex-fractions/ (staged in hex-fractions-chunks/), its jobs and ConfigMap are named <name>-fractions-*, and its sizes and checksums go to <dataset>-fractions.checksums.json. The COG and its render are shared, since both builds warp with nearest and write the same file. Every other reducer is unchanged. A workflow that worked around this with --dataset <name>/fractions now writes <name>/fractions/hex-fractions/; drop the /fractions suffix to get <name>/hex-fractions/, the layout data-workflows already uses by hand.