Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ad088c9
WIP changing time slot/timestamp interactions with database
kylemann16 Jun 18, 2025
c876633
commiting before attempting to switch up config writing
kylemann16 Jun 19, 2025
555223d
fixing tests
kylemann16 Jun 24, 2025
80c703f
removing commented out code
kylemann16 Jun 24, 2025
4bbbc54
wip
kylemann16 Jun 24, 2025
360980d
wip dense arrays with new tiledb setup
kylemann16 Jul 1, 2025
0d7c0b9
changes to cli to better accept list of attributes and cover grid_met…
kylemann16 Jul 1, 2025
41f625a
wip
kylemann16 Jul 7, 2025
d99e88d
wip, pushing so we can access from pip install
kylemann16 Aug 8, 2025
71001a2
wip, adding other consolidation modes
kylemann16 Aug 20, 2025
5259955
adding vacuuming to its own function in storage
kylemann16 Aug 20, 2025
3e97ecc
moving around consolidation
kylemann16 Aug 20, 2025
38be163
lower consolidation increment
kylemann16 Aug 21, 2025
250bf6a
removing an unnecessary mutex
kylemann16 Aug 21, 2025
9dd744e
wip
kylemann16 Aug 22, 2025
1914731
changing to hilbert ordering and adding sort=False for groupby usage …
kylemann16 Aug 27, 2025
374a0c6
pushing consolidation to client queue
kylemann16 Aug 28, 2025
cc33818
changing consolidation to fire_and_forget
kylemann16 Aug 28, 2025
546587d
moving around usage of dask, attempting to speed up some long running…
kylemann16 Sep 4, 2025
26c80c2
simplifying process, making small fixes
kylemann16 Sep 7, 2025
df21fb1
remove numba import
kylemann16 Sep 8, 2025
0dc171b
tweaks
kylemann16 Sep 8, 2025
d885392
intermediate commit
kylemann16 Sep 9, 2025
a28a5d7
trying new chunking methods
kylemann16 Sep 10, 2025
3c29aed
fixing empty list bug
kylemann16 Sep 10, 2025
9e83cd3
fixing empty write bug
kylemann16 Sep 10, 2025
b9f8b46
fixing chunking
kylemann16 Sep 10, 2025
0a6d382
lowering consolidation to 300MB
kylemann16 Sep 11, 2025
fea27bb
made timestamp usage more consistent, fixed grid metrics to use copies,
kylemann16 Sep 12, 2025
4e2b6a9
consolidate in a dask task
kylemann16 Sep 12, 2025
603090c
pinning pdal python version
kylemann16 Sep 13, 2025
bc5411e
removing duplicates
kylemann16 Sep 23, 2025
65c28e8
dense working
kylemann16 Sep 24, 2025
c654ed3
wip, stopping dense testing because we can't do deletions
kylemann16 Sep 25, 2025
dc57306
adjusting tests now that we're no longer accepting duplicates in storage
kylemann16 Sep 25, 2025
f231dde
change tdb_dir to storage parameter in info so we don't remake a stor…
kylemann16 Sep 26, 2025
6412b60
moving extraction to use latest input for arrays with duplicate values
kylemann16 Oct 1, 2025
e28fd35
Merge commit 'dc5730642b11c33662bb9f87bd6f7b9c17faa338' into test_merge
kylemann16 Oct 14, 2025
bfeb8bc
dense storage largely working. removing delete still in progress
kylemann16 Oct 22, 2025
44f546c
Merge branch 'test_merge' into big_test_dense
kylemann16 Oct 23, 2025
532f7f3
update gitignore to include vscode workspace files
kylemann16 Oct 23, 2025
adf0951
delete feature working as well as it can
kylemann16 Oct 23, 2025
ea58feb
committing before dim changeup
kylemann16 Oct 23, 2025
74ad9bd
dense working with configs, shatter, commands, extract, info
kylemann16 Oct 29, 2025
f89c509
cli and tests happy with dense changes and move to date attributes
kylemann16 Oct 29, 2025
3c1fd35
getting rid of allowed dims for now
kylemann16 Oct 30, 2025
211ac87
removing vacuum after every extent, fixing index error from pdal pyth…
kylemann16 Oct 30, 2025
9fd255d
wip
kylemann16 Nov 3, 2025
d8a91e0
wip
kylemann16 Nov 6, 2025
6d46ae3
updating environment to latest tiledb for mem fix
kylemann16 Nov 7, 2025
6dcce26
fixing env usage
kylemann16 Nov 7, 2025
43328ab
env update
kylemann16 Nov 7, 2025
e118bba
debugged tiledb and bad access problems
kylemann16 Nov 11, 2025
7e00f84
wip
kylemann16 Nov 13, 2025
1282ec6
demo changes for tiling according to tiledb accurately
kylemann16 Nov 13, 2025
287dacc
move deletion to overwriting mode
kylemann16 Nov 18, 2025
79dcc10
tests working again
kylemann16 Nov 18, 2025
54ce4a5
linting and test updates
kylemann16 Nov 18, 2025
ed7a9d6
fixing missing file path and linting
kylemann16 Nov 20, 2025
c7e05d9
fix method usage in test_remote_creation
kylemann16 Nov 20, 2025
01d415a
removing itertools.batched for now so that sm works with python3.11
kylemann16 Nov 21, 2025
3c445c0
using np.isclose to better compare floats
kylemann16 Dec 16, 2025
5959501
pin jupyter-book to <2.0.0
kylemann16 Dec 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.11', '3.12', '3.13']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ autzen-aligned.tdb/
.DS_Store

