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

Polygon to point using Turf? #74

Open
Mike-Loffland opened this issue Apr 20, 2015 · 1 comment
Open

Polygon to point using Turf? #74

Mike-Loffland opened this issue Apr 20, 2015 · 1 comment
Milestone

Comments

@Mike-Loffland
Copy link
Contributor

Turf has a centroid function that figures out a point using the given polygon coordinates.

turf.centroid.

What do you guys think about using this to derive the point data for schools until we have a more reliable/permanent solution?

cc: @joekarl

@Mike-Loffland
Copy link
Contributor Author

I realize that we discussed the shortcomings of deriving a centroid from the given polygon's BBOX coordinates... But, Turf's centroid function uses all the poylgon's coordinates to derive a centroid.

Using Turf's function is a quick way to extract point data from the existing school data. Then, we would have point data for all of our current existing data types (schools, police, and fire). Leaving only school districts (appropriately) with polygon data.

@mkchandler mkchandler added this to the Phase 1 milestone Apr 28, 2015
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

No branches or pull requests

2 participants