<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
h1
        {mso-style-priority:9;
        mso-style-link:"Heading 1 Char";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:24.0pt;
        font-family:"Times New Roman",serif;
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.Heading1Char
        {mso-style-name:"Heading 1 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 1";
        font-family:"Times New Roman",serif;
        mso-fareast-language:EN-CA;
        font-weight:bold;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-CA;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1935553892;
        mso-list-template-ids:-747472868;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<h1>Gitpod workspace with Ubuntu GDAL<o:p></o:p></h1>
<p>How to open a <a href="https://gitpod.io">Gitpod</a> machine with the version of GDAL in the Ubuntu software library.<o:p></o:p></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Point browser at <a href="https://gitpod.io/#https://github.com/OSGeo/gdal">https://gitpod.io/#https://github.com/OSGeo/gdal</a><o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Login with Github credentials<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
In a couple of minutes the gitpod linux machine will be fired up and ready to use with Visual Studio Code open. There might be a cmake error, ignore it for now.<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
In the Terminal window install gdal (and whatever else you need).<o:p></o:p></li></ol>
<pre><code># install gdal binaries, and git<o:p></o:p></code></pre>
<pre><code>sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable<o:p></o:p></code></pre>
<pre><code>sudo apt-get update<o:p></o:p></code></pre>
<pre><code>sudo apt-get install gdal-bin libgdal-dev<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code># verify gdal working<o:p></o:p></code></pre>
<pre><code>gdalinfo --version <o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code># install gdal-utilties<o:p></o:p></code></pre>
<pre><code>python -m pip install swig/python/gdal-utils<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code># test gdal-utils working<o:p></o:p></code></pre>
<pre><code>gdal_edit<o:p></o:p></code></pre>
<p>Optional: run tests to verify what parts of gdal are working<o:p></o:p></p>
<pre><code># Prep<o:p></o:p></code></pre>
<pre><code>python -m pip install -r requirements.txt<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code># Ensure gdal source code tree and the installed gdal binaries are the same version<o:p></o:p></code></pre>
<pre><code>git checkout v`gdal-config --version`<o:p></o:p></code></pre>
<pre><code># and that python bindings match also<o:p></o:p></code></pre>
<pre><code>python -c "from osgeo import gdal;print(gdal.__version__)"<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code># Test only python utilities:<o:p></o:p></code></pre>
<pre><code>pytest pyscripts/<o:p></o:p></code></pre>
<pre><code><o:p> </o:p></code></pre>
<pre><code># All tests:<o:p></o:p></code></pre>
<pre><code>pytest<o:p></o:p></code></pre>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<p style="border:none;padding:0cm">Pytest not found? Use <code><span style="font-size:10.0pt">python -m pytest</span></code> instead. In next opening of bash shell it will work.<o:p></o:p></p>
<p style="border:none;padding:0cm"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Result of investigation in <a href="https://github.com/OSGeo/gdal/issues/5442">
https://github.com/OSGeo/gdal/issues/5442</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-top:4.0pt;line-height:115%;text-autospace:none;vertical-align:middle">
<b><span lang="EN-US" style="font-size:10.0pt;line-height:115%;mso-fareast-language:EN-CA">Matt Wilkie</span></b><span lang="EN-US" style="font-size:10.0pt;line-height:115%;mso-fareast-language:EN-CA"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;mso-fareast-language:EN-CA">Geomatics Developer & Administrator<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;mso-fareast-language:EN-CA">Environment
<span style="color:#2E74B5">|</span> Technology, Innovation and Mapping<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;mso-fareast-language:EN-CA">T 867-667-8133
<span style="color:#2E74B5">|</span> </span><u><span style="font-size:10.0pt;mso-fareast-language:EN-CA"><a href="http://yukon.ca/"><span lang="EN-US" style="color:windowtext">Yukon.ca</span></a><o:p></o:p></span></u></p>
<p class="MsoNormal"><i><span style="font-size:10.0pt;mso-fareast-language:EN-CA">Hours: 08:30-16:30, Mon-Wed: Office, Thu: Remote, Fri: Away.<o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>