Jon,

Recommended solution: use GDALRasterBand::GetDataCoverageStatus() with nXOff, nYOff, nXSize, nYSize matching tile offset and size and check forGDAL_DATA_COVERAGE_STATUS_EMPTY. Cf https://gdal.org/development/rfc/rfc63_sparse_datasets_improvements.html

(undocumented solution, mostly used for internal testing: rasterBand->GetMetadataItem("BLOCK_SIZE_{block_x_offset}_{block_y_offset}", "TIFF") where {block_x_offset} / {block_y_offset} must be replaced by the block index along x and y.If it returns "0", it is a sparse block.)

Even

Le 28/06/2024 à 15:04, Jon Morris via gdal-dev a écrit :

We usually use the SPARSE_OK option when creating GTiffs, but as a lot of our clients use ArcGIS, we need to ensure that the sparse option is not used for client deliverables. After a tiff has been created though, it’s not easy to tell whether it is sparse or not. Is there an easy way of detecting which rasters are sparse and therefore cannot be sent to clients?

Using tiffinfo -D test.tif seems to give an error message like “TIFFFillTile: 0: Invalid tile byte count, tile 0.” , so I’ve been using this to check, but is there a better way?

Or have Esri started supporting sparse rasters, and if so, does anyone know which version of ArcMap 10.x? (Our clients are mostly on older versions, not sure if any are using Pro yet).

Thanks,

Jon

*Jon Morris*

*Software Developer*

--

e: ​​​​         jon.mor...@jbarisk.com
d:      +44 (0)1756 587229
t:      +44 (0)1756 799919 <tel:+44%20(0)1756%20799919>

        

www.jbarisk.com <http://www.jbarisk.com/>

<https://www.linkedin.com/company/jba-risk-management/>

        
<https://twitter.com/JBARisk/>

        
<https://www.youtube.com/channel/UC0iatom2jYbW96voW0rlpCw>

        

All JBA Risk Management's email messages contain confidential information and are intended only for the individual(s) named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. JBA Risk Management Limited is registered in England, company number 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire, BD23 3FD, England.


_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to