{"name":"@turf/within","version":"3.5.2-alpha.d2c36ee7","keywords":["geojson","within","point","polygon","featurecollection"],"author":{"name":"morganherlocker"},"license":"MIT","_id":"@turf/within@3.5.2-alpha.d2c36ee7","homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"bb386200ae641a0edd279003b2c095d95fce2006","tarball":"http://registry-npm.ywwl.com/@turf/within/download/@turf/within-3.5.2-alpha.d2c36ee7.tgz","integrity":"sha512-Y0oK0IQP6Mqn8z4RDWbNhDhLML81+4wmqpXobZ8q0ybwrRcBofUdbey+mZJXuAi2I0swVHkAJ0Vkm/kxm8kTYA==","signatures":[{"sig":"MEQCIDI3wr5ByrTlqp45DAYirryP8QPXZvNGBezXXw45Gd/PAiBDMAYtZBQl7LJtOvLZ42wG9bVXLpUA+DnM9od1N6ucDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":3083,"noattachment":false,"key":"/@turf/within/-/@turf/within-3.5.2-alpha.d2c36ee7.tgz"},"main":"index.js","_from":".","_shasum":"bb386200ae641a0edd279003b2c095d95fce2006","scripts":{"test":"tape test.js"},"_npmUser":{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"2.15.9","description":"turf within module","directories":{},"_nodeVersion":"4.5.0","dependencies":{"@turf/inside":"^3.5.2-alpha.d2c36ee7","@turf/helpers":"^3.5.2-alpha.d2c36ee7"},"devDependencies":{"tape":"^3.5.0","benchmark":"^1.0.0","@turf/helpers":"^3.5.2-alpha.d2c36ee7"},"_npmOperationalInternal":{"tmp":"tmp/within-3.5.2-alpha.d2c36ee7.tgz_1478288006443_0.9766487798187882","host":"packages-12-west.internal.npmjs.com"},"readme":"# @turf/within\n\n# within\n\nTakes a set of [points](http://geojson.org/geojson-spec.html#point) and a set of [polygons](http://geojson.org/geojson-spec.html#polygon) and returns the points that fall within the polygons.\n\n**Parameters**\n\n-   `points` **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)&lt;[Point](http://geojson.org/geojson-spec.html#point)>** input points\n-   `polygons` **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)&lt;[Polygon](http://geojson.org/geojson-spec.html#polygon)>** input polygons\n\n**Examples**\n\n```javascript\nvar searchWithin = turf.featureCollection([\n    turf.polygon([[\n        [-46.653,-23.543],\n        [-46.634,-23.5346],\n        [-46.613,-23.543],\n        [-46.614,-23.559],\n        [-46.631,-23.567],\n        [-46.653,-23.560],\n        [-46.653,-23.543]\n    ]])\n]);\nvar points = turf.featureCollection([\n    turf.point([-46.6318, -23.5523]),\n    turf.point([-46.6246, -23.5325]),\n    turf.point([-46.6062, -23.5513]),\n    turf.point([-46.663, -23.554]),\n    turf.point([-46.643, -23.557])\n]);\n\nvar ptsWithin = turf.within(points, searchWithin);\n\n//addToMap\nvar addToMap = [points, searchWithin, ptsWithin]\nturf.featureEach(ptsWithin, function (currentFeature) {\n  currentFeature.properties['marker-size'] = 'large';\n  currentFeature.properties['marker-color'] = '#000';\n});\n```\n\nReturns **[FeatureCollection](http://geojson.org/geojson-spec.html#feature-collection-objects)&lt;[Point](http://geojson.org/geojson-spec.html#point)>** points that land within at least one polygon\n\n<!-- This file is automatically generated. Please don't edit it directly:\nif you find an error, edit the source file (likely index.js), and re-run\n./scripts/generate-readmes in the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](http://turfjs.org/), an open source\nmodule collection dedicated to geographic algorithms. It is maintained in the\n[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create\nPRs and issues.\n\n### Installation\n\nInstall this module individually:\n\n```sh\n$ npm install @turf/within\n```\n\nOr install the Turf module that includes it as a function:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1478288006674,"maintainers":[{"email":"james@smallsaucepan.com","name":"smallsaucepan"},{"email":"morganherlocker@gmail.com","name":"morgan.herlocker"},{"email":"tim.j.welch@gmail.com","name":"twelch"},{"email":"jamesmilner22@hotmail.com","name":"jamesmilneruk"},{"email":"rowanwins@yahoo.com.au","name":"rowanwins"},{"email":"tom@macwright.com","name":"tmcw"},{"email":"morgan.herlocker@gmail.com","name":"morganherlocker"},{"email":"tim.channell@gmail.com","name":"tcql"},{"email":"mdfedderly@mdfedderly.com","name":"mdfedderly"}],"_cnpm_publish_time":1478288006674,"dist-tags":{"canary":"3.5.2-alpha.d2c36ee7","latest":"4.7.3","lerna-temp":"4.7.1"}}