Skip to content

Commit

Permalink
Disable GeoTIFF windowing on community.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Dec 9, 2024
1 parent b8f637f commit 3c38d68
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webui/tools/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import streamlit as st
import streamlit.components.v1 as components
from config import INPUT_DIRECTORY
from config import INPUT_DIRECTORY, is_on_community_server
from osmp import get_bbox, get_center, get_preview
from tools.tool import Tool

Expand All @@ -23,6 +23,12 @@ class GeoTIFFWindowingTool(Tool):
download_path = None

def content(self):
if is_on_community_server():
st.warning(
"💡 This tool is disabled on StreamLit community hosting. \n"
"If you want to use it, consider running the application locally."
)
return
if "windowed" not in st.session_state:
st.session_state.windowed = False
uploaded_file = st.file_uploader("Upload a GeoTIFF file", type=["tif", "tiff"])
Expand Down

0 comments on commit 3c38d68

Please sign in to comment.