ign-lidar-hd 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. ign_lidar_hd-1.1.0/LICENSE +21 -0
  2. ign_lidar_hd-1.1.0/MANIFEST.in +6 -0
  3. ign_lidar_hd-1.1.0/PKG-INFO +587 -0
  4. ign_lidar_hd-1.1.0/README.md +543 -0
  5. ign_lidar_hd-1.1.0/ign_lidar/__init__.py +55 -0
  6. ign_lidar_hd-1.1.0/ign_lidar/architectural_styles.py +342 -0
  7. ign_lidar_hd-1.1.0/ign_lidar/classes.py +137 -0
  8. ign_lidar_hd-1.1.0/ign_lidar/cli.py +872 -0
  9. ign_lidar_hd-1.1.0/ign_lidar/config.py +327 -0
  10. ign_lidar_hd-1.1.0/ign_lidar/data/location_replacement_mapping.json +10 -0
  11. ign_lidar_hd-1.1.0/ign_lidar/downloader.py +639 -0
  12. ign_lidar_hd-1.1.0/ign_lidar/features.py +936 -0
  13. ign_lidar_hd-1.1.0/ign_lidar/features_gpu.py +407 -0
  14. ign_lidar_hd-1.1.0/ign_lidar/metadata.py +351 -0
  15. ign_lidar_hd-1.1.0/ign_lidar/processor.py +397 -0
  16. ign_lidar_hd-1.1.0/ign_lidar/qgis_converter.py +240 -0
  17. ign_lidar_hd-1.1.0/ign_lidar/strategic_locations.py +960 -0
  18. ign_lidar_hd-1.1.0/ign_lidar/tile_list.py +763 -0
  19. ign_lidar_hd-1.1.0/ign_lidar/utils.py +189 -0
  20. ign_lidar_hd-1.1.0/ign_lidar_hd.egg-info/PKG-INFO +587 -0
  21. ign_lidar_hd-1.1.0/ign_lidar_hd.egg-info/SOURCES.txt +34 -0
  22. ign_lidar_hd-1.1.0/ign_lidar_hd.egg-info/dependency_links.txt +1 -0
  23. ign_lidar_hd-1.1.0/ign_lidar_hd.egg-info/entry_points.txt +3 -0
  24. ign_lidar_hd-1.1.0/ign_lidar_hd.egg-info/requires.txt +16 -0
  25. ign_lidar_hd-1.1.0/ign_lidar_hd.egg-info/top_level.txt +1 -0
  26. ign_lidar_hd-1.1.0/pyproject.toml +96 -0
  27. ign_lidar_hd-1.1.0/requirements.txt +15 -0
  28. ign_lidar_hd-1.1.0/setup.cfg +4 -0
  29. ign_lidar_hd-1.1.0/tests/test_building_features.py +309 -0
  30. ign_lidar_hd-1.1.0/tests/test_chunked_processing.py +59 -0
  31. ign_lidar_hd-1.1.0/tests/test_cli.py +74 -0
  32. ign_lidar_hd-1.1.0/tests/test_config_gpu.py +203 -0
  33. ign_lidar_hd-1.1.0/tests/test_configuration.py +117 -0
  34. ign_lidar_hd-1.1.0/tests/test_core.py +169 -0
  35. ign_lidar_hd-1.1.0/tests/test_features.py +102 -0
  36. ign_lidar_hd-1.1.0/tests/test_new_features.py +162 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 IGN LiDAR HD Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include ign_lidar *.json *.txt
