{"name":"@turf/line-to-polygon","version":"6.0.1","keywords":["turf","gis","polygon","linestring","line"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/line-to-polygon@6.0.1","contributors":[{"name":"Denis Carriere","email":"@DenisCarriere"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"0f33ba14344fa86bde7cc9b78a8dbc53348fd26c","tarball":"http://registry-npm.ywwl.com/@turf/line-to-polygon/download/@turf/line-to-polygon-6.0.1.tgz","fileCount":4,"integrity":"sha512-MO97h57gAP0nn7SrmOPkCTK44KoR1rUgiLVflUSfX/cT1My5xcFufakKL/5Qq8+B2JW8Q4kN6NFcgAeoO514tw==","signatures":[{"sig":"MEQCIErwIS1nUNMHFjJl1CkCLOGPzlLw00YW0yg5GUCv+3BaAiA60Cx2ljNFP8D5nHPrJ/3lNZMlfW7pcyKWjo8szUZOfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9098,"size":3322,"noattachment":false,"key":"/@turf/line-to-polygon/-/@turf/line-to-polygon-6.0.1.tgz"},"main":"index","files":["index.js","index.d.ts"],"types":"index.d.ts","scripts":{"docs":"node ../../scripts/generate-readmes","test":"node test.js","bench":"node bench.js","prepare":"tsc","pretest":"tsc"},"_npmUser":{"name":"deniscarriere","email":"carriere.denis@gmail.com"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"5.7.1","description":"turf line-to-polygon module","directories":{},"_nodeVersion":"9.3.0","dependencies":{"@turf/bbox":"6.x","@turf/helpers":"6.x","@turf/invariant":"6.x"},"_hasShrinkwrap":false,"devDependencies":{"tape":"*","tslint":"*","benchmark":"*","typescript":"*","@types/tape":"*","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/line-to-polygon_6.0.1_1522847344957_0.6135341444369029","host":"s3://npm-registry-packages"},"readme":"# @turf/line-to-polygon\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n## lineToPolygon\n\nConverts (Multi)LineString(s) to Polygon(s).\n\n### Parameters\n\n*   `lines` **([FeatureCollection][1] | [Feature][2]<([LineString][3] | [MultiLineString][4])>)** Features to convert\n*   `options` **[Object][5]** Optional parameters (optional, default `{}`)\n\n    *   `options.properties` **[Object][5]** translates GeoJSON properties to Feature (optional, default `{}`)\n    *   `options.autoComplete` **[boolean][6]** auto complete linestrings (matches first & last coordinates) (optional, default `true`)\n    *   `options.orderCoords` **[boolean][6]** sorts linestrings to place outer ring at the first position of the coordinates (optional, default `true`)\n    *   `options.mutate` **[boolean][6]** mutate the original linestring using autoComplete (matches first & last coordinates) (optional, default `false`)\n\n### Examples\n\n```javascript\nvar line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n\nvar polygon = turf.lineToPolygon(line);\n\n//addToMap\nvar addToMap = [polygon];\n```\n\nReturns **[Feature][2]<([Polygon][7] | [MultiPolygon][8])>** converted to Polygons\n\n[1]: https://tools.ietf.org/html/rfc7946#section-3.3\n\n[2]: https://tools.ietf.org/html/rfc7946#section-3.2\n\n[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4\n\n[4]: https://tools.ietf.org/html/rfc7946#section-3.1.5\n\n[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object\n\n[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n\n[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6\n\n[8]: https://tools.ietf.org/html/rfc7946#section-3.1.7\n\n<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run \"yarn docs\" from the root of the turf project. -->\n\n---\n\nThis module is part of the [Turfjs project](https://turfjs.org/), an open source module collection dedicated to geographic algorithms. It is maintained in the [Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create PRs and issues.\n\n### Installation\n\nInstall this single module individually:\n\n```sh\n$ npm install @turf/line-to-polygon\n```\n\nOr install the all-encompassing @turf/turf module that includes all modules as functions:\n\n```sh\n$ npm install @turf/turf\n```\n","publish_time":1522847345879,"maintainers":[{"name":"smallsaucepan","email":"james@smallsaucepan.com"},{"name":"morgan.herlocker","email":"morganherlocker@gmail.com"},{"name":"twelch","email":"tim.j.welch@gmail.com"},{"name":"jamesmilneruk","email":"jamesmilner22@hotmail.com"},{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},{"name":"tmcw","email":"tom@macwright.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"mdfedderly","email":"mdfedderly@mdfedderly.com"}],"_cnpm_publish_time":1522847345879,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}