Giter VIP home page Giter VIP logo

burst_db's Introduction

Burst_DB

Sentinel-1 Burst and Frame Databases for OPERA CSLC-S1/DISP-S1

๐Ÿšจ This toolbox is still in pre-alpha stage and undergoing rapid development. ๐Ÿšจ

Installation

Follow the steps below to install burst_db using conda environment.

  1. Download source code:
git clone https://github.com/opera-adt/burst_db
cd burst_db
  1. Install dependencies:
conda install --name burst_db -c conda-forge --file environment.yml
  1. Install via pip:
# run "pip install -e" to install in development mode
python -m pip install .

Usage

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.

Creating the Burst database sqlite file

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.

Frame database information

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.