History.md in ffi-gdal-1.0.0.beta5 vs History.md in ffi-gdal-1.0.0.beta6

- old
+ new

@@ -1,9 +1,151 @@ # Change Log Format for this file derived from [http://keepachangelog.com](http://keepachangelog.com). +## 1.0.0.beta6 / 2016-04-18 + +### New Features + +#### GDAL + +* Added wrappers for the Grid API. It uses `GDAL::Gridder`, which is the + programmatic equivalent to the `gdal_grid` command-line utility, + `GDAL::GridderOptions`, which is an object used to mimic the options you pass + to `gdal_grid`, and `GDAL::Grid`, which is the simple object that performs the + gridding. +* Added first wrapper of `gdalwarper.h` methods, found in + `GDAL::DatasetMixins::WarpMethods`. + +#### OGR + +* Added `OGR::CoordinateTransform#transform_ex`. + +### Improvements + +* Removed all `ObjectSpace.define_finalizer` calls that "cleaned up" C pointers + for Ruby-wrapped objects that had not yet been closed/destroyed. This was + keeping those Ruby objects from getting collected (?) and effectively causing + lots of unnecessary memory use. + +#### GDAL + +* Added `GDAL::GeoTransformMixins::Extensions.new_from_envelope` which lets you + create a `GDAL::GeoTransform` using the points from an `OGR::Envelope` and the + destination raster's width and height. It's convenient because it calculates + the pixel size for you. +* Renamed `GDAL::GridTypes` to `GDAL::GridAlgorithms`. This shouldn't impact + anyone/thing since it's only relative to the newly added Grid API wrapper. + There just happened to me some Grid cruft that had been laying around for some + time. +* Added `GDAL::RasterBand#write_block`. Somehow this went missing from previous + `RasterBand` wrapping. +* Renamed `GDAL::RasterBandMixins::Extenions#each_by_block` to `#read_by_block`. + Its functionality was doing reading, yet implied reading or writing; since + writing by block isn't needed anywhere internally yet, I just renamed this. +* Renamed `GDAL::RasterBandMixins#write_array` to `#write_xy_narray`. This + method's name inferred that it could write any old Array, but that's not the + case--it only writes 2D NArray data. +* Added `GDAL::InternalHelpers._buffer_from_data_type` to compliment the + existing `._pointer_from_data_type`. Useful for creating buffer-specific + pointers from a GDAL data type. +* `GDAL::DatasetMixins::Extensions#extent` now manually builds an `OGR::Polygon` + instead of polygonizing the entire dataset and taking the envelope of that. + Much faster this way. +* Refactored `GDAL::RasterBandMixins::Exsentions#projected_points` to return a + 3D NArray (indicating pixel/row position) instead of just a 2D NArray of + coordinates. +* Added `GDAL::InternalHelpers` methods for creating NArrays based on GDAL + data types. +* `GDAL::Options` values all have `#to_s` called on them to ensure they're + Strings before handing them over to GDAL. The GDAL options "hash" requires + that both keys and values be Strings. +* `GDAL::RasterBandMixins::AlgorithmMethods` that use GDALProgressFunc functions + can now participate in GDALScaledProgress functions. +* Added `GDAL::RasterBandMixins::Extensions#pixel_count`. +* Allow `GDAL::RasterBand#create_mask_band` to take a single flag or many. +* Allow `GDAL::Dataset`s to be open in shared mode vs non-shared mode. All + Datasets now default to use shared mode. +* Allow `GDAL::Driver#create_dataset` and `GDAL::Dataset.open` to take a block, + yielding the dataset then closing it afterwards. +* `GDAL::RasterBandClassifier` now uses NArray to classify. Can result in quite + a large performance gain. +* `GDAL::Driver#copy_dataset` now properly takes progress block arguments. +* `GDAL::Driver#copy_dataset` now yields a writable Dataset. +* Swapped order of params in `GDAL::Driver#rename_dataset` to be (old, new) + instead of (new, old). +* Added enumerator `RasterAttributeTableMixins::Extensions#each_column` to allow + nicer iterating over columns. +* `GDAL::RasterAttributeTable` methods that returned -1 when a value can't be + returned now return nil instead. +* Renamed `GDAL::RasterAttributeTable#value_to_*` methods to be named after + their C functions. Also, renamed `#add_value` to `#set_value` and refactored + into `RasterAttributeTableMixins::Extensions`. + +#### OGR + +* Added `OGR::FeatureExtensions#field()` which gets the field using the + associated `OGR::FieldDefinition#type`. Makes so you don't always have to + request the field by its type (`field_as_double`). +* Added `OGR::LayerMixins::Extensions#point_values()` which gets values for all + of the points in the layer. It also allows you to specify getting field values + with that, which helps retrieving data for the Grid API. You can also pass it + a block to filter out points that don't match some criteria defined in the + block. +* Added `OGR::LayerMixins::Extensions#any_geometries_with_z?` which simply + checks to see if the layer has any geometries with Z values. +* `GDAL::DataType.by_name` always calls `#to_s` on the param now, letting you + pass in Symbols. +* Added `OGR::Point#set_point`, `OGR::Point25#set_point`, and + `OGR::GeometryTypes::Curve#set_point` wrappers for `OGR_G_SetPoint_2D` and + `OGR_G_SetPoint`. +* Added `OGR::LineString#add_geometry` to allow adding a OGR::Point object to + the LineString instead of having to pass coordinates in to #add_point. +* `OGR::LayerMixins::Extensions#geometry_from_extent` now builds an + `OGR::Polygon` using the same algorithm that + `GDAL::DatasetMixins::Extensions#extent` uses. One could argue that there was + also a bug here in that `geometry_from_extent` used to return the convex hull + of the extent, not the extent itself. +* Extracted `OGR::LayerMixins::Extensions#each_feature` from + `OGR::LayerMixins::Extensions#features` to provide an Enumerator. This lets + consumers utilize yielded `OGR::Feature`s as they're retrieved instead of + after the `features` Array has been built. + `OGR::LayerMixins::Extensions#features` now uses this too. +* Added `OGR::GeometryMixins::Extensions#invalid?` to compliment + `OGR::Geometry#valid?`. +* Added `OGR::LayerMixins::Extensions#point_geometry`, `#each_point_geometry`, + and `point_geometries`. Since `#point` implies it returns a Point object, but + the OGR API's related method returns point values (x, y, z), it seemed like + it would be useful to have a method that returned a geometry. +* `OGR::DataSource.open` can now take a block, yielding the data source, then + closing it afterwards. + +### Bug Fixes + +* Cleanup `OGR::Feature`s that were a result of `OGR::Layer#next_feature`. + According to GDAL docs, these *must* be cleaned up before the layer is. + +#### GDAL + +* `GDAL::RasterBandMixins::AlgorithmMethods#fill_nodata!` was calling the old + name of the C function. +* `GDAL::EnvironmentMethods#dump_open_datasets` now works. + +#### OGR + +* `OGR::Field#date=` was casting the passed value to a `Time` object, which in + doing so was setting the time zone. If a user passes in an object that doesn't + have the TZ set, the method shouldn't be setting it for them. +* `OGR::Geometry#point_on_surface` now properly returns a geometry object. +* `OGR::CoordinateTransform#transform` never worked. Fixed. +* `OGR::GeometryMixins::Extensions#utm_zone` no longer creates invalid geometry. +* `OGR::Feature#dump_readable` never worked. Fixed. +* `OGR::Geometry#dump_readable` never worked. Fixed. +* Added missing output_layer param to `OGR::LayerMixins::OGRLayerMethodMethods`. +* `FFI::OGR::Core::WKBGeometryType` was using an INT32 instead of UINT32 and + thus 25D geometry types weren't completely accurate. + ## 1.0.0.beta5 / 2015-06-16 * Improvements * `GDAL::RasterBandClassifier#equal_count_ranges` now returns `nil` if there aren't enough points per group/class to return the requested number of @@ -70,10 +212,10 @@ * Added C and Ruby wrapper for most of OGR. * Better handling of CPLErr return values. * Allow loading, even when C functions aren't defined in the version of GDAL that you're using. * Split out additions to GDAL/OGR in `*_extensions.rb` modules. Methods - contained in `Extentions` modules don't directly wrap GDAL/OGR functions, + contained in `Extensions` modules don't directly wrap GDAL/OGR functions, but either provide new functionality or attempt to make library usage more Rubyesque. * Added `#as_json`, `#to_json` to many classes. * Internal Improvements * Lots of cleanup of class internals.