You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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>
<spanid="cb3-3"><ahref="#cb3-3" aria-hidden="true" tabindex="-1"></a>earth <spanclass="op">=</span> GeoIO.<spanclass="fu">load</span>(<spanclass="st">"data/earth.tif"</span>)</span></code><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></pre></div>
@@ -446,7 +446,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="file-formats"><span class
446
446
</div>
447
447
</div>
448
448
<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>
@@ -519,7 +519,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="file-formats"><span class
519
519
</div>
520
520
</div>
521
521
<p>Other file formats such as <code>.ply</code> and <code>.msh</code> are widely used in <ahref="https://en.wikipedia.org/wiki/Computer_graphics">computer graphics</a> to save geospatial data over meshes, and preserve topological information:</p>
<p>Do we gain anything by not adhering to <strong>programming interfaces</strong>?</p>
540
540
</blockquote>
541
541
<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>
<p>If we treated this geometry as a generic polygon represented by a vector of vertices in memory, like it is done in <ahref="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>
0 commit comments