Add BoundingDiagonal()
method to Envelope
#489
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The main usecase for this method is to help a user construct a compact representation of an envelope, for example as WKB. Rather than encoding the polygon representation of the Envelope, the LineString representation can be used instead.
The Polygon representation uses 89 bytes (1 for the byte order, 4 to encode the number of rings, 4 to encode the number of points in the outer ring, and then 80 to represent the 5 points in the ring itself). The LineString representation only uses 37 bytes (1 for the byte order, 4 to encode the number
of points, and 32 to represent 2 points).
Check List
Have you:
Added unit tests? Yes.
Add cmprefimpl tests? (if appropriate?) N/A
Updated release notes? (if appropriate?) Yes.
Related Issue
Benchmark Results
N/A, this is new functionality that doesn't have benchmark tests.