Skip to content

Commit

Permalink
fix draw_features for small rasters
Browse files Browse the repository at this point in the history
  • Loading branch information
joshday committed Sep 11, 2024
1 parent b3bcd2e commit 8d5d4d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ julia = "1.10"
[extras]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
RasterDataSources = "3cb90ccd-e1b6-4867-9617-4276c8b2ca36"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "ArchGDAL", "RasterDataSources", "GeoJSON"]
test = ["Test", "ArchGDAL", "GeoJSON"]
2 changes: 1 addition & 1 deletion src/InteractiveGeospatial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function draw_features(r)
sublabel(text) = Label(fig, text, fontsize=10, halign=:left, padding = (0,0,-15,0), color=:gray)

# `aggregate` Inputs
init_scale = round(Int, maximum(size(r)) / 1000)
init_scale = max(1, round(Int, maximum(size(r)) / 1000))
scale = Textbox(fig; stored_string=string(init_scale), validator=Int, width=ui_width)
aggregate_fun = menu(sum, mean, minimum, maximum)

Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Test, InteractiveGeospatial, Rasters, ArchGDAL, RasterDataSources, GeoJSON, GLMakie, Markdown
using Test, InteractiveGeospatial, Rasters, ArchGDAL, GeoJSON, GLMakie, Markdown


file = getraster(WorldClim{Climate}, :wind; month=1)
file = download("https://github.com/yeesian/ArchGDALDatasets/raw/master/pyrasterio/example.tif")

r = Raster(file)

Expand Down

0 comments on commit 8d5d4d3

Please sign in to comment.