Add geospatial expand_envelope function.#13616
Merged
mbasmanova merged 2 commits intoprestodb:masterfrom Nov 5, 2019
Merged
Conversation
arhimondr
approved these changes
Oct 30, 2019
Member
There was a problem hiding this comment.
It looks like you are also fixing something here. Do you think it is worth extracing in a separate commit with an explanation?
Contributor
Author
There was a problem hiding this comment.
The hidden admixture is that I'm also allowing empty envelopes to be serialized. I can separate that out into another commit.
d85d4fd to
4ff4e35
Compare
mbasmanova
reviewed
Oct 31, 2019
2975450 to
fbc4535
Compare
mbasmanova
reviewed
Oct 31, 2019
Contributor
mbasmanova
left a comment
There was a problem hiding this comment.
@jagill Looks good % method name.
Contributor
There was a problem hiding this comment.
expand_envelope -> expandEnvelope
Contributor
There was a problem hiding this comment.
nit: perhaps, include the value of distance in the error message to simplify troubleshooting
Contributor
|
@jagill Would you fix the commit message: |
5d70a0f to
d52264b
Compare
Previously, empty envelopes were not allowed to be serialized. It will be useful to be able to serialize them for ST_Expand, so this commit enables them.
This creates an envelope that is the minimum bounding rectangle of a Geometry, expanded by a float distance. This is vastly cheaper than ST_Envelope(ST_Buffer(geometry, distance)), and significantly cheaper than ST_Envelope(ST_Buffer(ST_Envelope(geometry), distance)).
9 tasks
This was referenced Dec 10, 2019
14 tasks
This was referenced Jan 2, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This creates an envelope that is the minimum bounding rectangle of a
Geometry, expanded by a float distance. This is vastly cheaper than
ST_Envelope(ST_Buffer(geometry, distance)), and significantly cheaper
than ST_Envelope(ST_Buffer(ST_Envelope(geometry), distance)).