reduce elev distortion from blocking

This commit is contained in:
Brent Schroeter 2025-05-18 23:21:15 -07:00
parent e18d8aab66
commit 8fd4530f12

View file

@ -38,9 +38,9 @@ def get_elev_grid(elev_map, map_bounds, scale_factor, resolution):
"blocked" to avoid jagged and/or superfluous edges. "blocked" to avoid jagged and/or superfluous edges.
""" """
# Are there better factoring algorithms? Yes. Do we need one here? Nope! # Are there better factoring algorithms? Yes. Do we need one here? Nope!
block_sizes = sorted([ block_sizes = reversed(sorted([
int(resolution / x) for x in range(2, resolution) if resolution % x == 0 int(resolution / x) for x in range(2, resolution) if resolution % x == 0
]) ]))
elev_grid = np.zeros((resolution, resolution)) elev_grid = np.zeros((resolution, resolution))
for i in range(resolution): for i in range(resolution):