-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infoAsJSON() calculates stats #317
Comments
#376 This works well without dsn <- "/vsicurl/https://gebco2023.s3.valeria.science/gebco_2023_land_cog.tif"
ds <- new(GDALRaster, dsn)
ds$infoOptions <- ""
info <- ds$infoAsJSON()
json <- yyjsonr::read_json_str(info)
json$metadata$IMAGE_STRUCTURE
#> $COMPRESSION
#> [1] "DEFLATE"
#>
#> $INTERLEAVE
#> [1] "BAND"
#>
#> $LAYOUT
#> [1] "COG"
ds$close() |
Oh wow, I see thank you! Still, don't you think stats and hist should not be on by default? I think generally the defaults should be the same as the library, but I appreciate there's different usage-assumptions (and already established default here). 🙏 |
Good point, I agree. As of #376 yesterday, the default was actually Done in #377. It is documented in the Changelog as a behavior change, and will be described that way in the release notes for gdalraster 1.11. BTW, the fields on This is consistent with Rccp metadata for a class or object instance, e.g., str(ds)
Reference class 'Rcpp_GDALRaster' [package "gdalraster"] with 3 fields
$ infoOptions : chr(0)
$ quiet : logi FALSE
$ readByteAsRaw: logi FALSE
and 75 methods, of which 61 are possibly relevant:
bbox, buildOverviews, clearStatistics, close, deleteNoDataValue, dim,
fillRaster, finalize, flushCache, get_pixel_line, getActualBlockSize,
getBlockSize, getChecksum, getColorTable, getDataTypeName,
getDefaultHistogram, getDefaultRAT, getDescription, getDriverLongName,
getDriverShortName, getFileList, getFilename, getGeoTransform, getHistogram,
getMetadata, getMetadataDomainList, getMetadataItem, getMinMax,
getNoDataValue, getOffset, getOverviewCount, getPaletteInterp,
getProjection, getProjectionRef, getRasterColorInterp, getRasterCount,
getRasterXSize, getRasterYSize, getScale, getStatistics, getUnitType, info,
infoAsJSON, initialize, isOpen, open, read, res, setColorTable,
setDefaultRAT, setDescription, setFilename, setGeoTransform,
setMetadataItem, setNoDataValue, setOffset, setProjection,
setRasterColorInterp, setScale, setUnitType, write |
I'm just posting this as a note, I intend to explore it and make suggestions and PR.
Don't run this, it runs with
-stats
which is undersirable for very large sources and will take a long time.The text was updated successfully, but these errors were encountered: