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

Renaming of modules for next Major release (v5.0) #860

Closed
17 tasks done
DenisCarriere opened this issue Jul 22, 2017 · 12 comments
Closed
17 tasks done

Renaming of modules for next Major release (v5.0) #860

DenisCarriere opened this issue Jul 22, 2017 · 12 comments
Assignees
Milestone

Comments

@DenisCarriere
Copy link
Member

DenisCarriere commented Jul 22, 2017

Renaming modules proposal (v5.0)

This issue is used for tracking the renaming of modules in the next major release (v5.0):

@DenisCarriere DenisCarriere added this to the 5.0.0 milestone Jul 22, 2017
@DenisCarriere DenisCarriere self-assigned this Jul 22, 2017
@rowanwins
Copy link
Member

rowanwins commented Jul 22, 2017

Great idea!

radians2degrees should change to radiansToDegrees
degrees2radians should change to degreesToRadians
within should change to something... perhaps pointsWithinPolygon
inside should change to booleanPointInPolygon (if we were to follow the pattern that is unfolding, although Im not 100% set on it)
lineDistance could change to perimeterDistance

Possibles

explode could be featureVerticesToPoints
combine could be singlePartToMultiPart
flatten could be multiPartToSinglePart
kinks could be selfIntersections

@stebogit
Copy link
Collaborator

I'd suggest
lineDistance => length (buddy of area)
combine => toMultiFeature
explode => getVertices; even though I like explode and I would rather improve it adding a parameter like output =vertices|segments to return, obviously, a FeatureCollection of Points or LineStrings
flatten => I think we should keep the name, cause it match with flattenEach and flattenReduce, a known "function"
inside => booleanPointInPolygon 👍
within => pointsWithinPolygon 👍

Based on #684, I'd add these:
distanceToDegrees => lengthToDegrees
distanceToRadians => lengthToRadians
radiansToDistance => radiansToLength

@DenisCarriere
Copy link
Member Author

DenisCarriere commented Jul 24, 2017

I've updated my #860 (comment) with the modules that should be changed, a few of the proposed renaming were a bit too explicit, in my opinion having short & concise names is better for a module.

even though I like explode and I would rather improve it adding a parameter like output =vertices|segments to return, obviously, a FeatureCollection of Points or LineStrings

👍 I like having the idea of having explode return Points or Segments, should be relatively easy to implement with an extra parameter.

As for within & inside... Let's just leave those unchanged for now, until we have the full set of DE-9IM modules 100% tested and working, we can discuss those boolean modules at a later time.

@stebogit
Copy link
Collaborator

@DenisCarriere I added also the renaming of @turf/bezier (see #661)

@stebogit
Copy link
Collaborator

stebogit commented Aug 30, 2017

I'd add

  • bearingToAngle => bearingToAzimuth

See azimuth definition

@DenisCarriere
Copy link
Member Author

DenisCarriere commented Oct 30, 2017

What about this one too?

  • convertDistance => convertLength

@stebogit
Copy link
Collaborator

👍 @DenisCarriere

@stebogit
Copy link
Collaborator

stebogit commented Oct 31, 2017

@DenisCarriere maybe also

  • point-on-surface => point-on-feature -> technically Points and Lines do not have a surface
  • linestring-to-polygon => line-to-polygon -> to keep it consistent with the other "line" modules

@DenisCarriere
Copy link
Member Author

DenisCarriere commented Oct 31, 2017

👍 I like those two as well, i'll do those now.

@DenisCarriere
Copy link
Member Author

DenisCarriere commented Oct 31, 2017

also the reverse:

  • polygon-to-linestring => polygon-to-line

@DenisCarriere
Copy link
Member Author

Also dropping the string part of those modules makes it less confusion to add a Capital S or lowercase s.

lineStringToPolygon vs. linestringToPolygon

@DenisCarriere DenisCarriere mentioned this issue Oct 31, 2017
4 tasks
@stebogit
Copy link
Collaborator

stebogit commented Nov 8, 2017

All done with #1064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants