Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to calculate bounding box #149

Merged
merged 2 commits into from
Nov 11, 2020
Merged

Add function to calculate bounding box #149

merged 2 commits into from
Nov 11, 2020

Conversation

zerefwayne
Copy link
Contributor

@zerefwayne zerefwayne commented Nov 4, 2020

closes #148

API: AG.boundingbox(geom::AbstractGeometry) returns Clockwise Polygon

  • Add boundingbox function
  • Add test for function

@coveralls
Copy link

coveralls commented Nov 4, 2020

Coverage Status

Coverage increased (+0.01%) to 93.589% when pulling 0b7c268 on zerefwayne:boundbox2d into 0bdcb00 on yeesian:master.

@zerefwayne
Copy link
Contributor Author

ping @yeesian

Copy link
Owner

@yeesian yeesian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is great, thank you!

(Sorry for the slow review from me -- it's been really intense for me at work lately.)

function boundingbox(geom::AbstractGeometry)
coordinates = envelope(geom)
MinX, MaxX, MinY, MaxY = coordinates.MinX, coordinates.MaxX, coordinates.MinY, coordinates.MaxY
# creates a CW closed ring polygon
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is this comment necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to know what orientation of a ring I'll recieve if someone's confused.

@yeesian yeesian merged commit 9cc8713 into yeesian:master Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functionality to get bounding box of geometry
3 participants