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 position methods to Turf #138

Closed
cammace opened this issue Jul 18, 2016 · 4 comments
Closed

Add position methods to Turf #138

cammace opened this issue Jul 18, 2016 · 4 comments
Assignees
Labels

Comments

@cammace
Copy link

cammace commented Jul 18, 2016

Some of the Turf APIs we expose have methods that take in position values which makes it easier on developers instead of having to convert Position to Points first. We should make sure all Turf APIs include this functionality.

cc: @zugaldia

@cammace cammace self-assigned this Jul 18, 2016
@zugaldia
Copy link
Member

@cammace Another option is to have Point.toPosition() and Position.toPoint() utility methods. What do you think?

@cammace
Copy link
Author

cammace commented Jul 19, 2016

Currently Point.fromCoordinates() can be used to convert position to point but switching to Position.toPoint() makes more sense to me. Same case doing the reverse, switching from Point to Position currently can be done doing Point.getCoordinates() but would make more sense to call it Point.toPosition() since this is what you are doing.

In any case this works, I just wanted to make sure all the Turf methods have methods like the TurfJoins.inside() to easily pass in Positions.

@zugaldia
Copy link
Member

zugaldia commented Feb 7, 2017

switching to Position.toPoint() makes more sense to me

Noting that after the recent refactor #251, Position doesn't see the GeoJSON package, while the opposite is true.

@cammace
Copy link
Author

cammace commented Mar 2, 2017

I think we are safe closing this issue. With the recent refactor work, this doesn't make much sense to do anymore.

@cammace cammace closed this as completed Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants