<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arturo Mendes - GIS Course | TYC GIS Training</title>
	<atom:link href="https://www.giscourse.com/author/arturo-mendes/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.giscourse.com</link>
	<description>Courses &#38; Training - ArcGIS 10, ArcGIS PRO, QGIS, Python, JS, Development</description>
	<lastBuildDate>Wed, 21 Oct 2020 08:10:58 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.6</generator>

<image>
	<url>https://www.giscourse.com/wp-content/uploads/2017/07/cropped-flavicon-01-32x32.png</url>
	<title>Arturo Mendes - GIS Course | TYC GIS Training</title>
	<link>https://www.giscourse.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Automatically merge raster files using PyQGIS</title>
		<link>https://www.giscourse.com/automatically-merge-raster-files-using-pyqgis/</link>
					<comments>https://www.giscourse.com/automatically-merge-raster-files-using-pyqgis/#comments</comments>
		
		<dc:creator><![CDATA[Arturo Mendes]]></dc:creator>
		<pubDate>Tue, 12 May 2020 10:49:36 +0000</pubDate>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[PyQGIS]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[QGIS]]></category>
		<guid isPermaLink="false">https://www.giscourse.com/?p=17267</guid>

					<description><![CDATA[In this post we are going to learn how to merge massive amounts of raster files automatically using PyQGIS. This way we will avoid all the crashes and troubles associated with the processing script found in the toolbox. And of course it saves us all the trouble of having to manually select the files. TL;  [...]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">In this post we are going to learn how to merge massive amounts of raster files automatically using PyQGIS. <span id="more-17267"></span>This way we will avoid all the crashes and troubles associated with the processing script found in the toolbox. And of course it saves us all the trouble of having to manually select the files.</p>
<h3 style="text-align: justify;">TL; DR, the solution</h3>
<p style="text-align: justify;">We will arrive to the solution after taking two simple steps. The first step will be creating a VRT file. A VRT file is a Virtual Dataset that contains all of the images merged. Second and final step will be just to have that file translated to the desired extension.</p>
<pre class="prettyprint lang-python" data-start-line="1" data-visibility="visible" data-highlight="5" data-caption="">vrt_path = os.path.join(BASE_PATH, 'prov_vrt.vrt')
vrt = gdal.BuildVRT(vrt_path, list)

result = os.path.join(BASE_PATH, 'merged.tif')
gdal.Translate(result, vrt, format='GTiff')</pre>
<p style="text-align: justify;">Here the variable list is a list composed of the path of each and every file we want to merge. This is important, don&#8217;t rush with the copypasting or you will get an error.</p>
<h3 style="text-align: justify;">Complete solution</h3>
<p style="text-align: justify;">If you are starting from scratch you will have to import the libraries <em>os</em> and <em>pathlib</em>. They will help us explore folders and files with ease.</p>
<p style="text-align: justify;">In this code <em>glob</em> will help us filter the files in the folder to only those with the extension TIF.</p>
<pre class="prettyprint lang-python" data-start-line="1" data-visibility="visible" data-highlight="15, 18" data-caption="">from pathlib import Path
from osgeo import gdal
import os

folder_path = r"C:\Users\Usuario\Desktop\input"
BASE_PATH = os.path.dirname(os.path.abspath(folder_path))
folder = Path(folder_path)

l = []

for f in folder.glob('**/*.tif'):
    f_path = f.as_posix()
    l.append(f_path)

vrt_path = os.path.join(BASE_PATH, 'prov_vrt.vrt')
vrt = gdal.BuildVRT(vrt_path, l)

result = os.path.join(BASE_PATH, 'merged.tif')
gdal.Translate(result, vrt, format='GTiff')</pre>
<p style="text-align: justify;">The processing script found in the toolbox as well as the use of <em>gdal_merge</em> imply that every image to be merged has to be loaded previously in memory. The code above bypasses this step, thus avoiding all the problems related to lack of memory.</p>
<p style="text-align: right;">Note: There is a rating embedded within this post, please visit this post to rate it.</p>
<h2 style="text-align: center;">Quality training taught by professionals</h2>
<p style="text-align: center;"><a href="https://www.giscourse.com/qgis-courses/qgis-course-beginner-to-advanced-level-online-gis-training/" target="_blank" rel="noopener noreferrer"><img decoding="async" class="alignnone wp-image-17065 size-medium" src="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-300x300.jpg" alt="" width="300" height="300" srcset="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-66x66.jpg 66w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-100x100.jpg 100w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-150x150.jpg 150w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-200x200.jpg 200w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-300x300.jpg 300w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-400x400.jpg 400w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-600x600.jpg 600w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada.jpg 627w" sizes="(max-width: 300px) 100vw, 300px" /></a>   <a href="https://www.giscourse.com/qgis-courses/qgis-course-beginner-level-online-gis-training/" target="_blank" rel="noopener noreferrer"><img decoding="async" class="alignnone wp-image-15588 size-medium" src="https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-300x300.jpg" alt="" width="300" height="300" srcset="https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-66x66.jpg 66w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-120x120.jpg 120w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-150x150.jpg 150w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-200x200.jpg 200w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-300x300.jpg 300w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-400x400.jpg 400w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-500x500.jpg 500w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-600x600.jpg 600w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-768x769.jpg 768w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-800x801.jpg 800w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-1024x1024.jpg 1024w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level-1200x1201.jpg 1200w, https://www.giscourse.com/wp-content/uploads/2017/12/Online-Course-QGIS-Beginner-Level.jpg 1307w" sizes="(max-width: 300px) 100vw, 300px" /></a></p><p>The post <a href="https://www.giscourse.com/automatically-merge-raster-files-using-pyqgis/">Automatically merge raster files using PyQGIS</a> first appeared on <a href="https://www.giscourse.com">GIS Course  |  TYC GIS Training</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.giscourse.com/automatically-merge-raster-files-using-pyqgis/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>GIS and health sciences</title>
		<link>https://www.giscourse.com/gis-and-health-sciences/</link>
					<comments>https://www.giscourse.com/gis-and-health-sciences/#respond</comments>
		
		<dc:creator><![CDATA[Arturo Mendes]]></dc:creator>
		<pubDate>Wed, 01 Apr 2020 15:24:45 +0000</pubDate>
				<category><![CDATA[BLOG]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[QGIS]]></category>
		<guid isPermaLink="false">https://www.giscourse.com/?p=17118</guid>

					<description><![CDATA[COVID-19 or corona virus is having a tremendous impact on the everyday lives of lots of people around the world. With entire countries in lockdown and others with severe restrictions on free movement the impact the pandemic is having on the economy is worth of mention too. Experts around the globe focus on minimizing the  [...]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">COVID-19 or corona virus is having a tremendous impact on the everyday lives of lots of people around the world. With entire countries in lockdown and others with severe restrictions on free movement the impact the pandemic is having on the economy is worth of mention too. <span id="more-17118"></span> Experts around the globe focus on minimizing the repercussion the virus will have on the population and the economy. All of this wouldn’t be possible without the tools provided by a certain discipline.</p>
<h4 style="text-align: justify;">The study of diseases</h4>
<p style="text-align: justify;">Epidemiology is the study of horizontal and vertical structure of disease infection, transmission, diffusion, magnitude, age group and sex of the diseases with reference to space and time. Geographical Information Systems have become increasingly relevant in the study of diseases for their ability to represent the spatial component. GIS offer an insight into the environmental causes and spatial trends of health-related events.</p>
<h4 style="text-align: justify;">Use cases</h4>
<p style="text-align: justify;">The first time spatial information was used to study a pandemic goes back to 1854. The feat of Dr. John Snow is widely known. Dr. Snow was studying the 1854 outbreak of cholera as he began to map the cases on his neighbourhood. The map allowed him to discover that most cases appeared around a certain well. When the well was disabled the outbreak ended. That year 23000 people died due to cholera, <a href="https://www.history.com/topics/inventions/history-of-cholera">the worst figure in the history of Great Britain</a>. The fifth pandemic, in 1875, had less impact on the country due to improved water supplies and quarantine measures.</p>
<p style="text-align: justify;">Another example of GIS being used in epidemiology is the case of Dengue. Countries like India have used this tool to monitor outbreaks of Dengue fever and control the disease. Mapping and detection of risk areas is a complex task that requires the assessment of multiple criteria.</p>
<p style="text-align: justify;"><a href="https://www.who.int/lep/monitor/gis/en/">The World Health Organization refers to GIS as valuable tools for assessing and managing epidemics</a>. More recently, GIS helped officials in South Korea trace the disease and limit the spread by tracking down individuals who had been in contact with cases of corona virus. <a href="https://www.bbc.com/news/world-asia-51836898">South Korea has been widely praised for his success in tackling the impact of the virus.</a></p>
<h4 style="text-align: justify;">Final word</h4>
<p style="text-align: justify;">GIS was known to be useful for assessing environmental risks and for managing rescue operations after natural disasters. But previously we’ve shown they are of application in public health too. As the number of technologies associated with GIS grows the capabilities of GIS will grow too.</p>
<p style="text-align: right;">Note: There is a rating embedded within this post, please visit this post to rate it.</p>
<h2 style="text-align: center;">Quality training taught by professionals</h2>
<p style="text-align: center;"><a href="https://www.giscourse.com/arcgis-10-courses/arcgis-course-from-beginner-to-advanced-level-online-gis-training/" target="_blank" rel="noopener noreferrer"><img decoding="async" class="alignnone wp-image-17070 size-medium" src="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-300x300.jpg" alt="" width="300" height="300" srcset="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-66x66.jpg 66w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-100x100.jpg 100w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-150x150.jpg 150w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-200x200.jpg 200w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-300x300.jpg 300w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-400x400.jpg 400w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada-600x600.jpg 600w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-arcgis_cuadrada.jpg 627w" sizes="(max-width: 300px) 100vw, 300px" /></a> <a href="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada.jpg">  </a><a href="https://www.giscourse.com/qgis-courses/qgis-course-beginner-to-advanced-level-online-gis-training/" target="_blank" rel="noopener noreferrer"><img decoding="async" class="alignnone wp-image-17065 size-medium" src="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-300x300.jpg" alt="" width="300" height="300" srcset="https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-66x66.jpg 66w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-100x100.jpg 100w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-150x150.jpg 150w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-200x200.jpg 200w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-300x300.jpg 300w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-400x400.jpg 400w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada-600x600.jpg 600w, https://www.giscourse.com/wp-content/uploads/2020/03/specialist-qgis_cuadrada.jpg 627w" sizes="(max-width: 300px) 100vw, 300px" /></a></p><p>The post <a href="https://www.giscourse.com/gis-and-health-sciences/">GIS and health sciences</a> first appeared on <a href="https://www.giscourse.com">GIS Course  |  TYC GIS Training</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://www.giscourse.com/gis-and-health-sciences/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
