geojupyter / jupytergis

JupyterGIS - Collaborative GIS editor in Jupyter
https://geojupyter.github.io/jupytergis
BSD 3-Clause "New" or "Revised" License
55 stars 11 forks source link

Use `Turf.js`? #166

Open arjxn-py opened 1 month ago

arjxn-py commented 1 month ago

This is just a small idea/proposal to use Turf.js in the project for performing geospatial operations on GeoJSON data. Turf.js provides a wide range of geospatial functions that can help us do several GIS operations in-browser.

Reasons to consider Turf.js:

  1. Comprehensive Geospatial Functions: Turf.js includes over 100 geospatial functions, such as:

    • Buffer, intersect, and union operations.
    • Geospatial analysis (area, distance, bearing, etc.).
    • Data transformation and manipulation (simplification, clipping, etc.).
  2. Lightweight and modular: Turf.js functions are modular, meaning we can include only the specific methods we need, keeping the package size optimized.

  3. Compatibility with GeoJSON: Turf.js works natively with GeoJSON, which is directly relevant to our project and makes integration straightforward.

  4. Compatibility with OpenLayers: Turf.js can be easily integrated with OpenLayers Example

Example Use Cases:

References:

arjxn-py commented 1 month ago

On a side note, this has also been discussed once with @martinRenou, and this issue is to keep track of that and get everyone's ideas. Thanks :)