docs/source/conf.py
*.code-workspace
2 changes: 1 addition & 1 deletion docs/doc-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ channels:
- conda-forge

dependencies:
- jupyter-book
- jupyter-book<2.0.0
- sphinx > 6
- sphinx-notfound-page
- python>=3.10, <3.13
Expand Down
15 changes: 9 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: silvimetric
name: pdal-sm
channels:
- conda-forge
dependencies:
- python>=3.10, <3.13
- python>=3.11, <3.14
- pip
- tiledb-py>=0.32.5
- pdal
- cloudpickle>=3.1.2
- boto3
- tiledb>=2.29.2
- tiledb-py>=0.35.2
- libpdal-core>=2.9.2
- python-pdal
- numpy
- shapely
- dask>=2024.11.2
- pyproj
- gdal
Expand All @@ -17,4 +19,5 @@ dependencies:
- python-json-logger
- dill
- pandas
- typing_extensions
- typing_extensions
- fast-histogram
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ max-line-length = 80
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"**/{tests,docs,tools}/*" = ["E402"]
"**/{tests}/*" = ["D101"]

[tool.setuptools]
package-dir = {"" = "src"}
Expand Down
68 changes: 32 additions & 36 deletions src/silvimetric/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
@click.option(
'--log-dir', default=None, help='Directory for log output', type=str
)
@click.option(
'--progress', is_flag=True, default=True, type=bool, help='Report progress'
)
@click.option('--workers', type=int, help='Number of workers for Dask')
@click.option(
'--threads', type=int, help='Number of threads per worker for Dask'
Expand Down Expand Up @@ -66,7 +63,6 @@ def cli(
database,
debug,
log_dir,
progress,
dasktype,
scheduler,
workers,
Expand All @@ -88,7 +84,6 @@ def cli(
tdb_dir=database,
log=log,
debug=debug,
progress=progress,
scheduler=scheduler,
dasktype=dasktype,
workers=workers,
Expand Down Expand Up @@ -155,12 +150,15 @@ def info_cmd(

start_date = dates[0] if dates else date
end_date = dates[1] if dates else date
if start_date is None and end_date is None:
info_dates=None
else:
info_dates = tuple(start_date, end_date)

i = info.info(
app.tdb_dir,
bounds=bounds,
start_time=start_date,
end_time=end_date,
dates = info_dates,
name=name,
concise=True,
)
Expand All @@ -175,7 +173,6 @@ def info_cmd(
]

i['metadata'].pop('metrics')
# print(metrics.keys())
if any([history, metadata, attributes, metrics]):
filtered = {}
if history:
Expand All @@ -187,10 +184,10 @@ def info_cmd(
if metrics:
filtered['metrics'] = ms

app.log.info(json.dumps(filtered, indent=2))
print(json.dumps(filtered, indent=2))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we not capturing to a redirectable log?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logging function makes using things like jq impossible since it prepends some boilerplate to stdout


else:
app.log.info(json.dumps(i, indent=2))
print(json.dumps(i, indent=2))
return


Expand All @@ -199,13 +196,6 @@ def info_cmd(
@click.option(
'--resolution', type=float, default=100, help='Summary pixel resolution'
)
@click.option(
'--filter_empty',
is_flag=True,
type=bool,
default=False,
help='Remove empty space in computation. Will take extra time.',
)
@click.option(
'--point_count', type=int, default=600000, help='Point count threshold.'
)
Expand All @@ -215,7 +205,7 @@ def info_cmd(
)
@click.pass_obj
def scan_cmd(
app, resolution, point_count, pointcloud, bounds, depth, filter_empty
app, resolution, point_count, pointcloud, bounds, depth
):
"""Scan point cloud, output information on it, and determine the optimal
tile size."""
Expand All @@ -233,7 +223,6 @@ def scan_cmd(
point_count,
resolution,
depth,
filter_empty,
log=app.log,
)

Expand All @@ -254,9 +243,9 @@ def scan_cmd(
@click.option(
'--attributes',
'-a',
multiple=True,
type=AttrParamType(),
help='List of attributes to include in Database',
default=[],
help='List of attributes to include in Database, eg. -a Z,Intensity',
)
@click.option(
'--metrics',
Expand All @@ -268,6 +257,12 @@ def scan_cmd(
@click.option(
'--resolution', type=float, default=30.0, help='Summary pixel resolution'
)
@click.option(
'--xsize', type=float, default=1000, help='TileDB X Tile size.'
)
@click.option(
'--ysize', type=float, default=1000, help='TileDB Y Tile size.'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update help text to tell us size in what units

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually a question I meant to ask you about, since these are not referencing units, but the number of cells in X/Y direction to make up a TileDB Tile Extent. I know x/ysize is a bit overloaded, but didn't know what else to call it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's really a pixel size, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's a TileDB Space Tile for a dense array. Essentially tells TileDB what the size of a working unit is, and tells SilviMetric how to split stuff up for more efficient TileDB IO

)
@click.option(
'--alignment',
type=str,
Expand All @@ -283,6 +278,8 @@ def initialize_cmd(
resolution: float,
metrics: list[Metric],
alignment: str,
xsize: int,
ysize: int
):
"""Initialize silvimetrics DATABASE"""

Expand All @@ -295,6 +292,8 @@ def initialize_cmd(
metrics=metrics,
resolution=resolution,
alignment=alignment,
xsize=xsize,
ysize=ysize
)
return initialize.initialize(storageconfig)

Expand Down Expand Up @@ -376,7 +375,7 @@ def shatter_cmd(app, pointcloud, bounds, report, tilesize, date, dates):
report_path = f'reports/{config.name}.html'
with performance_report(report_path):
shatter.shatter(config)
print(f'Writing report to {report_path}.')
app.log.debug(f'Writing report to {report_path}.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last time we were changing app.log.debug -> print...

else:
shatter.shatter(config)

Expand All @@ -385,10 +384,9 @@ def shatter_cmd(app, pointcloud, bounds, report, tilesize, date, dates):
@click.option(
'--attributes',
'-a',
multiple=True,
type=AttrParamType(),
default=[],
help='List of attributes to include output',
help='List of attributes to include output, eg -a Z,Intensity',
)
@click.option(
'--metrics',
Expand All @@ -414,15 +412,13 @@ def shatter_cmd(app, pointcloud, bounds, report, tilesize, date, dates):
def extract_cmd(app, attributes, metrics, outdir, bounds):
"""Extract silvimetric metrics from DATABASE"""

# TODO only allow metrics and attributes to be added if they're present
# in the storage config.
# dask_handle(
# app.dasktype,
# app.scheduler,
# app.workers,
# app.threads,
# app.watch,
# )
dask_handle(
app.dasktype,
app.scheduler,
app.workers,
app.threads,
app.watch,
)

config = ExtractConfig(
tdb_dir=app.tdb_dir,
Expand All @@ -445,7 +441,7 @@ def extract_cmd(app, attributes, metrics, outdir, bounds):
)
@click.pass_obj
def delete_cmd(app, task_id):
manage.delete(tdb_dir=app.tdb_dir, name=task_id, log=app.log)
manage.delete(storage=app.tdb_dir, name=task_id, log=app.log)


@cli.command('restart')
Expand All @@ -458,7 +454,7 @@ def delete_cmd(app, task_id):
)
@click.pass_obj
def restart_cmd(app, task_id):
manage.restart(tdb_dir=app.tdb_dir, name=task_id, log=app.log)
manage.restart(storage=app.tdb_dir, name=task_id, log=app.log)


@cli.command('resume')
Expand All @@ -471,7 +467,7 @@ def restart_cmd(app, task_id):
)
@click.pass_obj
def resume_cmd(app, task_id):
manage.resume(tdb_dir=app.tdb_dir, name=task_id, log=app.log)
manage.resume(storage=app.tdb_dir, name=task_id, log=app.log)


if __name__ == '__main__':
Expand Down
Loading
Loading