Comparing version 1.2.1 to 1.3.0
# v1.3.0 2024-06-26 | ||
- Added `force()` method to allow overcoming some artefacts | ||
- Added detection of epsilon stall | ||
- Removed `preSplitGrid` | ||
# v1.2.1 2022-11-30 | ||
@@ -3,0 +9,0 @@ |
@@ -10,3 +10,3 @@ { | ||
"name": "arrugator", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Utility for warping GIS-like triangular meshes to fit a projection; meant for helping WebGL raster reprojection.", | ||
@@ -13,0 +13,0 @@ "main": "arrugator.mjs", |
@@ -76,2 +76,9 @@ # Arrugator | ||
If there are antimeridian artefacts, or an "epsilon stall" warning appears on your console, you might want to "force" subdividing every segment before running the default subdivisions: | ||
```js | ||
arruga.force(); | ||
``` | ||
Once you're happy with the subdivisions, fetch the mesh state: | ||
@@ -109,4 +116,25 @@ | ||
## `LineArrugator` | ||
There is also `LineArrugator`, a lightweight form of `Arrugator` designed to work | ||
on segment lists ("polylines") instead of working on triangle meshes. | ||
The input is just a list of `[x,y]` coordinates, and the output is another list of | ||
`[x,y]` coordinates, projected. | ||
``` | ||
let arruga = new LineArrugator( | ||
proj4('EPSG:4326','EPSG:25830').forward, | ||
[[-50, 0], [40, 25]] | ||
); | ||
arruga.lowerEpsilon(10000); | ||
console.log(arruga.output()); | ||
``` | ||
### Legalese | ||
Released under the General Public License, v3. See the LICENSE file for details. |
Sorry, the diff of this file is not supported yet
55480
420
139