blob: 914ed02bc0b9a6df7fc9723fc429953ff2741c32 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<title>Apache SIS - Data formats supported by Apache SIS</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" media="screen" href="./syntax.css">
<link rel="stylesheet" type="text/css" media="screen" href="./sis.css">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="./index.html"> Apache SIS™</a>
<ul class="navbar-nav me-auto mb-2 mb-md-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="menuAbout" data-bs-toggle="dropdown" aria-expanded="false">About</a>
<ul class="dropdown-menu" aria-labelledby="menuAbout">
<li><a class="dropdown-item" href="http://www.apache.org/licenses/">License</a></li>
<li><a class="dropdown-item" href="./mail-lists.html">Mailing Lists</a></li>
<li><a class="dropdown-item" href="./team-list.html">Project Team</a></li>
<li><a class="dropdown-item" href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy policy</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="menuDownload" data-bs-toggle="dropdown" aria-expanded="false">Download</a>
<ul class="dropdown-menu" aria-labelledby="menuDownload">
<li><a class="dropdown-item" href="./downloads.html">Downloads</a></li>
<li><a class="dropdown-item" href="./source.html">Checkout Sources</a></li>
<li><a class="dropdown-item" href="./epsg.html">EPSG Database</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="menuDocumentation" data-bs-toggle="dropdown" aria-expanded="false">Documentation</a>
<ul class="dropdown-menu" aria-labelledby="menuDocumentation">
<li><a class="dropdown-item" href="./apidocs/index.html">Online Javadoc</a></li>
<li><a class="dropdown-item" href="./book/en/developer-guide.html">Developer Guide</a></li>
<li><a class="dropdown-item" href="./howto.html">How to…</a></li>
<li><a class="dropdown-item" href="./formats.html">Supported formats</a></li>
<li><a class="dropdown-item" href="./tables/CoordinateReferenceSystems.html">Supported CRS</a></li>
<li><a class="dropdown-item" href="./tables/CoordinateOperationMethods.html">Map Projections</a></li>
<li><a class="dropdown-item" href="./code-patterns.html">Code Patterns</a></li>
<li><a class="dropdown-item" href="./faq.html">FAQ</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="menuContribute" data-bs-toggle="dropdown" aria-expanded="false">Contribute</a>
<ul class="dropdown-menu" aria-labelledby="menuContribute">
<li><a class="dropdown-item" href="./contributor.html">New Contributor</a></li>
<li><a class="dropdown-item" href="./coding-conventions.html">Coding Conventions</a></li>
<li><a class="dropdown-item" href="./mail-lists.html">Mailing Lists</a></li>
<li><a class="dropdown-item" href="https://issues.apache.org/jira/browse/SIS">Issue Tracker</a></li>
<li><a class="dropdown-item" href="https://github.com/apache/sis">GitHub mirror</a></li>
<li><a class="dropdown-item" href="https://cwiki.apache.org/confluence/display/SIS">Wiki</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="./release-management.html">Release management</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="menuASF" data-bs-toggle="dropdown" aria-expanded="false">The Foundation</a>
<ul class="dropdown-menu" aria-labelledby="menuASF">
<li><a class="dropdown-item" href="http://www.apache.org">The Foundation</a></li>
<li><a class="dropdown-item" href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
<li><a class="dropdown-item" href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li><a class="dropdown-item" href="http://www.apache.org/security/">Security</a></li>
</ul>
</li>
</ul>
<ul class="navbar-nav ml-auto mb-2 mb-md-0">
<li class="nav-item">
<a href="https://www.apache.org/events/current-event.html">
<img class="apache-con" src="https://www.apache.org/events/current-event-234x60.png" alt="ApacheCon"/>
</a>
</li>
</ul>
</div>
</nav>
<div class="row flex-nowrap">
<div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark" style="width:13rem; min-height:40rem">
<ul class="nav nav-pills flex-column mb-auto position-fixed">
<li><a class="nav-link text-white " href="./index.html">Home</a></li>
<li><a class="nav-link text-white" href="http://www.apache.org/licenses/">License</a></li>
<li><a class="nav-link text-white " href="./downloads.html">Downloads</a></li>
<li><a class="nav-link text-white " href="./howto.html">How to…</a></li>
<li><a class="nav-link text-white " href="./standards.html">Standards</a></li>
<li><a class="nav-link active " href="./formats.html">Data formats</a></li>
<li><a class="nav-link text-white " href="./epsg.html">EPSG Database</a></li>
<li><a class="nav-link text-white " href="./javafx.html">Application (demo)</a></li>
<li><a class="nav-link text-white" href="./apidocs/index.html">Online Javadoc</a></li>
<li><a class="nav-link text-white" href="./book/en/developer-guide.html">Developer Guide</a></li>
<li><a class="nav-link text-white " href="./code-patterns.html">Code patterns</a></li>
<li><a class="nav-link text-white " href="./faq.html">FAQ</a></li>
</ul>
</div>
<div class="col">
<main class="container">
<article>
<img src="./images/logo.png" class="sis-logo" align="left"/>
<p class="page-title">Data formats supported by Apache SIS</p>
<p>Apache <abbr title="Spatial Information System">SIS</abbr> can read data from the formats listed below.
Some formats are supported in read-only mode, others in read/write modes.
Data may be structured as vectors or rasters,
which in Apache <abbr title="Spatial Information System">SIS</abbr> are mapped to the <code>FeatureSet</code> and <code>GridCoverageResource</code> interfaces respectively.
Some formats can contain an arbitrary number of feature types or rasters,
in which case the root resource will be <code>Aggregate</code>.</p>
<table>
<tr>
<th>Format</th>
<th>Capability</th>
<th>Module</th>
<th>Type of resource</th>
</tr><tr>
<td><abbr title="Comma Separated Values">CSV</abbr></td>
<td>Read</td>
<td><code>org.apache.sis.storage</code></td>
<td><code>FeatureSet</code></td>
</tr><tr>
<td>ESRI ASCII Grid</td>
<td>Read/write</td>
<td><code>org.apache.sis.storage</code></td>
<td><code>GridCoverageResource</code></td>
</tr><tr>
<td>ESRI BIL/BIQ/BSQ</td>
<td>Read</td>
<td><code>org.apache.sis.storage</code></td>
<td><code>GridCoverageResource</code></td>
</tr><tr>
<td>Folder</td>
<td>Read/write</td>
<td><code>org.apache.sis.storage</code></td>
<td><code>Aggregate</code>, <code>FeatureSet</code>, <code>GridCoverageResource</code></td>
</tr><tr>
<td>(Big) GeoTIFF</td>
<td>Read</td>
<td><code>org.apache.sis.storage.geotiff</code></td>
<td><code>Aggregate</code>, <code>GridCoverageResource</code></td>
</tr><tr>
<td><abbr title="Geographic Markup Language">GML</abbr> (<abbr title="Coordinate Reference System">CRS</abbr> only)</td>
<td>Read/write⁽¹⁾</td>
<td><code>org.apache.sis.referencing</code></td>
<td><code>Resource</code></td>
</tr><tr>
<td><abbr title="GPS Exchange Format">GPX</abbr></td>
<td>Read/write</td>
<td><code>org.apache.sis.storage.xml</code></td>
<td><code>FeatureSet</code></td>
</tr><tr>
<td><abbr title="International Organization for Standardization">ISO</abbr> 19115 <abbr title="Extensible Markup Language">XML</abbr></td>
<td>Read/write⁽¹⁾</td>
<td><code>org.apache.sis.metadata</code></td>
<td><code>Resource</code></td>
</tr><tr>
<td>Landsat</td>
<td>Read</td>
<td><code>org.apache.sis.storage.earthobservation</code></td>
<td><code>Aggregate</code>, <code>GridCoverageResource</code></td>
</tr><tr>
<td>NetCDF</td>
<td>Read</td>
<td><code>org.apache.sis.storage.netcdf</code></td>
<td><code>Aggregate</code>, <code>FeatureSet</code>, <code>GridCoverageResource</code></td>
</tr><tr>
<td><abbr title="Structured Query Language">SQL</abbr>⁽²⁾</td>
<td>Read</td>
<td><code>org.apache.sis.storage.sql</code></td>
<td><code>Aggregate</code>, <code>FeatureSet</code></td>
</tr><tr>
<td><abbr title="Well Known Text">WKT</abbr> (<abbr title="Coordinate Reference System">CRS</abbr> only)</td>
<td>Read/write⁽¹⁾</td>
<td><code>org.apache.sis.referencing</code></td>
<td><code>Resource</code></td>
</tr><tr>
<td>World File</td>
<td>Read/write</td>
<td><code>org.apache.sis.storage</code></td>
<td><code>GridCoverageResource</code>, sometimes <code>Aggregate<code></td>
</tr>
</table>
<p><strong>Notes:</strong></p>
<ol>
<li><abbr title="Geographic Markup Language">GML</abbr>, <abbr title="Well Known Text">WKT</abbr> and <abbr title="International Organization for Standardization">ISO</abbr> 19115 cannot yet be written
throught the <code>DataStore</code> API. They require the use of specific API.</li>
<li><abbr title="Structured Query Language">SQL</abbr> is not a file format but rather a connection to a database throught <abbr title="Java DataBase Connectivity">JDBC</abbr> driver.</li>
</ol>
<h1 id="how-to-read">How to read</h1>
<p>The easiest way to open a file in read-only mode is as below.
The <code>input</code> argument can be a <code>File</code>, <code>Path</code>, <code>URI</code>, <code>URL</code>, <code>InputStream</code>, <code>ReadableByteChannel</code>
or a <abbr title="Java DataBase Connectivity">JDBC</abbr> <code>DataSource</code> (non-exhaustive list).</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="k">try</span> <span class="o">(</span><span class="n">DataStore</span> <span class="n">store</span> <span class="o">=</span> <span class="n">DataStores</span><span class="o">.</span><span class="na">open</span><span class="o">(</span><span class="n">input</span><span class="o">))</span> <span class="o">{</span>
</span></span><span class="line"><span class="cl"> <span class="c1">// Assuming that we know that the data is a single raster:
</span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="n">GridCoverageResource</span> <span class="n">r</span> <span class="o">=</span> <span class="o">(</span><span class="n">GridCoverageResource</span><span class="o">)</span> <span class="n">store</span><span class="o">;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="c1">// Subset of data could be specified here (no subset in this example):
</span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="n">GridCoverage</span> <span class="n">coverage</span> <span class="o">=</span> <span class="n">r</span><span class="o">.</span><span class="na">read</span><span class="o">(</span><span class="kc">null</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"> <span class="c1">// Assuming that we know that the data is two-dimensional:
</span></span></span><span class="line"><span class="cl"><span class="c1"></span> <span class="n">RenderedImage</span> <span class="n">image</span> <span class="o">=</span> <span class="n">coverage</span><span class="o">.</span><span class="na">render</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
</span></span><span class="line"><span class="cl"><span class="o">}</span></span></span></code></pre></div>
<p>Most of Apache <abbr title="Spatial Information System">SIS</abbr> API is designed for multi-dimensional data.
When requesting a <code>RenderedImage</code>, a two-dimensional slice must be specified,
unless the data are already two-dimensional.
The two-dimensional slice can be along any dimensions.
See the <a href="book/en/developer-guide.html#DataAccess">SIS developer guide</a> for more information.</p>
<h1 id="accessing-data-on-the-cloud">Accessing data on the cloud</h1>
<p>Data files can be located on Amazon S3 storage service.
For accessing those data, add the following dependency to the Maven project:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;dependencies&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&lt;dependency&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&lt;groupId&gt;</span>org.apache.sis.cloud<span class="nt">&lt;/groupId&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&lt;artifactId&gt;</span>sis-cloud-aws<span class="nt">&lt;/artifactId&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&lt;version&gt;</span>1.4<span class="nt">&lt;/version&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&lt;scope&gt;</span>runtime<span class="nt">&lt;/scope&gt;</span>
</span></span><span class="line"><span class="cl"> <span class="nt">&lt;/dependency&gt;</span>
</span></span><span class="line"><span class="cl"><span class="nt">&lt;/dependencies&gt;</span></span></span></code></pre></div>
<p>With above dependency on the classpath, it is possible to instantiate <code>java.nio.Path</code> object
with a value of the form <code>&quot;S3://bucket/pseudo-directory/file&quot;</code>.
Login and password can be specified in a <code>~/.aws/credentials</code> file like below
(Apache SIS does not yet manage credentials by itself).</p>
<pre tabindex="0"><code class="language-config" data-lang="config">[default]
aws_access_key_id = &lt;some value&gt;
aws_secret_access_key = &lt;some value&gt;</code></pre>
<p>An alternative to above configuration is to set the
<code>AWS_ACCESS_KEY_ID</code> and <code>AWS_SECRET_ACCESS_KEY</code> environment variables.
See <a href="https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html">AWS developer guide</a> for more information.</p>
</article>
</main>
<footer class="footer">
<div class="container">
<p>
Copyright &copy; 2013-2023 The Apache Software Foundation, Licensed under the
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>
Apache SIS, Apache, the Apache feather logo are trademarks of The Apache Software Foundation.
</p>
</div>
</footer>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ" crossorigin="anonymous"></script>
</body>
</html>