Questions tagged [flatten-js]

It support 2D data representation & geometry operations.

Home page: https://github.com/alexbol99/flatten-js

3 questions
3
votes
0 answers

The polygon returned from Flattenjs.BooleanOperations.unify doesn't make any sense

I'm using Flattenjs and Plotly to display polygons. The user can draw polygons anywhere with plotly. If the user draws polygons that are overlapping I want the ability to "merge" those polygons and display just one. Same this request:…
LCIII
  • 3,102
  • 3
  • 26
  • 43
1
vote
2 answers

2D geometry calculation - on flat surface

I am trying to do some geometry calculation (e.g distance from point to line) on 2D planar planes. Currently investigating turfjs to calculate distance from point to line. Code distance.js: // hello var turf = require('@turf/turf') init(); //…
Eric
  • 22,183
  • 20
  • 145
  • 196
0
votes
0 answers

Why do I get a TS2614 when import-destructure the default export of flatten-js library using ES module syntax but not when const-destructure it?

I wish to improve the developer experience of the flatten-js library by fixing an issue I encountered with it. When I do import { point } from '@flatten-js/core'; I get a TS error that point doesn't exist but if I do import Flatten from…
J. Barca
  • 538
  • 6
  • 19