Sentinel-1 Burst and Frame Databases for OPERA CSLC-S1/DISP-S1
Follow the steps below to install burst_db
using conda environment.
- Download source code:
git clone https://github.com/opera-adt/burst_db
cd burst_db
- Install dependencies:
conda install --name burst_db -c conda-forge --file environment.yml
- Install via pip:
# run "pip install -e" to install in development mode
python -m pip install .
Installing the package creates the opera-db
command line tool:
$ opera-db --help
Usage: opera-db [OPTIONS] COMMAND [ARGS]...
Create/interact with OPERA's burst/frame databases.
Options:
--help Show this message and exit.
Commands:
create Generate the OPERA frame database for Sentinel-1 data.
fetch-bursts Get all (burst_id_jpl, sensing_time) for a list of...
fetch-granules Fetch granules for given frame IDs.
intersect Query for frames intersecting a given bounding box or...
lookup Query the geopackage database for one frame ID.
The opera-db create
CLI will create the Sqlite database containing the burst IDs, bounding boxes, and UTM EPSG codes for all Sentinel-1 burst ID footprints.
The program uses the database of Sentinel-1 bursts released by ESA. The data can be downloaded from here, but if it is not present in the current directory, the program will download it automatically.
A larger GeoPackage is created which contains the burst footprint geometries, which can be viewed/queried with GIS program.
The other files created from opera-db create
provide information for the Displacement frame. There are JSON files which map the burst IDs to frame IDs, and frame IDs to burst IDs.
The format of the frame-to-burst mapping is
{
"data" : {
"1": {
"epsg": 32631,
"is_land": False,
"is_north_america": False,
"xmin": 500160,
"ymin": 78240,
"xmax": 789960,
"ymax": 322740,
"burst_ids": [
"t001_000001_iw1",
"t001_000001_iw2",
"t001_000001_iw3",
"t001_000002_iw1",
...
"t001_000009_iw3"
]
}, ...
},
"metadata": {
"version": "0.1.2", "margin": 5000.0, ...
}
}
where the keys of the the data
dict are the frame IDs.
The burst-to-frame mapping has the structure
{
"data" : {
"t001_000001_iw1": {"frame_ids": [1]},
"t001_000001_iw2": {"frame_ids": [1]},
...
},
"metadata": {
"version": "0.1.2", "margin": 5000.0, ...
}
}
These data structures can be read into python using the function build_frame_db.read_zipped_json
.
The command also makes a full Geopackage database (which is based on sqlite), where the burst_id_map
table contains the burst geometries, the frames
table contains the frame geometries, and the frames_bursts
table is the JOIN table for the many-to-many relationship.
An example SQL query to view all columns of these tables is
SELECT *
FROM frames f
JOIN frames_bursts fb ON fb.frame_fid = f.fid
JOIN burst_id_map b ON fb.burst_ogc_fid = b.ogc_fid
LIMIT 1;
You can also drag the opera-s1-disp.gpkg
file into QGIS to load the frames
and burst_id_map
tables to filter/view the geometries.