5
+ recursive-exclude * __pycache__
6
+ recursive-exclude * *.py[co]
@@ -0,0 +1,587 @@
1
+ Metadata-Version: 2.4
2
+ Name: ign-lidar-hd
3
+ Version: 1.1.0
4
+ Summary: IGN LiDAR HD Dataset Processing Library for Building LOD Classification
5
+ Author-email: Simon Ducournau <simon.ducournau@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/sducournau/IGN_LIDAR_HD_DATASET
8
+ Project-URL: Repository, https://github.com/sducournau/IGN_LIDAR_HD_DATASET
9
+ Project-URL: Documentation, https://github.com/sducournau/IGN_LIDAR_HD_DATASET#readme
10
+ Project-URL: Issues, https://github.com/sducournau/IGN_LIDAR_HD_DATASET/issues
11
+ Keywords: lidar,ign,machine-learning,gis,building-classification
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Scientific/Engineering :: GIS
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Requires-Python: >=3.8
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: numpy>=1.21.0
29
+ Requires-Dist: laspy>=2.3.0
30
+ Requires-Dist: scikit-learn>=1.0.0
31
+ Requires-Dist: tqdm>=4.60.0
32
+ Requires-Dist: requests>=2.25.0
33
+ Requires-Dist: click>=8.0.0
34
+ Provides-Extra: dev
35
+ Requires-Dist: pytest>=6.0; extra == "dev"
36
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
37
+ Requires-Dist: black>=22.0; extra == "dev"
38
+ Requires-Dist: flake8>=4.0; extra == "dev"
39
+ Requires-Dist: mypy>=0.910; extra == "dev"
40
+ Requires-Dist: build>=0.7.0; extra == "dev"
41
+ Requires-Dist: twine>=4.0; extra == "dev"
42
+ Requires-Dist: pre-commit>=2.20; extra == "dev"
43
+ Dynamic: license-file
44
+
45
+ <div align="center">
46
+
47
+ # IGN LiDAR HD Processing Library
48
+
49
+ [![PyPI version](https://badge.fury.io/py/ign-lidar-hd.svg)](https://badge.fury.io/py/ign-lidar-hd)
50
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
51
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
52
+ [![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](tests/)
53
+
54
+ </div>
55
+ <img src="website/static/img/lod3.png" alt="LoD3 Building Model Icon">
56
+ A comprehensive Python library for processing IGN (Institut National de l'Information Géographique et Forestière) LiDAR HD data into machine learning-ready datasets for Building Level of Detail (LOD) classification tasks.
57
+
58
+ ## πŸ“Ί Video Demo
59
+
60
+ [![IGN LiDAR HD Processing Demo](https://img.youtube.com/vi/ksBWEhkVqQI/maxresdefault.jpg)](https://youtu.be/ksBWEhkVqQI)
61
+
62
+ **[▢️ Watch the Demo Video](https://youtu.be/ksBWEhkVqQI)** - Learn how to process LiDAR data for machine learning applications
63
+
64
+ ## πŸ“Š Project Overview
65
+
66
+ This library transforms raw IGN LiDAR HD point clouds into structured datasets ready for machine learning applications. Built specifically for building classification tasks, it handles the complete pipeline from data acquisition to training-ready patches.
67
+
68
+ ### πŸ”„ **Processing Workflow**
69
+
70
+ ```mermaid
71
+ flowchart TD
72
+ A[IGN LiDAR HD Data] --> B[Download Tiles]
73
+ B --> C[Enrich with Features]
74
+ C --> D[Create Training Patches]
75
+ D --> E[ML-Ready Dataset]
76
+
77
+ B --> B1[Smart Skip Detection]
78
+ C --> C1[GPU/CPU Processing]
79
+ C --> C2[Geometric Features]
80
+ D --> D1[Data Augmentation]
81
+ D --> D2[LOD Classification]
82
+
83
+ style A fill:#e1f5fe
84
+ style E fill:#e8f5e8
85
+ style B1 fill:#fff3e0
86
+ style C1 fill:#fff3e0
87
+ style D1 fill:#fff3e0
88
+ ```
89
+
90
+ **πŸ“ˆ Project Stats:**
91
+
92
+ - πŸ—οΈ **14 core modules** - Comprehensive processing toolkit
93
+ - πŸ“ **10 example scripts** - From basic usage to advanced workflows
94
+ - πŸ§ͺ **Comprehensive test suite** - Ensuring reliability and performance
95
+ - 🌍 **50+ curated tiles** - Covering diverse French territories
96
+ - ⚑ **GPU & CPU support** - Flexible computation backends
97
+ - πŸ”„ **Smart resumability** - Never reprocess existing data
98
+
99
+ ---
100
+
101
+ ## πŸš€ Quick Start
102
+
103
+ ### Installation
104
+
105
+ ```bash
106
+ pip install ign-lidar-hd
107
+ ```
108
+
109
+ ### Basic Usage
110
+
111
+ ```python
112
+ from ign_lidar import LiDARProcessor
113
+
114
+ # Initialize processor
115
+ processor = LiDARProcessor(lod_level="LOD2")
116
+
117
+ # Process a single tile
118
+ patches = processor.process_tile("data.laz", "output/")
119
+
120
+ # Process multiple files
121
+ patches = processor.process_directory("data/", "output/", num_workers=4)
122
+ ```
123
+
124
+ ### Command Line Interface
125
+
126
+ ```bash
127
+ # Download tiles
128
+ ign-lidar-process download --bbox -2.0,47.0,-1.0,48.0 --output tiles/ --max-tiles 10
129
+
130
+ # Enrich LAZ files with geometric features
131
+ ign-lidar-process enrich --input-dir tiles/ --output enriched/ --num-workers 4
132
+
133
+ # Enrich with GPU acceleration
134
+ ign-lidar-process enrich --input-dir tiles/ --output enriched/ --use-gpu
135
+
136
+ # Create training patches
137
+ ign-lidar-process process --input-dir enriched/ --output patches/ --lod-level LOD2
138
+
139
+ # Full pipeline example
140
+ ign-lidar-process download --bbox -2.0,47.0,-1.0,48.0 --output tiles/
141
+ ign-lidar-process enrich --input-dir tiles/ --output enriched/ --num-workers 4
142
+ ign-lidar-process process --input-dir enriched/ --output patches/ --lod-level LOD2
143
+ ```
144
+
145
+ ## πŸ“‹ Key Features
146
+
147
+ ### πŸ—οΈ **Core Processing Capabilities**
148
+
149
+ - **LiDAR-only processing**: Pure geometric analysis without RGB dependencies
150
+ - **Multi-level classification**: Support for LOD2 (15 classes) and LOD3 (30+ classes)
151
+ - **Rich feature extraction**: Surface normals, curvature, planarity, verticality, local density
152
+ - **Architectural style inference**: Automatic building style classification
153
+ - **Patch-based processing**: Configurable 150m Γ— 150m patches with overlap control
154
+
155
+ ### ⚑ **Performance & Optimization**
156
+
157
+ - **GPU acceleration**: CUDA-enabled feature computation for faster processing
158
+ - **Parallel processing**: Multi-worker support with automatic CPU core detection
159
+ - **Memory optimization**: Chunked processing for large datasets
160
+ - **Smart skip detection**: ⏭️ Automatically skip existing files and resume interrupted workflows
161
+ - **Batch operations**: Process hundreds of tiles efficiently
162
+
163
+ ### πŸ”§ **Workflow Automation**
164
+
165
+ - **Integrated downloader**: IGN WFS tile discovery and batch downloading
166
+ - **Format flexibility**: Choose between LAZ 1.4 (full features) or QGIS-compatible output
167
+ - **Data augmentation**: Rotation, jitter, scaling, and dropout for ML training
168
+ - **Unified CLI**: Single `ign-lidar-process` command with intuitive subcommands
169
+ - **Idempotent operations**: Safe to restart - never reprocesses existing data
170
+
171
+ ### 🌍 **Geographic Intelligence**
172
+
173
+ - **Strategic locations**: Pre-configured urban, coastal, and rural area processing
174
+ - **Bounding box filtering**: Spatial subsetting for targeted analysis
175
+ - **Coordinate system handling**: Automatic Lambert93 to WGS84 transformations
176
+ - **Tile management**: Curated collection of 50+ test tiles across France
177
+
178
+ ## πŸ—οΈ Library Architecture
179
+
180
+ ### 🎯 **Component Architecture**
181
+
182
+ ```mermaid
183
+ graph TB
184
+ subgraph "Core Processing"
185
+ P[processor.py<br/>πŸ”§ Main Engine]
186
+ F[features.py<br/>⚑ Feature Extraction]
187
+ GPU[features_gpu.py<br/>πŸ–₯️ GPU Acceleration]
188
+ end
189
+
190
+ subgraph "Data Management"
191
+ D[downloader.py<br/>πŸ“₯ IGN WFS Integration]
192
+ TL[tile_list.py<br/>πŸ“‚ Tile Management]
193
+ SL[strategic_locations.py<br/>�️ Geographic Zones]
194
+ MD[metadata.py<br/>πŸ“Š Dataset Metadata]
195
+ end
196
+
197
+ subgraph "Classification & Styles"
198
+ C[classes.py<br/>🏒 LOD2/LOD3 Schemas]
199
+ AS[architectural_styles.py<br/>🎨 Style Inference]
200
+ end
201
+
202
+ subgraph "Integration & Config"
203
+ CLI[cli.py<br/>πŸ–±οΈ Command Interface]
204
+ CFG[config.py<br/>βš™οΈ Configuration]
205
+ QGIS[qgis_converter.py<br/>πŸ”„ QGIS Compatibility]
206
+ U[utils.py<br/>πŸ› οΈ Core Utilities]
207
+ end
208
+
209
+ CLI --> P
210
+ CLI --> D
211
+ P --> F
212
+ P --> GPU
213
+ P --> C
214
+ F --> AS
215
+ D --> TL
216
+ D --> SL
217
+ P --> MD
218
+
219
+ style P fill:#e3f2fd
220
+ style F fill:#e8f5e8
221
+ style D fill:#fff3e0
222
+ style CLI fill:#f3e5f5
223
+ ```
224
+
225
+ ### πŸ“‹ **Module Responsibilities**
226
+
227
+ | Module | Purpose | Key Features |
228
+ | ---------------------------- | ---------------------- | ---------------------------------------------------------- |
229
+ | πŸ”§ `processor.py` | Main processing engine | Patch creation, LOD classification, workflow orchestration |
230
+ | πŸ“₯ `downloader.py` | IGN WFS integration | Tile discovery, batch download, smart skip detection |
231
+ | ⚑ `features.py` | Feature extraction | Normals, curvature, geometric properties |
232
+ | �️ `features_gpu.py` | GPU acceleration | CUDA-optimized feature computation |
233
+ | 🏒 `classes.py` | Classification schemas | LOD2/LOD3 building taxonomies |
234
+ | 🎨 `architectural_styles.py` | Style inference | Building architecture classification |
235
+
236
+ ### πŸ”„ **Example Workflows**
237
+
238
+ ```text
239
+ examples/
240
+ β”œβ”€β”€ πŸš€ basic_usage.py # Getting started
241
+ β”œβ”€β”€ πŸ™οΈ example_urban_simple.py # Urban processing
242
+ β”œβ”€β”€ ⚑ parallel_processing_example.py # Performance
243
+ β”œβ”€β”€ πŸ”„ full_workflow_example.py # End-to-end pipeline
244
+ β”œβ”€β”€ 🎨 multistyle_processing.py # Architecture analysis
245
+ β”œβ”€β”€ 🧠 pytorch_dataloader.py # ML integration
246
+ └── workflows/ # Production pipelines
247
+ ```
248
+
249
+ ## βš™οΈ CLI Commands
250
+
251
+ The package provides a unified `ign-lidar-process` command with three subcommands:
252
+
253
+ ### πŸ”— **CLI Workflow Chain**
254
+
255
+ ```mermaid
256
+ sequenceDiagram
257
+ participant User
258
+ participant CLI as ign-lidar-process
259
+ participant D as Downloader
260
+ participant E as Enricher
261
+ participant P as Processor
262
+
263
+ User->>CLI: download --bbox ...
264
+ CLI->>D: Initialize downloader
265
+ D->>D: Fetch available tiles
266
+ D->>D: Smart skip check
267
+ D-->>CLI: Downloaded tiles
268
+ CLI-->>User: βœ“ Tiles ready
269
+
270
+ User->>CLI: enrich --input-dir ...
271
+ CLI->>E: Initialize enricher
272
+ E->>E: Compute geometric features
273
+ E->>E: GPU/CPU processing
274
+ E-->>CLI: Enriched LAZ files
275
+ CLI-->>User: βœ“ Features computed
276
+
277
+ User->>CLI: process --input-dir ...
278
+ CLI->>P: Initialize processor
279
+ P->>P: Create training patches
280
+ P->>P: Apply augmentations
281
+ P-->>CLI: ML-ready dataset
282
+ CLI-->>User: βœ“ Dataset ready
283
+ ```
284
+
285
+ ### Download Command
286
+
287
+ Download LiDAR tiles from IGN:
288
+
289
+ ```bash
290
+ ign-lidar-process download \
291
+ --bbox lon_min,lat_min,lon_max,lat_max \
292
+ --output tiles/ \
293
+ --max-tiles 50
294
+ ```
295
+
296
+ ### Enrich Command
297
+
298
+ Enrich LAZ files with geometric features:
299
+
300
+ ```bash
301
+ # CPU version (automatically skips existing enriched files)
302
+ ign-lidar-process enrich \
303
+ --input-dir tiles/ \
304
+ --output enriched/ \
305
+ --num-workers 4 \
306
+ --k-neighbors 10
307
+
308
+ # Force re-enrichment (ignore existing files)
309
+ ign-lidar-process enrich \
310
+ --input-dir tiles/ \
311
+ --output enriched/ \
312
+ --force
313
+
314
+ # GPU version (requires CUDA)
315
+ ign-lidar-process enrich \
316
+ --input-dir tiles/ \
317
+ --output enriched/ \
318
+ --use-gpu
319
+ ```
320
+
321
+ > πŸ’‘ **Smart Skip**: By default, the enrich command skips files that have already been enriched, making it safe to resume interrupted operations.
322
+
323
+ ### Process Command
324
+
325
+ Create training patches from enriched LAZ files:
326
+
327
+ ```bash
328
+ # Automatically skips tiles with existing patches
329
+ ign-lidar-process process \
330
+ --input-dir enriched/ \
331
+ --output patches/ \
332
+ --lod-level LOD2 \
333
+ --patch-size 150.0 \
334
+ --num-workers 4 \
335
+ --num-augmentations 3
336
+
337
+ # Force reprocessing (ignore existing patches)
338
+ ign-lidar-process process \
339
+ --input-dir enriched/ \
340
+ --output patches/ \
341
+ --force
342
+ ```
343
+
344
+ > πŸ’‘ **Smart Skip**: The process command automatically detects existing patches and skips reprocessing, allowing you to resume interrupted batch jobs.
345
+
346
+ ## πŸ”§ Configuration
347
+
348
+ ### LOD Levels
349
+
350
+ - **LOD2**: Simplified building models (15 classes)
351
+ - **LOD3**: Detailed building models (30 classes)
352
+
353
+ ### Processing Options
354
+
355
+ ```python
356
+ processor = LiDARProcessor(
357
+ lod_level="LOD2", # LOD2 or LOD3
358
+ augment=True, # Enable augmentation
359
+ num_augmentations=3, # Augmentations per patch
360
+ patch_size=150.0, # Patch size in meters
361
+ patch_overlap=0.1, # 10% overlap
362
+ bbox=[xmin, ymin, xmax, ymax] # Spatial filter
363
+ )
364
+ ```
365
+
366
+ ## πŸ“Š Output Format
367
+
368
+ ### πŸ“ **Data Structure Overview**
369
+
370
+ ```mermaid
371
+ graph TB
372
+ subgraph "Raw Input"
373
+ LAZ[LAZ Point Cloud<br/>XYZ + Intensity<br/>Classification]
374
+ end
375
+
376
+ subgraph "Enriched Data"
377
+ ELAZ[Enhanced LAZ<br/>+ 30 Features<br/>+ Building Labels]
378
+ end
379
+
380
+ subgraph "ML Dataset"
381
+ NPZ[NPZ Patches<br/>16K points each<br/>Ready for Training]
382
+ end
383
+
384
+ subgraph "NPZ Contents"
385
+ COORD[Coordinates<br/>X, Y, Z]
386
+ GEOM[Geometric Features<br/>Normals, Curvature]
387
+ SEMANTIC[Semantic Features<br/>Planarity, Verticality]
388
+ META[Metadata<br/>Intensity, Return#]
389
+ LABELS[Building Labels<br/>LOD2/LOD3 Classes]
390
+ end
391
+
392
+ LAZ --> ELAZ
393
+ ELAZ --> NPZ
394
+ NPZ --> COORD
395
+ NPZ --> GEOM
396
+ NPZ --> SEMANTIC
397
+ NPZ --> META
398
+ NPZ --> LABELS
399
+
400
+ style LAZ fill:#ffebee
401
+ style ELAZ fill:#e3f2fd
402
+ style NPZ fill:#e8f5e8
403
+ ```
404
+
405
+ ### πŸ”’ **NPZ File Structure**
406
+
407
+ Each patch is saved as an NPZ file containing:
408
+
409
+ ```python
410
+ {
411
+ 'points': np.ndarray, # [N, 3] XYZ coordinates
412
+ 'normals': np.ndarray, # [N, 3] surface normals
413
+ 'curvature': np.ndarray, # [N] principal curvature
414
+ 'intensity': np.ndarray, # [N] normalized intensity
415
+ 'return_number': np.ndarray, # [N] return number
416
+ 'height': np.ndarray, # [N] height above ground
417
+ 'planarity': np.ndarray, # [N] planarity measure
418
+ 'verticality': np.ndarray, # [N] verticality measure
419
+ 'horizontality': np.ndarray, # [N] horizontality measure
420
+ 'density': np.ndarray, # [N] local point density
421
+ 'labels': np.ndarray, # [N] building class labels
422
+ }
423
+ ```
424
+
425
+ ### πŸ“ **Data Dimensions**
426
+
427
+ | Component | Shape | Data Type | Description |
428
+ | ---------- | ------- | --------- | -------------------------- |
429
+ | `points` | [N, 3] | `float32` | 3D coordinates (X, Y, Z) |
430
+ | `normals` | [N, 3] | `float32` | Surface normal vectors |
431
+ | `features` | [N, 27] | `float32` | Geometric feature matrix |
432
+ | `labels` | [N] | `uint8` | Building component classes |
433
+ | `metadata` | [4] | `object` | Patch info (bbox, tile_id) |
434
+
435
+ > **πŸ“¦ Typical patch**: 16,384 points, ~2.5MB compressed, ~8MB in memory
436
+
437
+ ## 🌍 Batch Download
438
+
439
+ ```python
440
+ from ign_lidar import IGNLiDARDownloader
441
+
442
+ # Initialize downloader
443
+ downloader = IGNLiDARDownloader("downloads/")
444
+
445
+ # Download tiles by bounding box (WGS84)
446
+ tiles = downloader.download_by_bbox(
447
+ bbox=(-2.0, 47.0, -1.0, 48.0), # West France
448
+ max_tiles=10
449
+ )
450
+
451
+ # Download specific tiles
452
+ tile_names = ["LHD_FXX_0186_6834_PTS_C_LAMB93_IGN69"]
453
+ downloader.download_tiles(tile_names)
454
+ ```
455
+
456
+ ## πŸ“ Examples
457
+
458
+ ### Urban Processing
459
+
460
+ ```python
461
+ # High-detail urban processing
462
+ processor = LiDARProcessor(lod_level="LOD3", num_augmentations=5)
463
+ patches = processor.process_tile("urban_area.laz", "output/urban/")
464
+ ```
465
+
466
+ ### Rural Processing
467
+
468
+ ```python
469
+ # Simplified rural processing
470
+ processor = LiDARProcessor(lod_level="LOD2", num_augmentations=2)
471
+ patches = processor.process_tile("rural_area.laz", "output/rural/")
472
+ ```
473
+
474
+ ### Batch Processing
475
+
476
+ ```python
477
+ from ign_lidar import WORKING_TILES, get_tiles_by_environment
478
+
479
+ # Get coastal tiles
480
+ coastal_tiles = get_tiles_by_environment("coastal")
481
+
482
+ # Process all coastal areas
483
+ for tile_info in coastal_tiles:
484
+ patches = processor.process_tile(
485
+ f"data/{tile_info['tile_name']}.laz",
486
+ f"output/coastal/{tile_info['tile_name']}/"
487
+ )
488
+ ```
489
+
490
+ ## πŸ› οΈ Development
491
+
492
+ ### Setup Development Environment
493
+
494
+ ```bash
495
+ git clone https://github.com/your-username/ign-lidar-hd-downloader
496
+ cd ign-lidar-hd-downloader
497
+ pip install -e ".[dev]"
498
+ ```
499
+
500
+ ### Run Tests
501
+
502
+ ```bash
503
+ pytest tests/
504
+ ```
505
+
506
+ ### Code Formatting
507
+
508
+ ```bash
509
+ black ign_lidar/
510
+ flake8 ign_lidar/
511
+ ```
512
+
513
+ ## πŸ“š Documentation & Resources
514
+
515
+ ### πŸ“– **Complete Documentation Hub**
516
+
517
+ For comprehensive documentation, see the **[Documentation Hub](docs/README.md)**:
518
+
519
+ - **[πŸ“– User Guides](docs/guides/)** - Quick start guides, QGIS integration, troubleshooting
520
+ - **[⚑ Features](docs/features/)** - Smart skip detection, format preferences, workflow optimization
521
+ - **[πŸ”§ Technical Reference](docs/reference/)** - Memory optimization, performance tuning
522
+ - **[πŸ“¦ Archive](docs/archive/)** - Bug fixes history, release notes, migration guides
523
+
524
+ ### πŸš€ **Essential Quick Links**
525
+
526
+ - **[🎯 Quick Reference Card](QUICK_REFERENCE.md)** - Fast reference for all commands
527
+ - **[⚑ Smart Skip Features](docs/features/SMART_SKIP_SUMMARY.md)** - Resume workflows efficiently
528
+ - **[πŸ—ΊοΈ QGIS Integration](docs/guides/QUICK_START_QGIS.md)** - GIS compatibility guide
529
+ - **[βš™οΈ Memory Optimization](docs/reference/MEMORY_OPTIMIZATION.md)** - Performance tuning
530
+ - **[πŸ“‹ Output Formats](docs/features/OUTPUT_FORMAT_PREFERENCES.md)** - LAZ 1.4 vs QGIS formats
531
+
532
+ ### πŸ’‘ **Examples & Workflows**
533
+
534
+ - **[Basic Usage](examples/basic_usage.py)** - Simple processing examples
535
+ - **[Urban Processing](examples/example_urban_simple.py)** - City-specific workflows
536
+ - **[Parallel Processing](examples/parallel_processing_example.py)** - Multi-worker optimization
537
+ - **[Full Workflow](examples/full_workflow_example.py)** - End-to-end pipeline
538
+ - **[PyTorch Integration](examples/pytorch_dataloader.py)** - ML training setup
539
+
540
+ ### πŸš€ Coming Soon: Interactive Documentation
541
+
542
+ We're working on a comprehensive [Docusaurus documentation site](DOCUSAURUS_PLAN.md) that will include:
543
+
544
+ - 🌐 Multi-language support (English & French)
545
+ - πŸ” Full-text search
546
+ - πŸ“± Mobile-responsive design
547
+ - πŸ“– Interactive tutorials
548
+ - πŸ”— Auto-generated API reference
549
+ - πŸ’‘ Live code examples
550
+
551
+ See the [Docusaurus Plan](DOCUSAURUS_PLAN.md) for details.
552
+
553
+ ## πŸ“š API Reference
554
+
555
+ ### Core Classes
556
+
557
+ - **`LiDARProcessor`**: Main processing engine
558
+ - **`IGNLiDARDownloader`**: Batch download functionality
559
+ - **`LOD2_CLASSES`**, **`LOD3_CLASSES`**: Classification taxonomies
560
+
561
+ ### Utility Functions
562
+
563
+ - **`compute_normals()`**: Surface normal computation
564
+ - **`compute_curvature()`**: Principal curvature calculation
565
+ - **`extract_geometric_features()`**: Comprehensive feature extraction
566
+ - **`get_tiles_by_environment()`**: Filter tiles by environment type
567
+
568
+ ## πŸ”— Requirements
569
+
570
+ - Python 3.8+
571
+ - NumPy >= 1.21.0
572
+ - laspy >= 2.3.0
573
+ - scikit-learn >= 1.0.0
574
+ - tqdm >= 4.60.0
575
+ - requests >= 2.25.0
576
+
577
+ ## πŸ“„ License
578
+
579
+ MIT License - see [LICENSE](LICENSE) file for details.
580
+
581
+ ## 🀝 Contributing
582
+
583
+ Contributions are welcome! Please feel free to submit a Pull Request.
584
+
585
+ ## πŸ“§ Support
586
+
587
+ For issues and questions, please use the [GitHub Issues](https://github.com/your-username/ign-lidar-hd-downloader/issues) page.