{"_id":"planar-graph-to-polyline","_rev":"18-b29825755b28e5990ab3eb32b2547396","name":"planar-graph-to-polyline","description":"Convert a planar graph to a collection of nest polylines","dist-tags":{"latest":"1.0.6"},"versions":{"0.0.0":{"name":"planar-graph-to-polyline","version":"0.0.0","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"0.0.0","point-in-big-polygon":"0.0.1","robust-orientation":"^1.0.1","planar-dual":"^1.0.0"},"devDependencies":{"tape":"^2.12.3"},"_id":"planar-graph-to-polyline@0.0.0","dist":{"shasum":"46ff24e4deabdec663cbb9a3f14bc93b377c870e","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-0.0.0.tgz","integrity":"sha512-cGOAARN3HUuQkZ0pFsw8ZpEouMKJPG1RIdeRLga78GBnur3W8jtHBT2Aew2m0uvUWh5GTweyUiTQGRQ2pVXGfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHaegSI9QLMKfxBS1/itRdp3bYD36TMmJVSKSHapxnpyAiBSdkrQ+lME65BGOt0/AxcbYeBthflWSJ6wRB+ua+22ag=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"0.0.1":{"name":"planar-graph-to-polyline","version":"0.0.1","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"0.0.0","point-in-big-polygon":"0.0.1","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"0.0.1","robust-sum":"0.0.3","dup":"0.0.0","uniq":"0.0.2"},"devDependencies":{"tape":"^2.12.3"},"_id":"planar-graph-to-polyline@0.0.1","dist":{"shasum":"408a8d876ce92d9340ae1d423b40c6cec19db5c2","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-0.0.1.tgz","integrity":"sha512-+Iii/LjPMlhyHpeSp6RcKDrU2Y8Ls2ZccHfD43rJiM1AXAY4Hsw0kinPOOc0j8ByJtRNiw5Th2SURsk7n9wdrw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOh8c3H8bR0tDbMoJGtRHhvidqgDjtm0qsjhgZMvEzXwIhALGUaUS20bMZ4dmXFGnlTOZPeGBjvALAJW+o1ADdcyLG"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"1.0.0":{"name":"planar-graph-to-polyline","version":"1.0.0","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"0.0.0","point-in-big-polygon":"0.0.1","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"^1.0.0","robust-sum":"^1.0.0","dup":"0.0.0","uniq":"0.0.2"},"devDependencies":{"tape":"^2.12.3"},"_id":"planar-graph-to-polyline@1.0.0","dist":{"shasum":"e45049eafcdac7f12a63f84920f5096c1e0d98b5","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-1.0.0.tgz","integrity":"sha512-5VB4bGdhst4lrdMPbbznAJA0iIm1IkFcb2gl0bhfsckhAXMdf+KMrwaTV0m+tT1oXZ/47bjuxvyqvbzU4T5qWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4rEUK97PfBM35OVHC3AVCvqBZCjN5p4QyVhNYl+ANLAiAO3TrDoj8zlopVVVzec/qtHoHN/8qM3ZDORL9CKEXYZg=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"1.0.1":{"name":"planar-graph-to-polyline","version":"1.0.1","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"^1.0.0","point-in-big-polygon":"^1.0.0","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"^1.0.0","robust-sum":"^1.0.0","dup":"^1.0.0","uniq":"^1.0.0"},"devDependencies":{"tape":"^2.12.3"},"_id":"planar-graph-to-polyline@1.0.1","dist":{"shasum":"6f15d2c2daa7a6f8d9c89d3dbf82ba6957b54e9c","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-1.0.1.tgz","integrity":"sha512-K5DW+WYGy5lnEhj3X0M746+pXYeNytq7z3hYo+YvLWDtL1hrFwEdViA5MQTjgurLgFzlyE/Y23hwB0m8v6hloQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFglrSGmXK7Pd8X9LVzUh7tVEBB4U5vqGrY0Se9lFtEgIgM+dX6Pfcqy2JPOfosKzMW4nQDjePyIWpeWGgqG5ZX48="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}]},"1.0.2":{"name":"planar-graph-to-polyline","version":"1.0.2","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"^1.0.0","point-in-big-polygon":"^1.0.0","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"^1.0.0","robust-sum":"^1.0.0","dup":"^1.0.0","uniq":"^1.0.0"},"devDependencies":{"tape":"^2.12.3"},"gitHead":"bacc99992cf5a57cc4b59f5ee7264c2aab98cacf","_id":"planar-graph-to-polyline@1.0.2","_shasum":"f7e3d2f8ad8de7e001a5de4321076edc2b81387b","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.26","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"dist":{"shasum":"f7e3d2f8ad8de7e001a5de4321076edc2b81387b","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-1.0.2.tgz","integrity":"sha512-vDuIw/U8UOtwcGjPmtMRsbUYZTt0o5JQe+HX9QZR02/ovHlnwNvpLSJy7hWjFBZpT+2BnGoEuoznl5LPyL3DBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF5M+v4Y7h+507i/FcyjrDC7YSLNck1Ril+EjcXWHS7hAiBrj8MfYdpzOo+W4+IvirXbdop8BoRN4sxKkUnxCEOT7Q=="}]}},"1.0.4":{"name":"planar-graph-to-polyline","version":"1.0.4","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"^1.0.0","point-in-big-polygon":"^2.0.0","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"^1.0.0","robust-sum":"^1.0.0","dup":"^1.0.0","uniq":"^1.0.0"},"devDependencies":{"tape":"^2.12.3"},"gitHead":"9352dc9b764bb6ea971afa5696536970cb9dfc23","_id":"planar-graph-to-polyline@1.0.4","_shasum":"25b62cee697a09d14afafd2a6a05e9a8bdae629e","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.26","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"dist":{"shasum":"25b62cee697a09d14afafd2a6a05e9a8bdae629e","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-1.0.4.tgz","integrity":"sha512-jAeQFjZIaMVG7qP/7ud51ZxG18zfCPAkkHAGBPg9JP6xminynWWWD/4i6+wVn47Wx17OkQXaUiT8MvoPLf+3Ag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQRz5kil3mPnSaZr8q0GM5X+eLkzHE9wMdkCK+uks8AAiB3X1n7U9UVDYAT1xhEQ/m0+ozTdigrBoOxb6S6a3J4jw=="}]}},"1.0.5":{"name":"planar-graph-to-polyline","version":"1.0.5","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"^1.0.0","point-in-big-polygon":"^2.0.0","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"^1.0.0","robust-sum":"^1.0.0","uniq":"^1.0.0"},"devDependencies":{"tape":"^3.5.0"},"gitHead":"078192fd8c09bff5151a1db2c06a77c12cdc5554","_id":"planar-graph-to-polyline@1.0.5","_shasum":"882b8605199ba88bfd464c9553303556c52b988a","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.26","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"dist":{"shasum":"882b8605199ba88bfd464c9553303556c52b988a","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-1.0.5.tgz","integrity":"sha512-SRTH7VDVxT78WIWOVe/1aChdT8BeTX472cFqsARwzEBDGNxzCtazofKwlQWiAsvph4yHVyCxhiKAUf74DHROMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtWs8W4n3YpHxxfh0DuinWDRb1kY6GjTBjZHhPhqUmSAiEAi6WSf3Csrul4jEYjxtCERyH1lxLHlBD49EWNVRsmB7w="}]}},"1.0.6":{"name":"planar-graph-to-polyline","version":"1.0.6","description":"Convert a planar graph to a collection of nest polylines","main":"pg2pl.js","directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","dependencies":{"edges-to-adjacency-list":"^1.0.0","point-in-big-polygon":"^2.0.1","robust-orientation":"^1.0.1","planar-dual":"^1.0.0","two-product":"^1.0.0","robust-sum":"^1.0.0","uniq":"^1.0.0"},"devDependencies":{"tape":"^3.5.0"},"gitHead":"bbba3d24d95042579f21d29d4f46245a2be4f533","_id":"planar-graph-to-polyline@1.0.6","_nodeVersion":"14.15.3","_npmVersion":"6.14.10","dist":{"integrity":"sha512-h8a9kdAjo7mRhC0X6HZ42xzFp7vKDZA+Hygyhsq/08Qi4vVAQYJaLLYLvKUUzRbVKvdYqq0reXHyV0EygyEBHA==","shasum":"ed300620c33001ee2cca0ac6d1dae8d02d23f009","tarball":"https://registry.npmjs.org/planar-graph-to-polyline/-/planar-graph-to-polyline-1.0.6.tgz","fileCount":7,"unpackedSize":12933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8FenCRA9TVsSAnZWagAA/BsP/igsNLHgOVDW0BI7xPJE\n1WQ9lQnSjn2tEF5qYDntVfMYys3sbBIiiGOdv1aieYQhdCAcAW8cxVKFnrw4\nQgRefSA3oBsEF+wexrRlf9AkUqGWUq0k+kO6lNa+45cLgkY4dTo3VxtZDLE+\nStqwMc4BYVwZ88tWYWtYMexiO58xRPkTy5ik0YYu2riP12MuNa7rVC7IkKps\nXWbfmq019JPksr9jFZ3nvczy7e0fpyF/LxzfT66HhA2lZWAUgonN2dQtWJyi\npkEIJTip/hz9ra2P1xUhMXZekMBPGRD7jnO2P7Ml731xOu3bmT4PxbIwdLD1\nqZ2AOAM19vFigoEFkHHPG1RKeoaFfeWd51xIVuk7MH97umRSA3tWxp5uxiEV\n8iDHjFlyA+nKyJ5wtkxXpaANPhfY3EBmap7IlGoO8TAK3Lui0fy63fB+IMKE\nExuqkbfooTt0p+1v/IinLT94R8haghXsT90tBlKXwa/xbeXpEj+dbhesFONE\nP+BFwQPLRoXiRnuJ70gz9r0mjQigdWiBhbM5/4L4JW8TiUoVW6xXuJ9rxAhI\nu0bd4Q2aW1GOPehNP7sA8ZHwzsJTfGdod5UI6ZMn2Zy8ctT/JClf3J66I6TE\n5Q1UZlu3wEV8Gp8rERtYeCXo46APVhu2SWRQsCxZMi/JIdbEABRBuEKMdgeN\nB/2R\r\n=1hBR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQTFT6SEBWSYL716A9EnXE6wGWiKgvuxQuD1KyO/4C4gIgJvg5VjPJpb9epqYqZ5riiawk9+BhuzE70L2GF/M9ZO4="}]},"_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/planar-graph-to-polyline_1.0.6_1626363815689_0.9340212340556131"},"_hasShrinkwrap":false}},"readme":"planar-graph-to-polyline\n========================\nConverts a planar graph to a collection of nested polylines (as would be consumed in a GeoJSON/TopoJSON file for example).\n\n# Example\n\n```javascript\nvar graphToPolygons = require(\"planar-graph-to-polyline\")\n\nvar edges = []\nvar positions = []\n\nfor(var i=1; i<=3; ++i) {\n  var v0 = positions.length\n  for(var j=0; j<10; ++j) {\n    var theta = 2.0 * Math.PI * j / 10\n    positions.push([ i * Math.cos(theta), i * Math.sin(theta) ])\n    edges.push([ v0+j, v0+((j+1)%10) ])\n  }\n}\n\nconsole.log(graphToPolygons(edges, positions))\n```\n\nOutput:\n\n```javascript\n[ [ [ 20, 29, 28, 27, 26, 25, 24, 23, 22, 21 ],\n    [ 11, 12, 13, 14, 15, 16, 17, 18, 19, 10 ] ],\n  [ [ 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 ] ] ]\n```\n\n# Install\n\n```\nnpm install planar-graph-to-polyline\n```\n\n# API\n\n#### `require(\"planar-graph-to-polyline\")(edges, positions)`\nConverts a planar graph into a collection of nested polylines\n\n* `edges` are the edges of the graph\n* `positions` are the locations of the vertices in the plane\n\n**Returns** A list of loops encoding the regions bounded by the graph\n\n# Credits\n(c) 2014 Mikola Lysenko. MIT License","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"time":{"modified":"2022-06-24T02:27:55.953Z","created":"2014-04-22T18:21:13.412Z","0.0.0":"2014-04-22T18:21:13.412Z","0.0.1":"2014-04-23T02:50:19.339Z","1.0.0":"2014-04-28T22:39:50.154Z","1.0.1":"2014-04-29T14:05:21.285Z","1.0.2":"2014-11-28T20:18:33.004Z","1.0.4":"2015-01-30T18:08:15.061Z","1.0.5":"2015-03-18T20:39:47.771Z","1.0.6":"2021-07-15T15:43:35.805Z"},"homepage":"https://github.com/mikolalysenko/planar-graph-to-polyline","keywords":["planar","graph","polygon","polyline","geojson","topojson","convert","multiline"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/planar-graph-to-polyline.git"},"author":{"name":"Mikola Lysenko"},"bugs":{"url":"https://github.com/mikolalysenko/planar-graph-to-polyline/issues"},"license":"MIT","readmeFilename":"README.md"}