{"_id":"searoute-js","_rev":"1-2a02a49c6dda16e1423308e47c19691f","name":"searoute-js","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"searoute-js","version":"0.1.0","description":"A package to calculate the shortest sea route between two points on Earth.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/johnx25bd/searoute.git"},"keywords":["maritime","route","searoute","shipping","dijkstra","javascript"],"author":{"name":"@johnx25bd"},"license":"MIT","bugs":{"url":"https://github.com/johnx25bd/searoute/issues"},"homepage":"https://github.com/johnx25bd/searoute#readme","dependencies":{"@turf/helpers":"^6.1.4","@turf/length":"^6.0.2","@turf/point-to-line-distance":"^6.0.0","geojson-path-finder":"^1.5.2"},"gitHead":"41ee1138490305272da65ca577c4565026788545","_id":"searoute-js@0.1.0","_nodeVersion":"13.1.0","_npmVersion":"6.12.1","dist":{"integrity":"sha512-s4EfPTs6Yat1wmVqld+PVGWt1zp4qHEdASSeTX9b1kJ8cgO+YooB36+vo/cRCOq4CbcgiSxK0boSYxuYOAlUOQ==","shasum":"11dabb3fcbca2a936fe047df1ecd5ffe0ce4c59f","tarball":"https://registry.npmjs.org/searoute-js/-/searoute-js-0.1.0.tgz","fileCount":7,"unpackedSize":3578216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemWYiCRA9TVsSAnZWagAAzKQP/jQ1PuqySIEViOR0xzwi\nZKO8+pRwK3t1goUlfsANx+Hh6lfopVeAj/4I7hMmTkp2qnPMWZp1nSq/gIC4\n+Rmfy2jmN25fe1NAEvRW8v5okegyAYFVFFWgkPtPJuyRyhl0fZ8hkQwADwgV\nrh975iR3E+l7AwVmtdEfYs/X5yMw//h2PSYWVCTx8Z24CioZhviH4mWwFydZ\n9q5waiZa871YGkWVEXzS5VRgrS4U6VzMIROdCXt4et/slRE+3RWlLgEtqVnz\ng2D5M+0Go4q81mZlctB6PYlIPQg58xIjYNGgEDKORmla2EMdDvmOUyng9swv\n8SM2RinuulTQfcSyTdqcZIgw+eY9xbfxeYg7ofAk5Dwhq9CBgYlh1I/JF8Kw\nZOtOy9uq6pPo5YdNg28iV+JJ3j9Koa3Z5evtzXHruAOXTltqI/IDJn7wcEJN\nPyzVrJ9RJL/K/IQgV+pa7viuKVC+PbJHx+bOmzHopAchlpOz/Inb7jKkjUqJ\ntrBgBKQiYNBINKYhG2sYxyKyU8Zexcn0Z9fvcm5Gpb1TTGrvrcqQihNyI4Io\nAr0Z5sipNH31TAXKTVR6WhHDH17NAvpMN6J4DNV1T5jHzNDJGdF4v5fBEhOb\nkGRyHIIE6TWSe9y4ijgW4LU/LzlPqnYEA1q12FFiRpa8F8klCFCh61tubOeB\ncCc/\r\n=j+yt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICi7GYPGg8KX1au0uuW8mt+sYoOuF60ATX9i5w65MniYAiAmVIIGcRJ8Qz+RECsfEBXFPTbmXL/8lpQ1a17I8YOH5w=="}]},"maintainers":[{"name":"johnx25bd","email":"john.iv@x25bd.com"}],"_npmUser":{"name":"johnx25bd","email":"john.iv@x25bd.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/searoute-js_0.1.0_1587111457464_0.1314087111440687"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-17T08:17:37.431Z","0.1.0":"2020-04-17T08:17:37.773Z","modified":"2022-05-17T09:03:15.078Z"},"maintainers":[{"name":"johnx25bd","email":"john.iv@x25bd.com"}],"description":"A package to calculate the shortest sea route between two points on Earth.","homepage":"https://github.com/johnx25bd/searoute#readme","keywords":["maritime","route","searoute","shipping","dijkstra","javascript"],"repository":{"type":"git","url":"git+https://github.com/johnx25bd/searoute.git"},"author":{"name":"@johnx25bd"},"bugs":{"url":"https://github.com/johnx25bd/searoute/issues"},"license":"MIT","readme":"# Searoute.js\n\nAn npm package for generating the shortest sea route between two points on Earth. \n\nIf points are on land, the function will attempt to find the nearest point on the sea and calculate the route from there. \n\n**Not for routing purposes!** This library was developed to generate realistic-looking searoutes for visualizations of maritime routes, not for mariners to route their ships. \n\n![Searoute map](./assets/searoute.png)\n\n## Installation\n\n~~~bash\nnpm install searoute-js\n~~~\n\n## Usage\n\n~~~javascript\nconst searoute = require('searoute-js');\n\n// Define origin and destination GeoJSON points:\nvar origin = {\n  \"type\": \"Feature\",\n  \"properties\": {},\n  \"geometry\": {\n    \"type\": \"Point\",\n    \"coordinates\": [\n      132.5390625,\n      21.616579336740603\n    ]\n  }\n}\n\nvar destination = {\n    \"type\": \"Feature\",\n    \"properties\": {},\n    \"geometry\": {\n      \"type\": \"Point\",\n      \"coordinates\": [\n        -71.3671875,\n        75.05035357407698\n      ]\n    }\n  }\n\n\nvar route = searoute(origin, destination);\n// > Returns a GeoJSON LineString Feature\n\n// Optionally, define the units for the length calculation included in the properties object.\n// Defaults to nautical miles, can be degrees, radians, miles, or kilometers.\nvar routeMiles = searoute(origin, destination, \"miles\");\n\n\n~~~\n\n## Credits\n\nBased on Eurostat's [Searoute Java library](https://github.com/eurostat/searoute) and Dijkstra's algorithm implemented by [perliedman](https://www.liedman.net/geojson-path-finder/).\n","readmeFilename":"README.md"}