Turf.js – Advanced geospatial analysis for browsers and node

turfjs

var line = turf.linestring([
  [-76.09130859375, 18.427501971948608],
  [-76.695556640625, 18.729501999072138],
  [-76.552734375, 19.40443049681278],
  [-74.619140625, 19.134789188332523],
  [-73.65234375, 20.076570104545173],
  [-73.157958984375, 20.210656234489853]], {
     stroke: '#f00'
  });
var curved = turf.bezier(line);
curved.properties = { stroke: '#0f0' };
var result = turf.featurecollection([line, curved]);

Uses GeoJSON for all geographic data and expects the data to be standard WGS84 datums. Constructing Points – for example – via Turf is the same as creating it via GeoJSON.

Turf.js →

Published by Bramus!

Bramus is a Freelance Web Developer from Belgium. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.