{"id":1261,"date":"2019-06-03T19:00:40","date_gmt":"2019-06-03T17:00:40","guid":{"rendered":"https:\/\/aerospaceresearch.net\/?p=1261"},"modified":"2019-06-03T19:33:23","modified_gmt":"2019-06-03T17:33:23","slug":"gsoc2019directdemodvladyslav-m-installing-directdemod-map-overlays","status":"publish","type":"post","link":"https:\/\/aerospaceresearch.net\/?p=1261","title":{"rendered":"[GSoC2019|DirectDemod|Vladyslav M] Installing DirectDemod. Map overlays."},"content":{"rendered":"<p>This post will cover the installation process of DirectDemod package, we&#8217;ll also talk on how to create pretty map overlays using the <code>directdemod.georeferencer<\/code>\u00a0module.<\/p>\n<h2>Installing DirectDemod<\/h2>\n<p>Recently, the installation process for DirectDemod has been updated (currently on <code>Vinay_dev<\/code>\u00a0and <code>Vladyslav_dev<\/code>\u00a0dev branches only). You must have <code>anaconda<\/code>\u00a0or <code>miniconda<\/code>\u00a0distribution installed. From here do the following:<\/p>\n<ol>\n<li>Clone repository:\n<ul>\n<li><code>git clone https:\/\/github.com\/aerospaceresearch\/DirectDemod<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Change branch to <code>Vinay_dev<\/code>\n<ul>\n<li><code>git checkout -b Vinay_dev<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Create environment\n<ul>\n<li><code>conda env create -f environment.yml -n my_env<\/code><\/li>\n<\/ul>\n<\/li>\n<li>\u00a0Activate the environment\n<ul>\n<li><code>conda activate my_env<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Add directdemod module to your <code>PYTHONPATH<\/code>.<\/li>\n<li>Test installation with <code>pytest<\/code>.<\/li>\n<\/ol>\n<h2>Create fancy map overlays<\/h2>\n<p>Before creating map overlays we need to have a georeferenced image, let&#8217;s make one. <code>samples\/decoded<\/code>\u00a0directory contains 2 already decoded and preprocessed NOAA images ready for georeferencing. Create an empty file &#8211;\u00a0<code>SDRSharp_20190521_170204Z_137500000Hz_IQ.wav<\/code> in <code>samples<\/code>\u00a0directory, it will serve as a placeholder; the image was already extracted but the name of SDR file contains valuable information needed for georeferencing.\u00a0<\/p>\n<p>To georeference the image, we will first extract information from the name of SDR file. Go to <code>directdemod<\/code>\u00a0directory and type the following command.<\/p>\n<p><code>python misc.py -f ..\/samples\/SDRSharp_20190521_170204Z_137500000Hz_IQ.wav -i ..\/samples\/decoded\/SDRSharp_20190521_170204Z_137500000Hz.png<\/code><\/p>\n<p><code>misc.py<\/code>\u00a0extracts data about satellite&#8217;s orbit and position, and then embeds it in json format into created tif file.<\/p>\n<p>\u00a0Now we will use <code>georefencer.py<\/code>\u00a0CLI interface to georeference the image and create a map overlay.\u00a0 -m or &#8211;map option tells the georeferencer to overlay the image with map boundaries after georeferencing.<\/p>\n<p><code>python georeferencer.py -m -i ..\/samples\/decoded\/SDRSharp_20190521_152538Z_137500000Hz.tif<\/code><\/p>\n<p>Finally, the georeferenced image.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1346\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2019\/06\/o.png\" alt=\"\" width=\"574\" height=\"496\" \/><\/p>\n<p style=\"text-align: center;\"><em>Figure 1. Georeferenced image combined with country boundaries.<\/em><\/p>\n<h2>Note on shapefiles<\/h2>\n<p>A shapefile is a vector data storage format for storing geographical features [<a href=\"https:\/\/en.wikipedia.org\/wiki\/Shapefile\">1<\/a>]. 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.\u00a0<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1495\" src=\"https:\/\/aerospaceresearch.net\/wp-content\/uploads\/2019\/06\/o-2.png\" alt=\"\" width=\"568\" height=\"491\" \/><\/p>\n<p style=\"text-align: center;\"><em>Figure 2. Georeferenced image combined with polygons shapefile.<\/em><\/p>\n<h2>Further work<\/h2>\n<p>The next blog post will discuss merging NOAA satellite images, including different techniques for handling overlapping areas cases.<\/p>\n<h2>References<\/h2>\n<ol>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Shapefile\">https:\/\/en.wikipedia.org\/wiki\/Shapefile<\/a><\/li>\n<\/ol>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post will cover the installation process of DirectDemod package, we&#8217;ll also talk on how to create pretty map overlays using the directdemod.georeferencer\u00a0module. Installing DirectDemod Recently, the installation process for DirectDemod has been updated (currently on Vinay_dev\u00a0and Vladyslav_dev\u00a0dev branches only). You must have anaconda\u00a0or miniconda\u00a0distribution installed. From here do the following: Clone repository: git clone &hellip; <a href=\"https:\/\/aerospaceresearch.net\/?p=1261\" class=\"more-link\"><span class=\"screen-reader-text\">\u201e[GSoC2019|DirectDemod|Vladyslav M] Installing DirectDemod. Map overlays.\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/1261"}],"collection":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1261"}],"version-history":[{"count":6,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/1261\/revisions"}],"predecessor-version":[{"id":1497,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/posts\/1261\/revisions\/1497"}],"wp:attachment":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}