Skip to content

Commit

Permalink
Merge pull request #9 from juanpujol/develop
Browse files Browse the repository at this point in the history
Release v0.1.2
  • Loading branch information
juanpujol authored Mar 12, 2024
2 parents 91ce4d2 + 5389e2a commit 0074b6a
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 48 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# PolyUnion Changelog

## v0.1.2 (2024-03-12)

### Fixes 🐞

- Remove default export to fix import issues with cjs. Thank you https://github.com/AbraaoAlves

## v0.1.1 (2024-03-04)

### Fixes 🐞
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ npm install polyunion
## Usage

```js
import polyunion from 'polyunion';
import { polyunion } from 'polyunion';

// Example GeoJSON FeatureCollection input
const features = {
Expand Down Expand Up @@ -53,4 +53,8 @@ console.log(mergedFeatureCollection);
The function has 2 parameters:

- `featureCollection` (required): A GeoJSON FeatureCollection containing polygons to merge.
- `totalPasses` (optional, defaults to 3): The total number of passes for internal use in recursive calls. The larger the number of iterations, the better the results, but the function will run slower. It depends on the number of polygons being merged. For the case in the picture above, 4 passes worked great.
- `totalPasses` (optional, defaults to 3): The total number of passes for recursive calls. Increasing the number of iterations can improve the results, but it will also prolong the execution time. It depends on the number of polygons being merged. For the case in the picture above, 4 passes worked great (350ms).

## Credits

I'm not smart enough to have created this from scratch. This took some back and forth with [ChatGPT](https://chat.openai.com) and I'm not ashamed to admit it. 😄
Loading

0 comments on commit 0074b6a

Please sign in to comment.