Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Feb 5, 2025
1 parent 7dac2ec commit c7e9abd
Show file tree
Hide file tree
Showing 15 changed files with 1,541 additions and 1,541 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
04841deb
1bb57322
132 changes: 66 additions & 66 deletions 01-geodata.html

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions 02-geoviz.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions 03-geoio.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ <h2 data-number="3.1" class="anchored" data-anchor-id="geoio.jl"><span class="he
<section id="file-formats" class="level2" data-number="3.2">
<h2 data-number="3.2" class="anchored" data-anchor-id="file-formats"><span class="header-section-number">3.2</span> File formats</h2>
<p>Most GIS file formats do <strong>not</strong> preserve topological information. This means that neighborhood information is lost as soon as geometries are saved to disk. To illustrate this issue, we consider a geotable over a grid:</p>
<div id="09b4d51d" class="cell" data-execution_count="3">
<div id="f1e0caec" class="cell" data-execution_count="3">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">GeoIO</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>earth <span class="op">=</span> GeoIO.<span class="fu">load</span>(<span class="st">"data/earth.tif"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand Down Expand Up @@ -446,7 +446,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="file-formats"><span class
</div>
</div>
<p>If we save the geotable to a <code>.geojson</code> file on disk, and then load it back, we observe that the grid gets replaced by a geometry set:</p>
<div id="40170f00" class="cell" data-execution_count="4">
<div id="5e391d43" class="cell" data-execution_count="4">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>fname <span class="op">=</span> <span class="fu">tempname</span>() <span class="op">*</span> <span class="st">".geojson"</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>GeoIO.<span class="fu">save</span>(fname, earth)</span>
Expand Down Expand Up @@ -519,7 +519,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="file-formats"><span class
</div>
</div>
<p>Other file formats such as <code>.ply</code> and <code>.msh</code> are widely used in <a href="https://en.wikipedia.org/wiki/Computer_graphics">computer graphics</a> to save geospatial data over meshes, and preserve topological information:</p>
<div id="c675d31d" class="cell" data-execution_count="5">
<div id="e2a1bf4b" class="cell" data-execution_count="5">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>beethoven <span class="op">=</span> GeoIO.<span class="fu">load</span>(<span class="st">"data/beethoven.ply"</span>)</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="fu">viz</span>(beethoven.geometry)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
Expand All @@ -539,7 +539,7 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="rationale"><span class="h
<p>Do we gain anything by not adhering to <strong>programming interfaces</strong>?</p>
</blockquote>
<p>The answer is an emphatic <strong>YES</strong>! It means that we have total freedom to innovate and improve the representation of various geometries and geospatial domains with Julia’s amazing type system. To give a simple example, let’s take a look at the <code>Triangle</code> geometry:</p>
<div id="ae0b312b" class="cell" data-execution_count="6">
<div id="0b38449d" class="cell" data-execution_count="6">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>t <span class="op">=</span> <span class="fu">Triangle</span>((<span class="fl">0</span>, <span class="fl">0</span>), (<span class="fl">1</span>, <span class="fl">0</span>), (<span class="fl">1</span>, <span class="fl">1</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="7">
<pre><code>Triangle
Expand All @@ -549,12 +549,12 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="rationale"><span class="h
</div>
</div>
<p>If we treated this geometry as a generic polygon represented by a vector of vertices in memory, like it is done in <a href="https://github.com/JuliaGeo/GeoInterface.jl">GeoInterface.jl</a> for example, we wouldn’t be able to dispatch optimized code that is only valid for a triangle:</p>
<div id="63b62195" class="cell" data-execution_count="7">
<div id="3905bec9" class="cell" data-execution_count="7">
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@code_llvm</span> <span class="fu">isconvex</span>(t)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>; Function Signature: isconvex(Meshes.Ngon{3, Meshes.𝔼{2}, CoordRefSystems.Cartesian{CoordRefSystems.NoDatum, 2, Unitful.Quantity{Float64, Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)),)}(), Unitful.FreeUnits{(Unitful.Unit{:Meter, Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)),)}()}(tens=0, power=Base.Rational{Int64}(num=1, den=1)),), Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)),)}(), nothing}}}})
; @ /home/runner/.julia/packages/Meshes/BZItr/src/predicates/isconvex.jl:57 within `isconvex`
define i8 @julia_isconvex_29758(ptr nocapture readonly %0) #0 {
define i8 @julia_isconvex_29751(ptr nocapture readonly %0) #0 {
top:
ret i8 1
}</code></pre>
Expand Down
Loading

0 comments on commit c7e9abd

Please sign in to comment.