Ishaan Jhaveri: https://ishaanjhaveri.com GitHub | Twitter | LinkedIn
Yoni Nachmany: https://www.yoninachmany.com GitHub | Twitter | LinkedIn
To our knowledge, there is no existing browser-based tool to easily upload a dataset with locations, crop satellite images for all those locations, download the images locally, and visualize them on a website.
Large geospatial datasets, like those of US prisons or permitted natural gas wells in West Virginia, can illuminate patterns or surface anomalies when viewed with satellite imagery. Earlier projects have tried to leverage the visual similarity of aerial images for pattern recognition. Given a dataset with coordinates, can we accelerate the downloading and previewing of satellite images for those places to drive insights and facilitate downstream tasks such as labeling data or producing reports?
Buzzfeed scraped and filtered millions of map images to identify hundreds of prisons and internment camps in Xinjiang, with significant manual effort. We are interested in making such workflows more accessible by allowing users to drop in a file with points or draw their own points and select options for downloading satellite and aerial images, which are displayed on a site and can feed both human analysis and machine learning models.
Our tool is derived from https://github.com/giswqs/streamlit-geospatial – the code and related blog post should serve as references for installation.
-
Make sure you have Python version 3.8 or greater installed
-
Download the tool's repository:
git clone https://github.com/yoninachmany/streamlit-geospatial.git
-
Download Anaconda or Miniconda to create and activate a new environment with the required packages:
conda env create -f environment-bk.yml conda activate geo
-
Sign up for a Google Earth Engine account and get a token by starting Python in the terminal and running the following commands (more instructions):
import ee ee.Authenticate()
-
Run the Streamlit app:
streamlit run streamlit_app.py
-
Deploy the app to Streamlit Cloud (more instructions)
Watch this video for an overview of how to use a similar tool with related workflows. Instructions and hints are documented throughout the site.
A typical workflow is to upload a GeoJSON/KML/zipped shapefile with points, customize chip parameters, and then click the Submit button to start downloading images and displaying them on the site.
Potential next steps for the tool include:
- Manually entering coordinates to lower the barrier to entry for uploading data
- Selecting images by date ranges and aggregating images in a time period
- Modifying the size and shape of image crops (adding a circular crop option)
- Interacting with images (selecting, copying, removing images)
- Increasing performance of image downloading
- Including links to images for faster downloading
Our tool is limited to working with data in Google Earth Engine, not commercial map providers. In addition, we have not fully tested the edge cases of our satellite imagery queries or tried optimizing for speed.
The app was built using streamlit, geemap, and Google Earth Engine. As Python developers, we could build a data-dependent application more quickly with Streamlit, especially combined with Google Earth Engine's vast imagery collection.