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

TurfMeasurement#envelope #1020

Merged
merged 1 commit into from May 17, 2019
Merged

TurfMeasurement#envelope #1020

merged 1 commit into from May 17, 2019

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented May 1, 2019

This PR adds support for https://turfjs.org/docs/#envelope. It also fixes up bbox implementation by allowing any GeoJson as parameter and add support for feature and feature collection conversions. bboxPolygon has also been updated to allow for double[] which is the actual representation of bbox in turf vs the BoundingBox from geojson.

@tobrun tobrun added the Turf label May 1, 2019
@tobrun tobrun added this to the v4.8.0 milestone May 1, 2019
@tobrun tobrun requested a review from osana May 1, 2019 08:24
@tobrun tobrun self-assigned this May 1, 2019
@tobrun tobrun changed the title [turf] - add support for envelope TurfMeasurement#envelope May 1, 2019
@tobrun tobrun requested a review from langsmith May 1, 2019 08:25
* @since 4.8.0
*/
public static double[] bbox(GeoJson geoJson) {
BoundingBox boundingBox = geoJson.bbox();
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing. I am not convinced that we can trust the bbox that came with the geoJson.

Copy link
Member Author

Choose a reason for hiding this comment

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

capturing from the spec, this can be provided though seems optional. If bbox isn't implemented, it will try to base the bbox on the actual geometries.

@osana osana added this to In progress in Mapbox Java Planning May 6, 2019
@osana osana modified the milestones: v4.8.0, v4.9.0 May 7, 2019
@tobrun tobrun merged commit ef0d922 into master May 17, 2019
Mapbox Java Planning automation moved this from In progress to Done May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants