mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 17:54:56 +00:00
Tidal reach plan format
- Add ReachStyle.TIDAL with code 6, rastered as WaterRole.INLET with sea fluid - Add a tidal tier to the settings, built from the river tier and the inlet bank knobs - Remove the inlet section from WindowPlan, HydrologyPlanCodec and HydrologyPlanPreview - Require tidal reaches to be whole, at sea level and draining to the sea - Record, search and draw inlets from tidal reaches
This commit is contained in:
35 files changed
+253
-494
No files matched your search
@@ -350,7 +350,7 @@ public class HydrologyMetricsTest {
|
||||
}
|
||||
|
||||
private static WindowPlan plan(WindowKey key, List<Reach> reaches, List<Pond> ponds) {
|
||||
return new WindowPlan(key, reaches, ponds, List.of());
|
||||
return new WindowPlan(key, reaches, ponds);
|
||||
}
|
||||
|
||||
private static Reach reach(long id, HydrologyTier tier, long downstream, float catchment, int[] grade, float... coordinates) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RiverTransectProbeTest {
|
||||
RiverTransectProbe.Section section = RiverTransectProbe.section(reach, 5,
|
||||
(x, z) -> new RiverTransectProbe.Column(70, 66, Math.abs(z - 100) <= 2 ? 68 : RiverTransectProbe.NO_WATER, WaterRole.CHANNEL));
|
||||
List<String> summary = RiverTransectProbe.summary(new WindowKey(0, 0),
|
||||
new WindowPlan(new WindowKey(0, 0), List.of(reach), List.of(), List.of()), List.of(),
|
||||
new WindowPlan(new WindowKey(0, 0), List.of(reach), List.of()), List.of(),
|
||||
List.of(section), settings);
|
||||
assertEquals("window 0,0 reaches=1 ponds=0 lakes=0 sections=1", summary.get(0));
|
||||
assertTrue(summary.get(1), summary.get(1).startsWith("reach 7 tier=stream length=40 from=0,100@70 to=40,100@60"));
|
||||
|
||||
@@ -45,7 +45,7 @@ final class SyntheticHydrology implements AutoCloseable {
|
||||
}
|
||||
|
||||
HydrologyProbe.Inputs inputs(UnaryOperator<HydrologyVoxels.ChunkBlocks> edit) {
|
||||
return inputs(edit, (key, plan) -> new HydrologyUnderground.Counts(plan.inlets().size(), 0L, 0, 0L, List.of()));
|
||||
return inputs(edit, (key, plan) -> new HydrologyUnderground.Counts(0, 0L, 0, 0L, List.of()));
|
||||
}
|
||||
|
||||
HydrologyProbe.Inputs inputs(UnaryOperator<HydrologyVoxels.ChunkBlocks> edit, HydrologyUnderground.Source underground) {
|
||||
|
||||
Reference in new issue
Block a user