{"name":"@turf/line-to-polygon","version":"6.4.0","keywords":["turf","gis","polygon","linestring","line"],"author":{"name":"Turf Authors"},"license":"MIT","_id":"@turf/line-to-polygon@6.4.0","contributors":[{"name":"Denis Carriere","email":"@DenisCarriere"}],"homepage":"https://github.com/Turfjs/turf","bugs":{"url":"https://github.com/Turfjs/turf/issues"},"dist":{"shasum":"82fa2dac426ec2ca1c779bac104482e0bed9af73","tarball":"http://registry-npm.ywwl.com/@turf/line-to-polygon/download/@turf/line-to-polygon-6.4.0.tgz","fileCount":7,"integrity":"sha512-9UNqQL1voOVWRhD5tPEI5UEmEKk+RJVm/C/fjlaA7gfAh2ttq1DCtq3OFRZl+52brPPDYVAbx+72GgjMPSqt+A==","signatures":[{"sig":"MEUCIQDfWq/vHsJNkV3fwjZZd8Rn2+h0ytBWkFB8cUz4gYgk/QIgClJ2b9JqjWPgfo4R9t68jVpqLJS6ne9gnU5rE454nr4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgy06PCRA9TVsSAnZWagAALCsP/Rb3Q/lgaA/fhQWUqMcT\nnNdzqptTac+IzFaS79Qt0ONTay1nmif7//SzDiUWPWBv6cmdKSs+hhPn9A0m\nz5GALnzTRjdB0PoufjPkDAdUbaNiCdWokwpsELqxEOc9Qv2Uwm99Iy6wlWiZ\nC1pyMfIeKaVwPvOSs1TK88afJs05Svp4ds4lKpa08FHFGANSK65H+FEd5C2i\nEXeMksmlT0/xsymAo8hzhouNZV5+Lf0y4V2PNFss8tUb4sQkcwLJ4IF7zhBS\nrhdfyjeQOq5KDcCv2RiVJtTwDXc/KBA9zi8X59Q4vndRHn1Xam00tMMwZ0aU\nm+KlV62y7r2cZUyNYXeixmoGkkhLAcO4DsLP3Mk5gyg3uYco2Qzz7mKlDjY1\n7Lb2/ESlVYHPDMUehf+d6VFKXKKeli73ifkqXKjA8KdmKkHV0gNQaXnj9p9y\nqW+uwpf6AfFoDTWMHCMNwIQExvQw75vgRtJDmaiGtQOlgD9fKWbXWParo9SH\na4uy+S1lx4TrNfAM5kPIlz7rw9rSX66UxiaHerLqybFStNE0hAgew7nOVUkN\nl15HCYH6soBJdHRk3EFNpvlVfL1l0ZSyD51yTlL7ziOTkaRPoUpxd0LdVk4B\nNsD7m/I4MSBYWp5zcLc3kH1BRAPlbq1lbKpkvaGlKPqWTSvRFB3aiIPYUgTZ\n1DUx\r\n=BrGd\r\n-----END PGP SIGNATURE-----\r\n","size":4131,"noattachment":false,"key":"/@turf/line-to-polygon/-/@turf/line-to-polygon-6.4.0.tgz"},"main":"dist/js/index.js","types":"dist/js/index.d.ts","module":"dist/es/index.js","exports":{".":{"import":"./dist/es/index.js","require":"./dist/js/index.js"},"./package.json":"./package.json"},"gitHead":"1e62773cfc88c627cca8effcb5c14cfb65a905ac","scripts":{"docs":"node ../../scripts/generate-readmes","test":"npm-run-all test:*","bench":"ts-node bench.js","build":"npm-run-all build:*","build:es":"tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json","build:js":"tsc","test:tape":"ts-node -r esm test.js","test:types":"tsc --esModuleInterop --noEmit types.ts"},"_npmUser":{"name":"rowanwins","email":"rowanwins@yahoo.com.au"},"repository":{"url":"git://github.com/Turfjs/turf.git","type":"git"},"_npmVersion":"lerna/3.20.2/node@v14.14.0+x64 (darwin)","description":"turf line-to-polygon module","directories":{},"sideEffects":false,"_nodeVersion":"14.14.0","dependencies":{"@turf/bbox":"^6.4.0","@turf/clone":"^6.4.0","@turf/helpers":"^6.4.0","@turf/invariant":"^6.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tape":"*","tslint":"*","ts-node":"*","benchmark":"*","typescript":"*","@types/tape":"*","npm-run-all":"*","load-json-file":"*","write-json-file":"*"},"_npmOperationalInternal":{"tmp":"tmp/line-to-polygon_6.4.0_1623936655018_0.45951502582901105","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":1623936655108,"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":1623936655108,"dist-tags":{"latest":"7.4.0","prerelease":"7.1.0-alpha.70"}}