Skip to content

Commit

Permalink
Update df to newest branches
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemann16 committed Apr 27, 2024
2 parents e407f20 + 47876eb commit bff4872
Show file tree
Hide file tree
Showing 68 changed files with 1,974 additions and 796 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ __pycache__/
build/
dist/
stats/
*.html
.env

*.html
**/html/**
**/_build/**

#tiledb
**/__fragments/**
**/__commits/**
Expand Down
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
## SilviMetric


SilviMetric is an open source library and set of command line utilities for extracting point cloud metrics
into a TileDB database. See https://silvimetric.com for documentation and tutorials.
SilviMetric is an open source library and set of command line utilities for extracting point cloud metrics into a TileDB database. See https://silvimetric.com for documentation and tutorials.

[<img src="https://github.com/hobuinc/silvimetric/blob/main/docs/source/logo/Logos/PNG/SilviMeteric_Logo_2c.png?raw=true">](https://silvimetric.com/)

### Development

GitHub hosts the project at https://github.com/hobuinc/silvimetric


### Installation
These scripts will install `Silvimetric` dependencies as python libraries to the conda environment silvimetric.

`Silvimetric` requires that we install some packages from `conda` (`TileDB`, and `PDAL`) so it's usually easier to use only `conda` to handle your environment. If this is unavailable to you, you will need to install `TileDB` and `PDAL` from source before installing the python packages that are dependent on those (`python-pdal` and `tiledb-py`).

##### Pip and Conda

```
conda env create -f https://raw.githubusercontent.com/hobuinc/silvimetric/main/environment.yml
conda activate silvimetric
pip install silvimetric
```

##### Source

```
git clone https://github.com/hobuinc/silvimetric.git && cd silvimetric
conda env create -f environment.yml && conda activate silvimetric
pip install .
# To install for development:
# pip install -e .
```
4 changes: 4 additions & 0 deletions docs/create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# This assumes you've already done pip install -r requirements.txt in docs dir
python -m sphinx -T -b html -d _build/doctrees -D language=en source html
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ sphinxcontrib-bibtex
sphinx-rtd-theme
sphinxcontrib-spelling
sphinx-notfound-page
numpy
tiledb
dask
.
4 changes: 4 additions & 0 deletions docs/source/api/commands/delete.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Delete
======

.. autofunction:: silvimetric.commands.manage.delete
7 changes: 7 additions & 0 deletions docs/source/api/commands/extract.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extract
=============================

.. automodule:: silvimetric.commands.extract
:members:
:undoc-members:
:show-inheritance:
11 changes: 11 additions & 0 deletions docs/source/api/commands/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. toctree::
:maxdepth: 1

initialize
scan
shatter
info
extract
delete
resume
restart
7 changes: 7 additions & 0 deletions docs/source/api/commands/info.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Info
===========================

.. automodule:: silvimetric.commands.info
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/commands/initialize.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Initialize
========================

.. automodule:: silvimetric.commands.initialize
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions docs/source/api/commands/restart.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Restart
=======

.. autofunction:: silvimetric.commands.manage.restart
4 changes: 4 additions & 0 deletions docs/source/api/commands/resume.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Resume
======

.. autofunction:: silvimetric.commands.manage.resume
7 changes: 7 additions & 0 deletions docs/source/api/commands/scan.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Scan
===========================

.. automodule:: silvimetric.commands.scan
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/api/commands/shatter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Shatter
============================

.. automodule:: silvimetric.commands.shatter
:members:
:undoc-members:
:show-inheritance:
18 changes: 15 additions & 3 deletions docs/source/api.rst → docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
API
================================================================================

.. autosummary::
:toctree: generated

silvimetric
Resources
---------

.. toctree::
:maxdepth: 1

resources/index

Commands
--------

.. toctree::
:maxdepth: 1

commands/index
6 changes: 6 additions & 0 deletions docs/source/api/resources/bounds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bounds
==========================

.. automodule:: silvimetric.resources.bounds
:members:
:undoc-members:
5 changes: 5 additions & 0 deletions docs/source/api/resources/config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Config
==============================

.. automodule:: silvimetric.resources.config
:members:
7 changes: 7 additions & 0 deletions docs/source/api/resources/data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Data
=====================

.. automodule:: silvimetric.resources.data
:members:
:undoc-members:
:show-inheritance:
14 changes: 14 additions & 0 deletions docs/source/api/resources/entry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Entry
----------------------------------

.. autoclass:: silvimetric.resources.entry.Entry

Attribute
----------------------------------

.. autoclass:: silvimetric.resources.entry.Attribute

Metric
----------------------------------

.. autoclass:: silvimetric.resources.metric.Metric
5 changes: 5 additions & 0 deletions docs/source/api/resources/extents.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Extents
============================

.. autoclass:: silvimetric.resources.extents.Extents
:members:
10 changes: 10 additions & 0 deletions docs/source/api/resources/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. toctree::
:maxdepth: 1

config
bounds
data
log
storage
entry
extents
7 changes: 7 additions & 0 deletions docs/source/api/resources/log.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Log
======================

.. automodule:: silvimetric.resources.log
:members:
:undoc-members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/api/resources/storage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Storage
------------------------------------

.. automodule:: silvimetric.resources.storage
:members:
:undoc-members:
16 changes: 11 additions & 5 deletions docs/source/cli/extract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,22 @@ Synopsis

.. code-block::
Usage: silvimetric DATABASE extract [OPTIONS]
Usage: silvimetric [OPTIONS] extract [OPTIONS]
Extract silvimetric metrics from DATABASE
Options:
-a, --attributes ATTRS List of attributes to include in Database
-m, --metrics METRICS List of metrics to include in Database
--bounds BOUNDS
-o, --outdir TEXT [required]
-a, --attributes ATTRS List of attributes to include output
-m, --metrics METRICS List of metrics to include in output
--bounds BOUNDS Bounds for data to include in output
-o, --outdir PATH Output directory. [required]
--help Show this message and exit.
Example
-------

.. code-block::
silvimetric -d test.tdb extract -o test_tifs/
.. include:: ../substitutions.txt
38 changes: 37 additions & 1 deletion docs/source/cli/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,44 @@
Command Line Interface
================================================================================


.. only:: html

The command line interface (CLI) will facilitate your interaction with
Silvimetric from the terminal.

.. code-block::
Usage: silvimetric [OPTIONS] COMMAND [ARGS]...
Options:
-d, --database PATH Database path
--debug Changes logging level from INFO to DEBUG.
--log-dir TEXT Directory for log output
--progress BOOLEAN Report progress
--workers INTEGER Number of workers for Dask
--threads INTEGER Number of threads per worker for Dask
--watch Open dask diagnostic page in default web
browser.
--dasktype [threads|processes] What Dask uses for parallelization. For
moreinformation see here https://docs.dask.o
rg/en/stable/scheduling.html#local-threads
--scheduler [distributed|local|single-threaded]
Type of dask scheduler. Both are local, but
are run with different dask libraries. See
more here https://docs.dask.org/en/stable/sc
heduling.html.
--help Show this message and exit.
Commands:
extract Extract silvimetric metrics from DATABASE
info Retrieve information on current state of DATABASE
initialize Create an empty DATABASE
scan Scan point cloud and determine the optimal tile size.
shatter Shatter point clouds into DATABASE cells.
.. toctree::
:maxdepth: 2
:maxdepth: 1
:caption: Commands

extract
Expand Down
22 changes: 18 additions & 4 deletions docs/source/cli/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ info

.. only:: html

Info provides detailed information about a SilviMetrics database
Info will query the database and output information about the `Shatter`
processes that been run as well as the database schema.

.. Index:: info

Expand All @@ -16,13 +17,26 @@ Synopsis

.. code-block::
Usage: silvimetric DATABASE info [OPTIONS]
Usage: silvimetric [OPTIONS] info [OPTIONS]
Print info about Silvimetric database
Options:
--history
--help Show this message and exit.
--bounds BOUNDS Bounds to filter by
--date [%Y-%m-%d|%Y-%m-%dT%H:%M:%SZ]
Select processes with this date
--history Show the history section of the output.
--metadata Show the metadata section of the output.
--attributes Show the attributes section of the output.
--dates <DATETIME DATETIME>... Select processes within this date range
--name TEXT Select processes with this name
--help Show this message and exit.
Example
-------

.. code-block::
silvimetric -d test.tdb info
.. include:: ../substitutions.txt
13 changes: 12 additions & 1 deletion docs/source/cli/initialize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,26 @@ Synopsis

.. code-block::
Usage: silvimetric DATABASE initialize [OPTIONS] BOUNDS CRS
Usage: silvimetric [OPTIONS] initialize [OPTIONS]
Initialize silvimetrics DATABASE
Options:
--bounds BOUNDS Root bounds that encapsulates all data [required]
--crs CRS Coordinate system of data [required]
-a, --attributes ATTRS List of attributes to include in Database
-m, --metrics METRICS List of metrics to include in Database
--resolution FLOAT Summary pixel resolution
--help Show this message and exit.
Example
-------

.. code-block::
silvimetric --database test.tdb initialize --crs "EPSG:3857" \
--bounds '[300, 300, 600, 600]'
.. include:: ../substitutions.txt
Loading

0 comments on commit bff4872

Please sign in to comment.