Skip to content

Commit

Permalink
Deployed c181a07 to 0.5.1 with MkDocs 1.6.0 and mike 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
CI committed Jun 24, 2024
1 parent 5a1a3bb commit d8dddc7
Show file tree
Hide file tree
Showing 32 changed files with 7,128 additions and 154 deletions.
71 changes: 67 additions & 4 deletions 0.5.1/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,26 @@



<li class="md-nav__item">
<a href="/stac-geoparquet/latest/schema/" class="md-nav__link">


<span class="md-ellipsis">
Schema considerations
</span>


</a>
</li>









<li class="md-nav__item">
<a href="/stac-geoparquet/latest/spec/stac-geoparquet-spec/" class="md-nav__link">

Expand Down Expand Up @@ -333,17 +353,19 @@








<li class="md-nav__item md-nav__item--nested">



<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >


<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">


<span class="md-ellipsis">
Expand All @@ -354,8 +376,8 @@
<span class="md-nav__icon md-icon"></span>
</label>

<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
API Reference
</label>
Expand Down Expand Up @@ -403,13 +425,54 @@









<li class="md-nav__item">
<a href="/stac-geoparquet/latest/api/pgstac/" class="md-nav__link">


<span class="md-ellipsis">
pgstac integration
</span>


</a>
</li>




</ul>
</nav>

</li>









<li class="md-nav__item">
<a href="/stac-geoparquet/latest/drawbacks/" class="md-nav__link">


<span class="md-ellipsis">
Drawbacks
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
75 changes: 69 additions & 6 deletions 0.5.1/api/arrow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,26 @@



<li class="md-nav__item">
<a href="../../schema/" class="md-nav__link">


<span class="md-ellipsis">
Schema considerations
</span>


</a>
</li>









<li class="md-nav__item">
<a href="../../spec/stac-geoparquet-spec/" class="md-nav__link">

Expand Down Expand Up @@ -372,17 +392,19 @@








<li class="md-nav__item md-nav__item--active md-nav__item--nested">



<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" checked>
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" checked>


<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">


<span class="md-ellipsis">
Expand All @@ -393,8 +415,8 @@
<span class="md-nav__icon md-icon"></span>
</label>

<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_4">
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
API Reference
</label>
Expand Down Expand Up @@ -587,13 +609,54 @@









<li class="md-nav__item">
<a href="../pgstac/" class="md-nav__link">


<span class="md-ellipsis">
pgstac integration
</span>


</a>
</li>




</ul>
</nav>

</li>









<li class="md-nav__item">
<a href="../../drawbacks/" class="md-nav__link">


<span class="md-ellipsis">
Drawbacks
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down Expand Up @@ -849,7 +912,7 @@ <h3 id="stac_geoparquet.arrow.parse_stac_items_to_arrow" class="doc doc-heading"

