diff --git a/tools/3dtrees_smart_tile/smart_tile.xml b/tools/3dtrees_smart_tile/smart_tile.xml index 2032924d0a..9a0fe65129 100644 --- a/tools/3dtrees_smart_tile/smart_tile.xml +++ b/tools/3dtrees_smart_tile/smart_tile.xml @@ -1,55 +1,42 @@ - Create COPC tiles, subsample outputs, filter border overlap, and remap prediction dimensions + Tiling, subsampling, remapping, merging, and prod-merged point-cloud products - 2.1.0 - 0 - - - - - - - - - - - - - - - - - ^[A-Za-z0-9 .,:_-]*$ - - - - - - - - - - - - - + 2.2 + 3 ghcr.io/3dtrees-earth/3dtrees_smart_tile:@TOOL_VERSION@ - - - - + + + + + + - - - - - - - - - - - - - - - - - ^[A-Za-z0-9 .,:_-]*$ + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + - + operation['task'] == "tile" - + - + operation['task'] == "tile" - + - - operation['task'] == "tile" - - - + operation['task'] == "tile" - + operation['task'] == "tile" - - - operation['task'] == "filter" - + + operation['task'] == "merge" + - + + operation['task'] == "merge" + + operation['task'] == "filter" - + - - - operation['task'] == "remap" or (operation['task'] == "filter" and operation['filter_mode']['mode'] == "filter_and_remap") + + operation['task'] == "remap" - - (operation['task'] == "remap" and operation['input_target_files']) or (operation['task'] == "filter" and operation['filter_mode']['mode'] == "filter_and_remap" and (str(operation['filter_mode']['remap_target_mode']['mode']) == "both" or str(operation['filter_mode']['remap_target_mode']['mode']) == "targets_only")) - + + (operation['task'] == "create_merged_file" or (operation['task'] == "remap" and operation['transfer_original_dims_to_merged']) or (operation['task'] == "merge" and operation['transfer_original_dims_to_merged'] and operation['input_original_laz'])) and ("laz" in operation['merged_output_formats'] or "copc.laz" in operation['merged_output_formats']) + + + + (operation['task'] == "create_merged_file" or (operation['task'] == "remap" and operation['transfer_original_dims_to_merged']) or (operation['task'] == "merge" and operation['transfer_original_dims_to_merged'] and operation['input_original_laz'])) and "ply" in operation['merged_output_formats'] + - - (operation['task'] == "remap" and str(operation['merged_output']['produce_merged_file']) == "True" and str(operation['merged_output']['merge_enrichment_mode']['transfer_original_dims_to_merged']) == "False") or (operation['task'] == "filter" and operation['filter_mode']['mode'] == "filter_and_remap" and str(operation['filter_mode']['merged_output']['produce_merged_file']) == "True" and str(operation['filter_mode']['merged_output']['merge_enrichment_mode']['transfer_original_dims_to_merged']) == "False") - - - (operation['task'] == "remap" and str(operation['merged_output']['produce_merged_file']) == "True" and str(operation['merged_output']['merge_enrichment_mode']['transfer_original_dims_to_merged']) == "True") or (operation['task'] == "filter" and operation['filter_mode']['mode'] == "filter_and_remap" and str(operation['filter_mode']['merged_output']['produce_merged_file']) == "True" and str(operation['filter_mode']['merged_output']['merge_enrichment_mode']['transfer_original_dims_to_merged']) == "True") - - + - + + - - - - + + + - + - + - + - - - - + + + + + - - - + + + + - - + + + + + + + - + + + - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + - -**SmartTile** covers three common steps when working with tiled point clouds and per-point predictions: - -1. **Tile**: normalize to COPC, create tiles, and write two subsampled outputs. -2. **Filter**: remove overlap-only/border-zone instances from segmented tiles (optionally followed by a remap). -3. **Remap**: transfer selected dimensions from segmented tiles back onto originals (and optionally onto a subsampled target set). - -**General tips** - -- For best matching, use filenames (element identifiers) that contain tile IDs like `c00_r01`. -- These inputs expect LAZ/LAS (and optional tree TXT). If your history/collection also contains mesh `.ply` files, keep them separate to avoid Galaxy format errors. -- The tool uses Galaxy slots for parallelism where available. -- `Chunk size (points)` is the main performance knob: larger chunks reduce overhead but may increase memory use. - -**Tile** - -- SmartTile first builds a COPC-normalized cache of your inputs while preserving all source dimensions. -- It then creates overlapping tiles and writes two subsampled output collections. -- `Reduce dimensions in subsampled outputs` only affects the subsampled outputs, not the internal COPC cache. -- `Write resolution 1 as COPC (.copc.laz)` only affects the first subsampled output collection (default: enabled). -- `Write resolution 2 as COPC (.copc.laz)` only affects the second subsampled output collection (default: disabled). + +`--num-spatial-chunks` defaults to Galaxy job slots. For large datasets, set Galaxy slots to the CPU budget you want SmartTile to use. +It controls subsampling windows, bounded prod-merged chunks, COPC remap windows, and single-file raw-original remap chunks. + ]]> - @misc{3dtrees_tile_merge, title = {3D Trees Tile and Merge Tool}, author = {3D Trees Project}, year = {2025}} + @misc{3dtrees_smart_tile, title = {3D Trees SmartTile Tool}, author = {3D Trees Project}, year = {2026}} diff --git a/tools/3dtrees_smart_tile/test-data/mikro.copc.laz b/tools/3dtrees_smart_tile/test-data/mikro.copc.laz new file mode 100644 index 0000000000..99f7420f9d Binary files /dev/null and b/tools/3dtrees_smart_tile/test-data/mikro.copc.laz differ diff --git a/tools/3dtrees_smart_tile/test-data/mikro.laz b/tools/3dtrees_smart_tile/test-data/mikro.laz new file mode 100644 index 0000000000..37743aacaf Binary files /dev/null and b/tools/3dtrees_smart_tile/test-data/mikro.laz differ diff --git a/tools/3dtrees_smart_tile/test-data/mikro_collection_summary.json b/tools/3dtrees_smart_tile/test-data/mikro_collection_summary.json new file mode 100644 index 0000000000..11bcbc1d60 --- /dev/null +++ b/tools/3dtrees_smart_tile/test-data/mikro_collection_summary.json @@ -0,0 +1,11 @@ +{ + "collection": { + "reference_attribute_names": ["X", "Y", "Z", "Intensity"], + "global_attribute_stats": [ + { + "name": "Intensity", + "variance": 1.0 + } + ] + } +} diff --git a/tools/3dtrees_smart_tile/test-data/mikro_prediction_collection.laz b/tools/3dtrees_smart_tile/test-data/mikro_prediction_collection.laz new file mode 100644 index 0000000000..51d8563710 Binary files /dev/null and b/tools/3dtrees_smart_tile/test-data/mikro_prediction_collection.laz differ diff --git a/tools/3dtrees_smart_tile/test-data/mikro_prediction_collection_fm.laz b/tools/3dtrees_smart_tile/test-data/mikro_prediction_collection_fm.laz new file mode 100644 index 0000000000..261f409e3c Binary files /dev/null and b/tools/3dtrees_smart_tile/test-data/mikro_prediction_collection_fm.laz differ diff --git a/tools/3dtrees_smart_tile/test-data/mikro_res1.laz b/tools/3dtrees_smart_tile/test-data/mikro_res1.laz new file mode 100644 index 0000000000..7e30d1eaa0 Binary files /dev/null and b/tools/3dtrees_smart_tile/test-data/mikro_res1.laz differ diff --git a/tools/3dtrees_smart_tile/test-data/mikro_segmented.laz b/tools/3dtrees_smart_tile/test-data/mikro_segmented.laz new file mode 100644 index 0000000000..82bd6c5c7f Binary files /dev/null and b/tools/3dtrees_smart_tile/test-data/mikro_segmented.laz differ