You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is refactored to use Typescript, uses big integer to solve floating point accuracy causing errors. However it is likely quite a bit slower, unclear how much. Performance testing needed.
If polyclip-ts doesn't make sense to use, then we can at least better make use of polygon-clipping methods to prevent infinite loop errors. Right now we naively do chunking of features in user space. This might be better controlled through available environment variables.
Global settings are set via environment variables. POLYGON_CLIPPING_MAX_QUEUE_SIZE and POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS: Aims to prevent infinite loops - usually caused by floating-point math round-off errors. Defaults are 1,000,000.
As of Turf 7.2.0, polyclip-ts is now used in all of its clip functions instead of the polygon-clipping library. This supports more precision in floating point numbers which should blow up less, but likely at the expense of speed. It's unclear if this is worth using, need to test using real world large examples in SeaSketch.
The current geoprocessing clip and clipMultiMerge don't actually use turf. They use polygon-clipping directly. At the very least, it could be documented that the turf clip functions (union, difference) exist that the report developer could try. Both are viable options
It is refactored to use Typescript, uses big integer to solve floating point accuracy causing errors. However it is likely quite a bit slower, unclear how much. Performance testing needed.
Suggest looking at use of setPrecision - luizbarboza/polyclip-ts#5
The text was updated successfully, but these errors were encountered: