Releases: odlp/simplify_rb
Releases · odlp/simplify_rb
Enumerable raw_points
Supporting custom types
The v0.3.0 release adds two features:
1. The original point is now returned in the optimised results.
This means additional data is preserved. For example, prior to this change attributes like note
on this hash had not been returned:
{ x: 51.5256, y: -0.0875, note: 'My note' }
2. You can now use custom point objects, rather than just hashes.
Your custom points just need to respond to :x
and :y
, e.g:
CustomPointStruct = Struct.new(:id, :x, :y, :description)
API changes
This release includes breaking changes. The main change is a transition from class methods to instance methods.
Before:
SimplifyRb.simplify(points, tolerance, high_quality)
After:
SimplifyRb::Simplifier.new.process(points, tolerance, high_quality)
This release is available on RubyGems.