jiayuasu opened a new pull request, #2826:
URL: https://github.com/apache/sedona/pull/2826

   ## Summary
   
   - Add a new Spark DataSourceV2 (`sedonainfo`) that reads raster file 
metadata without decoding pixel data, similar to 
[gdalinfo](https://gdal.org/en/stable/programs/gdalinfo.html)
   - Returns one row per file with: dimensions, CRS, geoTransform, bands (type, 
noData, blockSize, colorInterpretation), overviews, tiling, compression, and 
file-wide metadata
   - Supports COG detection via `isTiled` and `overviews` fields
   - Extensible architecture: `RasterFileMetadataExtractor` trait with 
`GeoTiffMetadataExtractor` implementation. New formats can be added by 
implementing the trait
   
   ## Usage
   
   ```scala
   spark.read.format("sedonainfo").load("/path/to/rasters/")
   // COG detection
   spark.read.format("sedonainfo").load("/path/to/*.tif")
     .filter("isTiled AND size(overviews) > 0")
   ```
   
   ## Test plan
   
   - [ ] Exact metadata assertions for test1.tiff (width=512, height=517, 
srid=3857, fileSize=174803, band type=UNSIGNED_8BITS, blockSize=256x256, 
geoTransform, cornerCoordinates)
   - [ ] Cross-validation against existing `format("raster")` + 
`RS_Width/RS_Height/RS_NumBands/RS_SRID`
   - [ ] COG test: generates COG on-the-fly via `RS_AsCOG`, verifies 
`isTiled=true`, 2 overviews, `blockSize=256x256`
   - [ ] Glob pattern and directory recursive loading (7 `.tiff` files via 
glob, 9 total via recursive)
   - [ ] LIMIT pushdown and column pruning


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to