https://github.com/riatelab/geotoolbox
geojson toolbox
https://github.com/riatelab/geotoolbox
Last synced: about 1 month ago
JSON representation
geojson toolbox
- Host: GitHub
- URL: https://github.com/riatelab/geotoolbox
- Owner: riatelab
- License: mit
- Created: 2022-05-20T11:17:37.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-11T09:39:18.000Z (about 1 month ago)
- Last Synced: 2025-04-19T09:45:18.957Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://riatelab.github.io/geotoolbox
- Size: 2.77 MB
- Stars: 65
- Watchers: 5
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-frontend-gis - geotoolbox - Provides several GIS operations for use with geojson properties. Useful for thematic cartography. (👨💻 JavaScript Libraries / Data Processing)
README
   
# `geotoolbox@3`
**`geotoolbox`** is a javascript tool for geographers. It allows one to manage GeoJSON properties (attribute data) and provides several useful **GIS operations** for thematic cartography. The aim of geotoolbox is to offer functions designed to handle geoJSON directly, not just single features or geometries. As a result, the library is particularly **user-friendly** for users with little experience of javascript development. From a technical point of view, geotoolbox is largely based on **geos-wasm** GIS operators (a big thanks to Christoph Pahmeyer 🙏), but also on d3.geo and topojson. Geotoolbox also works well with other cartographic libraries such as `geoviz` and `bertin.js`. Note that there are other GIS libraries like `turf.js`, which is really great.

### ➡️ Installation
- CDN
``` html
```
- npm
```
npm install geotoolbox@3
```- Observable notebooks
``` js
geo = require("geotoolbox@3");
```### ➡️ Usage
Most functions take the same type of argument as input - a dataset and options - like `geotoolbox.myfunction(data, {options})`. Please note that functions based on geos-wasm are asynchronous.
- A buffer example
``` js
const mybyffer = await geotoolbox.buffer(data, {dist: 1000});
```- Data handling example (add a field in a geoJSON)
``` js
geotoolbox.derive(data, {
field: "gdppc", // the name of the new field
value: "gdp/pop*1000", // a function to calculate the value
mutate: true // to update the dataset
});
```
- Tests if two geometries intersect``` js
geotoolbox.intersects(data1, data2);
```### ➡️ How it works?
See documentation api: https://riatelab.github.io/geotoolbox