[GSoC2019|DirectDemod|Vladyslav M] Installing DirectDemod. Map overlays.

This post will cover the installation process of DirectDemod package, we’ll also talk on how to create pretty map overlays using the directdemod.georeferencer module.

Installing DirectDemod

Recently, the installation process for DirectDemod has been updated (currently on Vinay_dev and Vladyslav_dev dev branches only). You must have anaconda or miniconda distribution installed. From here do the following:

  1. Clone repository:
    • git clone https://github.com/aerospaceresearch/DirectDemod
  2. Change branch to Vinay_dev
    • git checkout -b Vinay_dev
  3. Create environment
    • conda env create -f environment.yml -n my_env
  4.  Activate the environment
    • conda activate my_env
  5. Add directdemod module to your PYTHONPATH.
  6. Test installation with pytest.

Create fancy map overlays

Before creating map overlays we need to have a georeferenced image, let’s make one. samples/decoded directory contains 2 already decoded and preprocessed NOAA images ready for georeferencing. Create an empty file – SDRSharp_20190521_170204Z_137500000Hz_IQ.wav in samples directory, it will serve as a placeholder; the image was already extracted but the name of SDR file contains valuable information needed for georeferencing. 

To georeference the image, we will first extract information from the name of SDR file. Go to directdemod directory and type the following command.

python misc.py -f ../samples/SDRSharp_20190521_170204Z_137500000Hz_IQ.wav -i ../samples/decoded/SDRSharp_20190521_170204Z_137500000Hz.png

misc.py extracts data about satellite’s orbit and position, and then embeds it in json format into created tif file.

 Now we will use georefencer.py CLI interface to georeference the image and create a map overlay.  -m or –map option tells the georeferencer to overlay the image with map boundaries after georeferencing.

python georeferencer.py -m -i ../samples/decoded/SDRSharp_20190521_152538Z_137500000Hz.tif

Finally, the georeferenced image.

Figure 1. Georeferenced image combined with country boundaries.

Note on shapefiles

A shapefile is a vector data storage format for storing geographical features [1]. In the context of this application, country boundaries are being represented as a shapefile. Inside the shapefile points may be stored as polygons or as polylines, overlaying an image with polylines will have an effect of overlaying country frontiers, while overlaying an image with polygons will have an effect of overlaying country areas. 

Figure 2. Georeferenced image combined with polygons shapefile.

Further work

The next blog post will discuss merging NOAA satellite images, including different techniques for handling overlapping areas cases.

References

  1. https://en.wikipedia.org/wiki/Shapefile

Schreibe einen Kommentar