Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

untitled notebook

node v10.24.1
version: 1.0.0
endpointsharetweet
const shamosHoey = require('shamos-hoey') const coords = [{"x":279,"y":160},{"x":193,"y":313},{"x":193,"y":363},{"x":253,"y":414},{"x":331,"y":443},{"x":456,"y":419},{"x":490,"y":337},{"x":470,"y":290},{"x":395,"y":346},{"x":357,"y":370},{"x":292,"y":363},{"x":260,"y":328},{"x":279,"y":275},{"x":350,"y":233},{"x":408,"y":155},{"x":361,"y":128},{"x":157,"y":367}] const poly = {type: 'Polygon', coordinates: [coords.map(function (coord) { return [coord.x, coord.y] })]} const ip = shamosHoey(poly, {booleanOnly: false}) console.log(ip)
Loading…

no comments

    sign in to comment