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 extra geometry support to @turf/points-within-polygon #1117

Merged
merged 1 commit into from
Nov 22, 2017

Conversation

DenisCarriere
Copy link
Member

Add extra geometry support to @turf/points-within-polygon

Ref: #1116

Added a few extra Geometry/Feature support to this module without adding any complexity to the source code.

Module now supports

  • Feature<Point>
  • Feature<Polygon>
  • Feature<MultiPolygon>
  • Geometry<Polygon>
  • Geometry<MultiPolygon>

JSDocs

/**
 * Finds {@link Points} that fall within {@link (Multi)Polygon(s)}.
 *
 * @name pointsWithinPolygon
 * @param {Feauture|FeatureCollection<Point>} points Points as input search
 * @param {FeatureCollection|Geoemtry|Feature<Polygon|MultiPolygon>} polygons Points must be within these (Multi)Polygon(s)
 * @returns {FeatureCollection<Point>} points that land within at least one polygon
 */
function pointsWithinPolygon(points, polygons) {

CC: @woutervh-

@DenisCarriere DenisCarriere added this to the 5.1.0 milestone Nov 22, 2017
@DenisCarriere DenisCarriere self-assigned this Nov 22, 2017
@DenisCarriere DenisCarriere merged commit cd1c637 into master Nov 22, 2017
@DenisCarriere DenisCarriere deleted the add-geometry-support branch November 22, 2017 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant