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 support for additional types (MultiLineString, [Multi]Polygon, FeatureCollection) #7

Merged
merged 1 commit into from
Feb 29, 2016

Conversation

anandthakker
Copy link
Contributor

  • MultiLineString
  • (Multi)Polygon
  • FeatureCollection

Closes #1
Closes #2

 - MultiLineString
 - (Multi)Polygon
 - FeatureCollection

Closes turf-junkyard#1
Closes turf-junkyard#2
@tmcw
Copy link
Contributor

tmcw commented Jul 29, 2015

While we're at it, I do kind of think that a Point should have a length of 0, rather than throwing an error...

@morganherlocker
Copy link
Contributor

Hm, I'm a bit split on polys and points. The length of both is closer to N/A than 0 in my opinion. I would think that someone sending a polygon or a point at this function is not using it as intended. Not a huge deal either way, but I tend to shy away from supporting more geometry types than necessary.

@anandthakker
Copy link
Contributor Author

@morganherlocker I'm totally neutral on the Point point, but I feel like getting perimeters of polygons is a reasonable use case. (In fact, it's the one that prompted this PR.) On the other hand, 'line distance' and perimeter aren't obviously the same thing... assuming you think polygon perimeters are a legit enough use case, would you prefer to have that be a separate module?

@tmcw tmcw merged commit 881552d into turf-junkyard:master Feb 29, 2016
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.

3 participants