The goal of this project is to rewrite and consolidate the existing codebases for creating heatmaps of satellite data to create an interactive heatmap. This heatmap can currently display Sentinel-1 data with the ability to select date ranges and data types. The heatmap can also export to a png with formatting matching the old heatmap generation codebases.
-
Navigate to the
data-ingestdirectory -
Create a file named
.env -
.envshould contain login credentials to the PostgreSQL DB, ie.export DB_HOST=change_me export DB_USERNAME=change_me export DB_PASSWORD=change_me export DB_NAME=change_me -
To select a date range and data type to generate data for go into
create_sql.pyand change the default values ofgenerate_commandas you desire -
-
If you have docker installed then you can cd into
./Dockerand run./run.shto generatesat_data.geojson -
If you have the dependencies installed locally you can now run
python3 ingest.pyandsat_data.geojsonwill be generated -
If you have conda installed then you can create a conda enviornment using
env.ymlinside theDockerdirectory, you can then runpython3 ingest.pyinside this environment to generatesat_data.geojson
-
- Install rust, rust-lang.org has instructions on how to go about this
- This project uses nightly features of rust, this means you will need a nightly version of rust, run
rustup toolchain install nightly-2025-02-01 - To swtich to a nightly build of rust run
rustup override set nightly-2025-02-01 - Install the
wasm32-unknown-unknowntarget with:rustup target add wasm32-unknown-unknown
- Move
sat_data.geojsonto theheatmap-servicedirectory, don't change the file name or the server will fail to find the data - Run the bash script
run-service-docker.shfrom the repository root, this will build a docker image to run the service and then start a container running the service.
The service has a startup time, if you attempt to access the client before the service is running the client will be locked into a loading screen until you reload. You can check if the service is ready by checking the processes CPU usage, it should be close to 0%. The service should log Service Running! in the console when it is close to finsihed with setup.
- A release build of the client is available here
- Once you are on the page select the date range, product type, and platform you would like to generate a heatmap for. Note that while the page may allow you to select ranges outside of those you generated
sat_data.geojsonwith any data from those ranges will not be included. - After the new selection of data has loaded click
Export to PNGand wait for the file to download.
If you would prefer to run the service locally you must have a .env file in the heatmap-service directory, it should have the following fields:
SERVER_ADDRESS=127.0.0.1:8080 # the bind address for the microservice
CACHE_TTL=3600 # how long (in seconds) the cache should last for
GEO_JSON_PATH=/path/to/geojson
- Move
sat_data.geojsonto the location specified in theGEO_JSON_PATHvariable from your.envfile - Navigate into the
heatmap-servicedirectory - Run
cargo run --release --package heatmap-servicefrom repository root
Elliott Lewandowski
Lily Larson