Mercurial > repos > bgruening > 3dtrees_standardization
comparison standard.xml @ 1:6524ef47a755 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/3Dtrees_standardization commit a46a7cd9cef25a6d34bcc268ba72d8afebfdf8c6
| author | bgruening |
|---|---|
| date | Tue, 13 Jan 2026 07:41:37 +0000 |
| parents | e78c8c5ea3df |
| children |
comparison
equal
deleted
inserted
replaced
| 0:e78c8c5ea3df | 1:6524ef47a755 |
|---|---|
| 1 <tool id="3dtrees_standardization" name="3Dtrees: LAZ Standardization" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2"> | 1 <tool id="3dtrees_standardization" name="3DTrees: LAS/LAZ Standardization" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2"> |
| 2 <description> | 2 <description>Standardize LAS/LAZ files or validate collections for consistency</description> |
| 3 laz file checks and standardization. | |
| 4 </description> | |
| 5 <macros> | 3 <macros> |
| 6 <token name="@TOOL_VERSION@">1.0.1</token> | 4 <token name="@TOOL_VERSION@">1.1.0</token> |
| 7 <token name="@VERSION_SUFFIX@">0</token> | 5 <token name="@VERSION_SUFFIX@">0</token> |
| 8 </macros> | 6 </macros> |
| 9 <requirements> | 7 <requirements> |
| 10 <container type="docker">ghcr.io/3dtrees-earth/3dtrees-pc-standard:@TOOL_VERSION@</container> | 8 <container type="docker">ghcr.io/3dtrees-earth/3dtrees-pc-standard:@TOOL_VERSION@</container> |
| 11 </requirements> | 9 </requirements> |
| 12 <command detect_errors="exit_code"><![CDATA[ | 10 <command detect_errors="exit_code"><![CDATA[ |
| 13 ## needed because the Rscript is following symlinks | 11 #if $mode.task == 'single_file': |
| 14 cp '$input' /in/input.laz && | 12 cp '$mode.input' input.laz && |
| 15 cd /src && | 13 Rscript /src/run.R |
| 16 Rscript run.R | 14 --dataset-path ./input.laz |
| 17 --dataset-path /in/input.laz | 15 --output-dir ./ |
| 18 --output-dir . | 16 --method single_file |
| 19 --min-density | 17 --min-density '$mode.min_density' |
| 20 $min_density && | 18 #if $mode.removeable_attributes: |
| 21 mv /src/pc_standardized.laz '$pc_standardized' | 19 --removeable_attributes '$mode.removeable_attributes' |
| 22 ]]> | 20 #end if |
| 23 </command> | 21 #else: |
| 22 mkdir -p ./input_files && | |
| 23 #for $f in $mode.input_collection | |
| 24 cp '$f' ./input_files/'${f.element_identifier}.laz' && | |
| 25 #end for | |
| 26 Rscript /src/run.R | |
| 27 --dataset-path ./input_files/ | |
| 28 --output-dir ./ | |
| 29 --method collection | |
| 30 #end if | |
| 31 ]]></command> | |
| 32 | |
| 24 <inputs> | 33 <inputs> |
| 25 <param name="input" type="data" format="laz" label="Point Cloud Dataset" help="LAZ point cloud to process"/> | 34 <conditional name="mode"> |
| 26 <param name="min_density" type="integer" value="500" min="1" max="10000" label="Minimum Point Density (points/m²)" help="Minimum required point density in points per square meter. Default: 500 for TLS data. Use lower values (e.g., 10-50) for ALS data."/> | 35 <param name="task" type="select" label="Mode"> |
| 36 <option value="single_file">Single File Standardization</option> | |
| 37 <option value="collection">Collection Validation</option> | |
| 38 </param> | |
| 39 <when value="single_file"> | |
| 40 <param name="input" type="data" format="laz" label="Point Cloud File" | |
| 41 help="LAS/LAZ point cloud file to standardize (CRS validation, density check, format normalization)"/> | |
| 42 <param argument="--min-density" type="integer" min="1" max="10000" value="10" | |
| 43 label="Minimum Point Density" | |
| 44 help="Minimum acceptable point density in points per square meter. Default: 10 pts/m²"/> | |
| 45 <param argument="--removeable_attributes" type="text" value="" optional="true" | |
| 46 label="Attributes to Remove" | |
| 47 help="Space-separated list of attribute names to remove (e.g., 'Intensity UserData'). Leave empty for auto-detection."/> | |
| 48 </when> | |
| 49 <when value="collection"> | |
| 50 <param name="input_collection" type="data" format="laz" multiple="true" label="Point Cloud Collection" | |
| 51 help="Multiple LAZ/LAS files to validate for consistency (CRS homogeneity, attribute consistency, overlaps)"/> | |
| 52 </when> | |
| 53 </conditional> | |
| 27 </inputs> | 54 </inputs> |
| 28 <outputs> | 55 <outputs> |
| 29 <data name="pc_standardized" format="laz" label="Standardized Point Cloud"/> | 56 <data name="pc_standardized" format="laz" label="standardized" from_work_dir="input.laz"> |
| 57 <filter>mode['task'] == "single_file"</filter> | |
| 58 </data> | |
| 59 <data name="metadata_json" format="json" label="metadata" from_work_dir="input.json"> | |
| 60 <filter>mode['task'] == "single_file"</filter> | |
| 61 </data> | |
| 62 <data name="convex_hull" format="geojson" label="convex_hull" from_work_dir="input_convex_hull_wgs84.GeoJSON"> | |
| 63 <filter>mode['task'] == "single_file"</filter> | |
| 64 </data> | |
| 65 <data name="collection_summary" format="json" label="collection_summary" from_work_dir="collection_summary.json"> | |
| 66 <filter>mode['task'] == "collection"</filter> | |
| 67 </data> | |
| 30 </outputs> | 68 </outputs> |
| 31 <tests> | 69 <tests> |
| 32 <test> | 70 <test expect_num_outputs="3"> |
| 33 <param name="input" value="mikro.laz" ftype="laz"/> | 71 <conditional name="mode"> |
| 34 <param name="min_density" value="10"/> | 72 <param name="task" value="single_file"/> |
| 35 <output name="pc_standardized"> | 73 <param name="input" value="mikro.laz" ftype="laz"/> |
| 74 <param name="min_density" value="10"/> | |
| 75 </conditional> | |
| 76 <output name="pc_standardized" ftype="laz"> | |
| 36 <assert_contents> | 77 <assert_contents> |
| 37 <has_size value="100000" delta="50000"/> | 78 <has_size min="1000"/> |
| 79 </assert_contents> | |
| 80 </output> | |
| 81 <output name="convex_hull" ftype="geojson"> | |
| 82 <assert_contents> | |
| 83 <has_json_property_with_text property="type" text="FeatureCollection"/> | |
| 84 </assert_contents> | |
| 85 </output> | |
| 86 <output name="metadata_json" ftype="json"> | |
| 87 <assert_contents> | |
| 88 <has_text text='"point_count":[12917]'/> | |
| 89 <has_text text='"standardized":[true]'/> | |
| 90 </assert_contents> | |
| 91 </output> | |
| 92 </test> | |
| 93 <test expect_num_outputs="1"> | |
| 94 <conditional name="mode"> | |
| 95 <param name="task" value="collection"/> | |
| 96 <param name="input_collection" value="mikro.laz,mikro2.laz" ftype="laz"/> | |
| 97 </conditional> | |
| 98 <output name="collection_summary" ftype="json"> | |
| 99 <assert_contents> | |
| 100 <has_json_property_with_value property="n_tiles" value="2"/> | |
| 101 <has_json_property_with_value property="homogeneous_crs" value="true"/> | |
| 102 <has_json_property_with_value property="homogeneous_attribute_names" value="true"/> | |
| 38 </assert_contents> | 103 </assert_contents> |
| 39 </output> | 104 </output> |
| 40 </test> | 105 </test> |
| 41 </tests> | 106 </tests> |
| 42 <help> | |
| 43 **What it does** | |
| 44 | 107 |
| 45 This tool performs a series of checks and standardizations on a LAS/LAZ point cloud file. It checks: | 108 <help><![CDATA[ |
| 109 **What it does** | |
| 46 | 110 |
| 47 1. **Basic LAS Validation** | 111 This tool supports two modes: |
| 48 - Validates the object using las_check() | |
| 49 - Ensures the file has at least 100 points | |
| 50 | 112 |
| 51 2. **Bounding Box Consistency** | 113 **Single File Mode** (standardization): |
| 52 - Updates header if bounding box doesn't match points | 114 Standardizes a single LAS/LAZ file: |
| 53 - Validates spatial extent (all dimensions > 1 meter) | |
| 54 - Checks Z range is plausible (-100 to 5500 meters) | |
| 55 | 115 |
| 56 3. **Point Density Check** | 116 1. **LAS Validation**: Runs ``las_check()`` and fixes header issues |
| 57 - Calculates point density using convex hull | 117 2. **Bounding Box**: Validates and corrects header bounding box |
| 58 - Requires minimum point density (configurable, default: 500 points/m² for TLS) | 118 3. **Point Density**: Checks density meets minimum threshold |
| 119 4. **CRS Validation**: Verifies CRS is defined and transformable to EPSG:4978 | |
| 120 5. **Land Check**: Confirms centroid is on land (using Natural Earth data) | |
| 121 6. **Format Normalization**: Downgrades Point Data Format to ≤7 for compatibility | |
| 122 7. **Attribute Cleanup**: Optionally removes specified attributes | |
| 59 | 123 |
| 60 4. **Extra Byte Data Type Check** | 124 **Outputs (single file mode):** |
| 61 - Validates extra byte attribute data types | 125 - Standardized ``.laz`` file |
| 62 - Corrects mismatches if found | 126 - Metadata JSON with pre/post standardization info |
| 127 - Convex hull GeoJSON in WGS84 | |
| 63 | 128 |
| 64 5. **CRS Validation** | 129 **Collection Mode** (validation): |
| 65 - Ensures CRS is specified | 130 Validates consistency of multiple LAS/LAZ files: |
| 66 - Validates transformation to EPSG:3857 | |
| 67 | 131 |
| 68 6. **Point Data Format Check** | 132 - **CRS Homogeneity**: Checks if all files share the same coordinate reference system |
| 69 - Downgrades format to 7 if necessary | 133 - **Attribute Consistency**: Verifies attribute names and types across files |
| 70 - Preserves NIR channel as extra attribute | 134 - **Tile Geometry**: Detects overlaps and gaps between tiles |
| 135 - **Global Statistics**: Computes aggregated statistics across all files | |
| 136 - **Removeable Attributes**: Identifies attributes that are all-NA or constant-zero | |
| 71 | 137 |
| 72 7. **Land Coverage Validation** | 138 **Outputs (collection mode):** |
| 73 - Validates centroid is on land using Natural Earth data | 139 - ``collection_summary.json`` containing collection-level checks and flags, per-file metadata (CRS, attributes, point counts, convex hulls), and suggested removeable attributes for standardization |
| 74 | 140 |
| 75 8. **Output Writing** | 141 **Workflow Usage** |
| 76 - Writes standardized LAZ file with Point Format ≤ 7 | 142 |
| 77 </help> | 143 For collection-based workflows: |
| 144 1. Run this tool with **Collection Validation** first to check consistency | |
| 145 2. Use the suggested ``removeable_attributes`` from the collection summary | |
| 146 3. Then run this tool with **Single File Standardization** (Galaxy maps over collection automatically) for standardization | |
| 147 | |
| 148 ]]></help> | |
| 149 | |
| 78 <creator> | 150 <creator> |
| 79 <person name="Julian Frey" email="julian.frey@wwd.uni-freiburg.de" url="https://orcid.org/0000-0001-7895-702X"/> | 151 <person name="Julian Frey" email="julian.frey@wwd.uni-freiburg.de" url="https://orcid.org/0000-0001-7895-702X"/> |
| 80 <person name="Janusch Vajna-Jehle" email="janusch.jehle@geosense.uni-freiburg.de" url="https://orcid.org/0009-0002-0034-9387"/> | 152 <person name="Janusch Vajna-Jehle" email="janusch.jehle@geosense.uni-freiburg.de" url="https://orcid.org/0009-0002-0034-9387"/> |
| 81 <person name="Kilian Gerberding" email="kilian.gerberding@geosense.uni-freiburg.de" url="https://orcid.org/0009-0002-5001-2571"/> | 153 <person name="Kilian Gerberding" email="kilian.gerberding@geosense.uni-freiburg.de" url="https://orcid.org/0009-0002-5001-2571"/> |
| 154 <person name="Mirko Mälicke" identifier="0000-0002-0424-2651"/> | |
| 82 <organization name="3Dtrees-Team, University of Freiburg" url="https://github.com/3dTrees-earth"/> | 155 <organization name="3Dtrees-Team, University of Freiburg" url="https://github.com/3dTrees-earth"/> |
| 83 </creator> | 156 </creator> |
| 157 | |
| 84 <citations> | 158 <citations> |
| 85 <citation type="bibtex"> | 159 <citation type="bibtex"> |
| 86 @misc{3dtrees_standard, title = {3D Trees Standardization}, author = {3D Trees Project}, year = {2025}} | 160 @misc{3dtrees_standard, title = {3D Trees Standardization}, author = {3D Trees Project}, year = {2025}} |
| 87 </citation> | 161 </citation> |
| 88 </citations> | 162 </citations> |
