max-mapper / geojson-js-utils

JavaScript helper functions for manipulating GeoJSON
BSD 2-Clause "Simplified" License
402 stars 58 forks source link

Simplify method #41

Open stefanocudini opened 6 years ago

stefanocudini commented 6 years ago

hi!

great lib!

But I don't understood because the simplify method don't support geojson Linestring instead of a geojson array points, why? How can simplify a Geojson linestring? :o Usually working with geojson data the polyline is defined as a LineString:

{
   "type": "LineString",
   "coordinates": [
       [12.72, 42.23], [12.34, 42.32], ....
   ]
}

gju.simplify = function (source, kink) { /* source[] array of geojson points */