gdalraster 2.0.0 #712
ctoney
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary of main changes
GDALVectoralong with several additions and enhancements toogr_*()stand-alone functions?data_type_helpers)show()method for all Rcpp exposed classesDependencies
Vector API bindings
GDALVector: encapsulates anOGRLayerobject and theGDALDatasetthat contains it, exposing 48 class methods for obtaining vector layer information, attribute and spatial filtering, and reading/writing feature datananoarrow_array_streamobject (GDAL >= 3.6) (Add GDALVector::getArrowStream(): expose an Arrow C stream on a layer via nanoarrow_array_stream object #591)ogr_reproject(): reproject a vector layer (purpose-built wrapper ofGDALVectorTranslate())ogr_proc(): interface to GDAL OGR facilities for vector geoprocessingogr_layer_rename(): rename an existing layer in a vector dataset (GDAL >= 3.5)ogr_execute_sql()now returns an object of classGDALVectorfor SQL SELECT statementsreturn_objinogr_ds_create()andogr_layer_create(),TRUEto return aGDALVectorobject for write access on the created layerlayerargument in certainogr_managefunctions now supportsNULLor empty string, which will default to the first layer by index (mainly as a convenience for single-layer formats)$is_ignoredfrom the list object for a feature class definition (affects certainogr_defineandogr_managefunctions): potentially breaking change but assumed to be unused in layer / field creation (Removeis_ignoredfrom feature class definition #513)Geometry API
g_wk2wk()(WKB <--> WKT conversion),g_create()(create geometries from input points),g_add_geom()(build container geometry types from sub-geometries) (Updated geometry interface to support the vector API in gdalraster 2.0 #572)wkttogeom, and by returning raw vectors of WKB by default from functions that return geometries (as_wkb = TRUEby default)g_is_valid(),g_is_empty(),g_name()andg_buffer()to the new style Geometry APIg_make_valid(): attempt to make invalid geometries validg_summary(): obtain text summaries of WKB/WKT geometries (GDAL >= 3.7)g_simplify(): simplify WKB/WKT geometries, optionally preserving topologyg_swap_xy(): swap x and y coordinates of the input geometryg_geodesic_area()andg_geodesic_length()(Geom API: addg_geodesic_area()andg_geodesic_length()#671)g_is_3D()andg_is_measured()(Geom: addg_is_3D()andg_is_measured()#650)g_envelope(): computes and returns the bounding envelope(s) for input geometriesg_coords(): extract coordinate values from geometriesg_transform(): add argumenttraditional_gis_orderwith defaultTRUE, to support authority compliant order for geometries using geographic coordinatesbbox_transform(): add argumentuse_transform_bounds(TRUEby default but requires GDAL >= 3.4)Spatial Reference Systems API
srs_is_same(): argumentsrs1is renamed tosrsand argumentsrs2tosrs_othersrs_to_wkt()(wrapper ofOSRSetFromUserInput())?srs_convertand?srs_query, and now includes the following:srs_convertfunctions:epsg_to_wkt(),srs_to_wkt()srs_queryfunctions:srs_find_epsg(),srs_get_name(),srs_is_geographic(),srs_is_derived_gcs(),srs_is_local(),srs_is_projected(),srs_is_compound(),srs_is_geocentric(),srs_is_vertical(),srs_is_dynamic(),srs_is_same(),srs_get_angular_units(),srs_get_linear_units(),srs_get_coord_epoch(),srs_get_utm_zone(),srs_get_axis_mapping_strategy()GDALRaster-class
$get_block_indexing(): helper to get indexing values for the block layout of a raster band (AddGDALRaster::get_block_indexing(): helper method to get indexing values for the block layout #667)$addBand(): add a band to a dataset if the underlying format supports this action, e.g.,MEMandVRT$clearColorTable(): clear the color table associated with a raster band$getMaskBand(): return the mask filename and band number associated with a given band of the dataset$getMaskFlags(): return the status flags of the mask band associated with a given band of the dataset$setMetadata(): set dataset or band-level metadata from a character vector ofNAME=VALUEpairs (instead of per metadata item with the existing method$setMetadataItem())band = 0in the existing method$setDescription()to set the dataset-level description$bbox()and$res()to handle south-up / rotated raster (with related fixes inread_ds()andplot_raster()) (GDALRaster-class: bbox() / res() for south-up raster / rotated geotransform #569)GDAL VSI for operations on virtual file systems
vsi_get_actual_url(): return the actual URL of a supplied VSI filename, wrapper ofVSIGetActualURL()in the GDAL APIvsi_get_signed_url(): return a signed URL for a supplied VSI filename, wrapper ofVSIGetSignedURL()in the GDAL APIvsi_is_local(): returns whether the file/filesystem is "local", wrapper ofVSIIsLocal()in the GDAL APIGDAL configuration
get_cache_max()andset_cache_max(): get/set maximum memory size available for the GDAL block cacheget_cache_used(): change the return value to Rnumerictype carrying theinteger64class attribute, and add argumentunitsdefaulting to"MB"gdal_version_num()(previously internal/undocumented): return the full version number as anintegervalue (convenience foras.integer(gdal_version()[2]))gdal_compute_version(): compute the integer version number (GDAL_VERSION_NUM) from the individual components (major, minor, revision)Other stand-alone functions
pixel_extract(): extract pixel values at geospatial point locations, with options for multiple interpolation methods and returning the individual pixel values from a N x N kernel (Add pixel_extract() #570)transform_bounds(): transform a bounding box, densifying the edges to account for nonlinear transformations along these edges and extracting the outermost bounds (wrapper ofOCTTransformBounds()in the GDAL Spatial Reference System API, requires GDAL >= 3.4)autoCreateWarpedVRT(): create a warped virtual dataset representing the input raster warped into the target coordinate system (wrapper ofGDALAutoCreateWarpedVRT())validateCreationOptions(): validate the list of creation options that are handled by a driver (AddvalidateCreationOptions(), validate the list of creation options that are handled by a driver #663)getCreationOptions(): change the return value to a named list of options with their information (getCreationOptions(): change the return value to a named list of options with their information #662)getCreationOptions(): include$minand$maxattributes in the returned list if GDAL >= 3.11create(): add argumentreturn_obj,TRUEto return an object of classGDALRasterwith update access on the created datasetcreateCopy(): add argumentreturn_obj,TRUEto return an object of classGDALRasterwith update access on the created datasetcreateCopy(): an object of classGDALRastercan be given for argumentsrc_filenameto specify the source datasetwarp(): source and destination rasters may be given as objects of classGDALRastertranslate(): source raster can be given as aGDALRasterobjectinspectDataset(): handle the case if separate raster and vector drivers are identified but a specific flag for the dataset type was not given (inspectDataset(): handle case of separate raster and vector drivers identified when specific flag was not given #693)rasterize(): support passing aGDALRasterobject for in-place updating (rasterize(): support passing aGDALRasterobject for in-place updating #660)transform_xy(),inverse_proj(),apply_geotransform(),get_pixel_line())transform_xy()/inv_project(): support input points with z vertices (three column xyz) or time values (four column xyzt), and optionally accept input of point geometries as character vector of WKT strings, WKB raw vector, or list of WKB raw vectorstransform_xy()/inv_project(): account for behavior change in the GDALTransform()methods ofOGRCoordinateTransformationat GDAL 3.11 (transform_xy() / inv_project(): account for behavior change at GDAL 3.11 #631)plot_raster(): add argumentpixel_fnto specify a function that will be applied to the input data for plotting, and handle input raster with complex data type (plot_raster(): add argumentpixel_fnfor applying a function to the input pixel values #582)inspectDataset()andwarp(): set a quiet error handler around code checks that are based on atry()statement that attempts to open a raster dataset (inspectDataset() and warp(): wrap checks of raster dataset open in quiet error handler #709)Bug fixes
NAin the input coordinates totransform_xy(),inv_project(),transform_bounds(),apply_geotransform()andget_pixel_line()(Handle NA in the input coordinates to transform_xy(), inv_project(), transform_bounds(), apply_geotransform() and get_pixel_line() #592)plot_raster()to avoid integer overflow (plot_raster: avoid integer overflow #613 thanks to @mdsumner)as.numeric()(Fix potential integer overflow when multiplying raster dimensions in R without explicit as.numeric() #620 thanks to @mdsumner)VSIFile$read(): thenbytesargument should accept values carrying theinteger64class attribute (fixes VSIFile: read() won't accept integer64 (feature request) #677 thanks to @mdsumner)Internal
create(),createCopy()andautoCreateWarpedVRT()asGDALRasterobject factories (Implement create(), createCopy() and autoCreateWarpedVRT() as object factories #606)ogr_ds_create()andogr_layer_create()asGDALVectorobject factories (Implement ogr_ds_create() and ogr_layer_create() as GDALVector object factories #609)cppcheckstyle insrc/geom_api.cppandsrc/srs_api.cpp([Lint] Code linting for cppcheck in geom_api.cpp and srs_api.cpp #658)src/gdal_vsi.h, and minor code cleanups insrc/gdal_vsi.cppsrc/wkt_conv.cpp->src/srs_api.cpp,src/wkt_conv.h->src/srs_api.h,tests/testthat/test-wkt_conv.R->tests/testthat/test-srs_api.Rconstreference in some srs and geom functionsstd::vector(Try/catch when potentially large allocation of std::vector #485)CPLIsNan()withstd::isnan()(Try/catch when potentially large allocation of std::vector #485)read_ds(): pre-allocate the output vector based on the bit size of the unioned data type across all bandsDocumentation
return_objwithcreate()andcreateCopy()-srcbandand-dstbandcommand-line options in the documentation forwarp()ogr2ogr()for dissolving features based on an attribute valueg_transform()?ogr_defineinspectDataset()andvsi_get_file_metadata()to use the new sample data fileinst/extdata/ynp_features.zip(Add raster subdatasets in the sample file ynp_features.gpkg #691)\dontshow{}This discussion was created from the release gdalraster 2.0.0.
Beta Was this translation helpful? Give feedback.
All reactions