<a href="#stac_geoparquet.arrow.parse_stac_items_to_arrow" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="doc-signature codehilite"><pre><span></span><code><span class="nf">parse_stac_items_to_arrow</span><span class="p">(</span>
<span class="n">items</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="typing.Iterable" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#dict">dict</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]],</span>
<span class="n">items</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="typing.Iterable" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" title="pystac.Item" href="https://pystac.readthedocs.io/en/stable/api/pystac.html#pystac.Item">Item</a></span> <span class="o">|</span> <span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#dict">dict</a></span><span class="p">[</span><span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a></span><span class="p">,</span> <span class="n"><a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a></span><span class="p">]],</span>
<span class="o">*</span><span class="p">,</span>
<span class="n">chunk_size</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" href="https://docs.python.org/3/library/functions.html#int">int</a></span> <span class="o">=</span> <span class="mi">8192</span><span class="p">,</span>
<span class="n">schema</span><span class="p">:</span> <span class="n"><a class="autorefs autorefs-external" title="pyarrow.Schema" href="https://arrow.apache.org/docs/python/generated/pyarrow.Schema.html#pyarrow.Schema">Schema</a></span> <span class="o">|</span> <span class="n"><span title="stac_geoparquet.arrow._schema.models.InferredSchema">InferredSchema</span></span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span>
Expand All @@ -869,7 +932,7 @@ <h3 id="stac_geoparquet.arrow.parse_stac_items_to_arrow" class="doc doc-heading"
<ul>
<li class="doc-section-item field-body">
<b><code>items</code></b>
(<code><a class="autorefs autorefs-external" title="typing.Iterable" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#dict">dict</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, <a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]]</code>)
(<code><a class="autorefs autorefs-external" title="typing.Iterable" href="https://docs.python.org/3/library/typing.html#typing.Iterable">Iterable</a>[<a class="autorefs autorefs-external" title="pystac.Item" href="https://pystac.readthedocs.io/en/stable/api/pystac.html#pystac.Item">Item</a> | <a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#dict">dict</a>[<a class="autorefs autorefs-external" href="https://docs.python.org/3/library/stdtypes.html#str">str</a>, <a class="autorefs autorefs-external" title="typing.Any" href="https://docs.python.org/3/library/typing.html#typing.Any">Any</a>]]</code>)
<div class="doc-md-description">
<p>the STAC Items to convert</p>
Expand Down
87 changes: 83 additions & 4 deletions 0.5.1/api/legacy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<link rel="prev" href="../arrow/">


<link rel="next" href="../pgstac/">


<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.27">
Expand Down Expand Up @@ -341,6 +343,26 @@



<li class="md-nav__item">
<a href="../../schema/" class="md-nav__link">


<span class="md-ellipsis">
Schema considerations
</span>


</a>
</li>









<li class="md-nav__item">
<a href="../../spec/stac-geoparquet-spec/" class="md-nav__link">

Expand Down Expand Up @@ -370,17 +392,19 @@








<li class="md-nav__item md-nav__item--active md-nav__item--nested">



<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" checked>
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" checked>


<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">


<span class="md-ellipsis">
Expand All @@ -391,8 +415,8 @@
<span class="md-nav__icon md-icon"></span>
</label>

<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_4">
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
API Reference
</label>
Expand Down Expand Up @@ -507,13 +531,54 @@









<li class="md-nav__item">
<a href="../pgstac/" class="md-nav__link">


<span class="md-ellipsis">
pgstac integration
</span>


</a>
</li>




</ul>
</nav>

</li>









<li class="md-nav__item">
<a href="../../drawbacks/" class="md-nav__link">


<span class="md-ellipsis">
Drawbacks
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down Expand Up @@ -587,6 +652,20 @@

<h1 id="direct-geopandas-conversion-legacy">Direct GeoPandas conversion (Legacy)<a class="headerlink" href="#direct-geopandas-conversion-legacy" title="Permanent link">&para;</a></h1>
<p>The API listed here was the initial non-Arrow-based STAC-GeoParquet implementation, converting between JSON and GeoPandas directly. For large collections of STAC items, using the new Arrow-based functionality (under the <code>stac_geoparquet.arrow</code> namespace) will be more performant.</p>
<p>Note that <code>stac_geoparquet</code> lifts the keys in the item <code>properties</code> up to the top level of the DataFrame, similar to <code>geopandas.GeoDataFrame.from_features</code>.</p>
<div class="highlight"><pre><span></span><code><span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">requests</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">stac_geoparquet.arrow</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">pyarrow.parquet</span>
<span class="o">&gt;&gt;&gt;</span> <span class="kn">import</span> <span class="nn">pyarrow</span> <span class="k">as</span> <span class="nn">pa</span>

<span class="o">&gt;&gt;&gt;</span> <span class="n">items</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
<span class="o">...</span> <span class="s2">&quot;https://planetarycomputer.microsoft.com/api/stac/v1/collections/sentinel-2-l2a/items&quot;</span>
<span class="o">...</span> <span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()[</span><span class="s2">&quot;features&quot;</span><span class="p">]</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">table</span> <span class="o">=</span> <span class="n">pa</span><span class="o">.</span><span class="n">Table</span><span class="o">.</span><span class="n">from_batches</span><span class="p">(</span><span class="n">stac_geoparquet</span><span class="o">.</span><span class="n">arrow</span><span class="o">.</span><span class="n">parse_stac_items_to_arrow</span><span class="p">(</span><span class="n">items</span><span class="p">))</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">stac_geoparquet</span><span class="o">.</span><span class="n">arrow</span><span class="o">.</span><span class="n">to_parquet</span><span class="p">(</span><span class="n">table</span><span class="p">,</span> <span class="s2">&quot;items.parquet&quot;</span><span class="p">)</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">table2</span> <span class="o">=</span> <span class="n">pyarrow</span><span class="o">.</span><span class="n">parquet</span><span class="o">.</span><span class="n">read_table</span><span class="p">(</span><span class="s2">&quot;items.parquet&quot;</span><span class="p">)</span>
<span class="o">&gt;&gt;&gt;</span> <span class="n">items2</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">stac_geoparquet</span><span class="o">.</span><span class="n">arrow</span><span class="o">.</span><span class="n">stac_table_to_items</span><span class="p">(</span><span class="n">table2</span><span class="p">))</span>
</code></pre></div>


<div class="doc doc-object doc-function">
Expand Down
Loading

0 comments on commit d8dddc7

Please sign in to comment.