Turfjs / turf

A modular geospatial engine written in JavaScript and TypeScript
https://turfjs.org/
MIT License
9.33k stars 943 forks source link

jenks #32

Closed morganherlocker closed 11 years ago

morganherlocker commented 11 years ago

Jenks natural breaks classifier

drewda commented 11 years ago

Perhaps of relevance: https://gist.github.com/drewda/1299198

morganherlocker commented 11 years ago

Hey drew, that code looks really great! For now I am going to use @tmcw's simple-statistics algo, since it is already implemented in js. I will, however, swing back and use this if I have any issues with ss. Thanks for the suggestion!

morganherlocker commented 11 years ago

This feature has been implemented and tested. A quantile classifier has also been implemented, which just leaves equal interval, which should be trivial.

drewda commented 11 years ago

Sounds good. Also, great to see your velocity on this project!

morganherlocker commented 11 years ago

Thanks, I am running as fast as I can from the existing systems out of business necessity, which tends to be a pretty strong motivator! If you have any other suggestions or requests from the project, please reach out. Any help or input is much appreciated. :)

drewda commented 11 years ago

Great. I'll look through some of my past projects and see if any of the one-off implementations I've written to work with vector features are worth trying to generalize and contribute to this project.

In general, how do you see Turf in relation to the Java Topology Suite (and its JS cousins)? Similar scope of functionality but implemented with GeoJSON in mind?

(If there's a more appropriate place to continue this conversation, I'm glad to continue over there.)

morganherlocker commented 11 years ago

Let's take it to email. morgan.herlocker@gmail.com

morganherlocker commented 10 years ago

Hey Drew, I didn't see an email, but it might have hit the spam filter. Regardless, I am planning to write up a post about the relation between turf and jsts soon. Here is the basic rough draft of the post that I wrote up in response to someone else who asked the same question:

JSTS is an awesome project. I may even depend on some of its code in turf in the future. At the same time, it is far more complicated than turf, and the learning curve is much steeper than turf. Here are the main things I would point to that distinguish turf from JSTS:

tmcw commented 10 years ago

:+1: There is lots of room for an alternative to jsts that doesn't over-abstract, is in idiomatic js, and is modular.

morganherlocker commented 10 years ago

I made a post fleshing out my response here: http://morganherlocker.com/post/turf-vs-JSTS