diff --git a/docs/200.html b/docs/200.html index 22a6cf05..53cbff38 100644 --- a/docs/200.html +++ b/docs/200.html @@ -3,7 +3,7 @@ Turf.js | Advanced Geospatial Analysis - Turf.js | Advanced geospatial analysis + Turf.js | Advanced geospatial analysis
@@ -13,5 +13,5 @@ - + diff --git a/docs/docs/index.html b/docs/docs/index.html index 98ccfc9d..18397812 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -3,10 +3,10 @@ Turf.js | Advanced Geospatial Analysis - Turf.js | Advanced geospatial analysis + Turf.js | Advanced geospatial analysis -
+ diff --git a/docs/getting-started/index.html b/docs/getting-started/index.html index f82f026f..a7c5e422 100644 --- a/docs/getting-started/index.html +++ b/docs/getting-started/index.html @@ -3,7 +3,7 @@ Turf.js | Advanced Geospatial Analysis - Turf.js | Advanced geospatial analysis + Turf.js | Advanced geospatial analysis
+};

Step 3 Run the following browserify command

$ browserify main.js -s turf > outTurf.js 

Done You can now use your outTurf.js file where you want just like you would normally use Turf, eg load it via a script tag and call turf using the turf global variable.

Examples

Below are some helpful resources for getting started with Turf.

Code Repositories

Turf & Node.js for geoprocessing tasks


Guides

Intro To Turf


Analysis with Turf.js

diff --git a/docs/index.html b/docs/index.html index cb7e7ea1..b00d731e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,7 +3,7 @@ Turf.js | Advanced Geospatial Analysis - Turf.js | Advanced geospatial analysis + Turf.js | Advanced geospatial analysis

Welcome to Turf.js

请选择
Input
Output

Advanced geospatial analysis for browsers and Node.js

Simple

Modular, simple-to-understand JavaScript functions that speak GeoJSON

Modular

Turf is a collection of small modules, you only need to take what you want to use

Fast

Takes advantage of the newest algorithms and doesn't require you to send data to a server

+

Welcome to Turf.js

请选择
Input
Output

Advanced geospatial analysis for browsers and Node.js

Simple

Modular, simple-to-understand JavaScript functions that speak GeoJSON

Modular

Turf is a collection of small modules, you only need to take what you want to use

Fast

Takes advantage of the newest algorithms and doesn't require you to send data to a server

diff --git a/docs/js/LICENSES b/docs/js/LICENSES index 5531163e..2d8fa3ae 100644 --- a/docs/js/LICENSES +++ b/docs/js/LICENSES @@ -1,6 +1,6 @@ /*! - * Vue.js v2.6.14 - * (c) 2014-2021 Evan You + * Vue.js v2.7.14 + * (c) 2014-2022 Evan You * Released under the MIT License. */ diff --git a/docs/js/app.5abee41081c14db4fe9a.js b/docs/js/app.5abee41081c14db4fe9a.js new file mode 100644 index 00000000..e7d00038 --- /dev/null +++ b/docs/js/app.5abee41081c14db4fe9a.js @@ -0,0 +1 @@ +webpackJsonp([5],{"0F0d":function(t,e,n){"use strict";e.a={name:"no-ssr",props:["placeholder"],data:function(){return{canRender:!1}},mounted:function(){this.canRender=!0},render:function(t){return this.canRender?this.$slots.default&&this.$slots.default[0]:t("div",{class:["no-ssr-placeholder"]},this.$slots.placeholder||this.placeholder)}}},A8YE:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,".nuxt-progress{position:fixed;top:0;left:0;right:0;height:2px;width:0;-webkit-transition:width .2s,opacity .4s;transition:width .2s,opacity .4s;opacity:1;background-color:#efc14e;z-index:999999}",""])},F88d:function(t,e,n){"use strict";var r=n("q/Mu"),o=n("kxK3"),a=!1;var i=function(t){a||n("cC6m")},s=n("VU/8")(r.a,o.a,!1,i,null,null);s.options.__file=".nuxt/components/nuxt-loading.vue",e.a=s.exports},"HBB+":function(t,e,n){"use strict";e.a={name:"nuxt-child",functional:!0,props:["keepAlive"],render:function(t,e){var n=e.parent,a=e.data,i=e.props;a.nuxtChild=!0;for(var s=n,u=n.$nuxt.nuxt.transitions,c=n.$nuxt.nuxt.defaultTransition,f=0;n;)n.$vnode&&n.$vnode.data.nuxtChild&&f++,n=n.$parent;a.nuxtChildDepth=f;var p=u[f]||c,l={};r.forEach(function(t){void 0!==p[t]&&(l[t]=p[t])});var d={};o.forEach(function(t){"function"==typeof p[t]&&(d[t]=p[t].bind(s))});var h=d.beforeEnter;d.beforeEnter=function(t){if(window.$nuxt.$emit("triggerScroll"),h)return h.call(s,t)};var x=[t("router-view",a)];return void 0!==i.keepAlive&&(x=[t("keep-alive",x)]),t("transition",{props:l,on:d},x)}};var r=["name","mode","appear","css","type","duration","enterClass","leaveClass","appearClass","enterActiveClass","enterActiveClass","leaveActiveClass","appearActiveClass","enterToClass","leaveToClass","appearToClass"],o=["beforeEnter","enter","afterEnter","enterCancelled","beforeLeave","leave","afterLeave","leaveCancelled","beforeAppear","appear","afterAppear","appearCancelled"]},"Hot+":function(t,e,n){"use strict";var r=n("/5sW"),o=n("HBB+"),a=n("ct3O"),i=n("YLfZ");e.a={name:"nuxt",props:["nuxtChildKey","keepAlive"],render:function(t){return this.nuxt.err?t("nuxt-error",{props:{error:this.nuxt.err}}):t("nuxt-child",{key:this.routerViewKey,props:this.$props})},beforeCreate:function(){r.default.util.defineReactive(this,"nuxt",this.$root.$options.nuxt)},computed:{routerViewKey:function(){if(void 0!==this.nuxtChildKey||this.$route.matched.length>1)return this.nuxtChildKey||Object(i.b)(this.$route.matched[0].path)(this.$route.params);var t=this.$route.matched[0]&&this.$route.matched[0].components.default;return t&&t.options&&t.options.key?"function"==typeof t.options.key?t.options.key(this.$route):t.options.key:this.$route.path}},components:{NuxtChild:o.a,NuxtError:a.a}}},IZcJ:function(t,e,n){"use strict";var r=n("/5sW"),o=n("BTaQ"),a=n.n(o);r.default.use(a.a)},LHtR:function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"__nuxt-error-page"},[e("div",{staticClass:"error"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"90",height:"90",fill:"#DBE1EC",viewBox:"0 0 48 48"}},[e("path",{attrs:{d:"M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}})]),e("div",{staticClass:"title"},[this._v(this._s(this.message))]),404===this.statusCode?e("p",{staticClass:"description"},[e("nuxt-link",{staticClass:"error-link",attrs:{to:"/"}},[this._v("Back to the home page")])],1):this._e(),this._m(0)])])};r._withStripped=!0;var o={render:r,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"logo"},[e("a",{attrs:{href:"https://nuxtjs.org",target:"_blank",rel:"noopener"}},[this._v("Nuxt.js")])])}]};e.a=o},Phgh:function(t,e,n){"use strict";var r=n("/5sW"),o=n("5CJf"),a=n.n(o);r.default.use(a.a)},T23V:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("pFYg"),o=n.n(r),a=n("//Fk"),i=n.n(a),s=n("Xxa5"),u=n.n(s),c=n("mvHQ"),f=n.n(c),p=n("exGp"),l=n.n(p),d=n("fZjL"),h=n.n(d),x=n("woOf"),m=n.n(x),v=n("/5sW"),y=n("unZF"),g=n("qcny"),b=n("YLfZ"),w=function(){var t=l()(u.a.mark(function t(e,n,r){var o,a,i=this;return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this._pathChanged=!!$.nuxt.err||n.path!==e.path,this._queryChanged=f()(e.query)!==f()(n.query),this._diffQuery=this._queryChanged?Object(b.g)(e.query,n.query):[],this._pathChanged&&this.$loading.start&&this.$loading.start(),t.prev=4,t.next=7,Object(b.k)(e);case 7:o=t.sent,!this._pathChanged&&this._queryChanged&&o.some(function(t){var e=t.options.watchQuery;return!0===e||!!Array.isArray(e)&&e.some(function(t){return i._diffQuery[t]})})&&this.$loading.start&&this.$loading.start(),r(),t.next=19;break;case 12:t.prev=12,t.t0=t.catch(4),t.t0=t.t0||{},a=t.t0.statusCode||t.t0.status||t.t0.response&&t.t0.response.status||500,this.error({statusCode:a,message:t.t0.message}),this.$nuxt.$emit("routeChanged",e,n,t.t0),r(!1);case 19:case"end":return t.stop()}},t,this,[[4,12]])}));return function(e,n,r){return t.apply(this,arguments)}}(),_=function(){var t=l()(u.a.mark(function t(e,n,r){var o,a,s,c,f,p,l,d,h=this;return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==this._pathChanged||!1!==this._queryChanged){t.next=2;break}return t.abrupt("return",r());case 2:return o=!1,a=function(t){if(n.path===t.path&&h.$loading.finish&&h.$loading.finish(),n.path!==t.path&&h.$loading.pause&&h.$loading.pause(),!o){o=!0;var e=[];k=Object(b.e)(n,e).map(function(t,r){return Object(b.b)(n.matched[e[r]].path)(n.params)}),r(t)}},t.next=6,Object(b.m)($,{route:e,from:n,next:a.bind(this)});case 6:if(this._dateLastError=$.nuxt.dateErr,this._hadError=!!$.nuxt.err,s=[],(c=Object(b.e)(e,s)).length){t.next=24;break}return t.next=13,A.call(this,c,$.context);case 13:if(!o){t.next=15;break}return t.abrupt("return");case 15:return t.next=17,this.loadLayout("function"==typeof g.a.layout?g.a.layout($.context):g.a.layout);case 17:return f=t.sent,t.next=20,A.call(this,c,$.context,f);case 20:if(!o){t.next=22;break}return t.abrupt("return");case 22:return $.context.error({statusCode:404,message:"This page could not be found"}),t.abrupt("return",r());case 24:return c.forEach(function(t){t._Ctor&&t._Ctor.options&&(t.options.asyncData=t._Ctor.options.asyncData,t.options.fetch=t._Ctor.options.fetch)}),this.setTransitions(R(c,e,n)),t.prev=26,t.next=29,A.call(this,c,$.context);case 29:if(!o){t.next=31;break}return t.abrupt("return");case 31:if(!$.context._errored){t.next=33;break}return t.abrupt("return",r());case 33:return"function"==typeof(p=c[0].options.layout)&&(p=p($.context)),t.next=37,this.loadLayout(p);case 37:return p=t.sent,t.next=40,A.call(this,c,$.context,p);case 40:if(!o){t.next=42;break}return t.abrupt("return");case 42:if(!$.context._errored){t.next=44;break}return t.abrupt("return",r());case 44:if(l=!0,c.forEach(function(t){l&&"function"==typeof t.options.validate&&(l=t.options.validate({params:e.params||{},query:e.query||{}}))}),l){t.next=49;break}return this.error({statusCode:404,message:"This page could not be found"}),t.abrupt("return",r());case 49:return t.next=51,i.a.all(c.map(function(t,n){if(t._path=Object(b.b)(e.matched[s[n]].path)(e.params),t._dataRefresh=!1,h._pathChanged&&t._path!==k[n])t._dataRefresh=!0;else if(!h._pathChanged&&h._queryChanged){var r=t.options.watchQuery;!0===r?t._dataRefresh=!0:Array.isArray(r)&&(t._dataRefresh=r.some(function(t){return h._diffQuery[t]}))}if(!h._hadError&&h._isMounted&&!t._dataRefresh)return i.a.resolve();var o=[],a=t.options.asyncData&&"function"==typeof t.options.asyncData,u=!!t.options.fetch,c=a&&u?30:45;if(a){var f=Object(b.j)(t.options.asyncData,$.context).then(function(e){Object(b.a)(t,e),h.$loading.increase&&h.$loading.increase(c)});o.push(f)}if(u){var p=t.options.fetch($.context);p&&(p instanceof i.a||"function"==typeof p.then)||(p=i.a.resolve(p)),p.then(function(t){h.$loading.increase&&h.$loading.increase(c)}),o.push(p)}return i.a.all(o)}));case 51:o||(this.$loading.finish&&this.$loading.finish(),k=c.map(function(t,n){return Object(b.b)(e.matched[s[n]].path)(e.params)}),r()),t.next=66;break;case 54:return t.prev=54,t.t0=t.catch(26),t.t0||(t.t0={}),k=[],t.t0.statusCode=t.t0.statusCode||t.t0.status||t.t0.response&&t.t0.response.status||500,"function"==typeof(d=g.a.layout)&&(d=d($.context)),t.next=63,this.loadLayout(d);case 63:this.error(t.t0),this.$nuxt.$emit("routeChanged",e,n,t.t0),r(!1);case 66:case"end":return t.stop()}},t,this,[[26,54]])}));return function(e,n,r){return t.apply(this,arguments)}}(),C=function(){var t=l()(u.a.mark(function t(e){var n,r,o,a;return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return $=e.app,j=e.router,t.next=4,i.a.all(T(j));case 4:return n=t.sent,r=new v.default($),o=E.layout||"default",t.next=9,r.loadLayout(o);case 9:if(r.setLayout(o),a=function(){r.$mount("#__nuxt"),v.default.nextTick(function(){M(r)})},r.setTransitions=r.$options.nuxt.setTransitions.bind(r),n.length&&(r.setTransitions(R(n,j.currentRoute)),k=j.currentRoute.matched.map(function(t){return Object(b.b)(t.path)(j.currentRoute.params)})),r.$loading={},E.error&&r.error(E.error),j.beforeEach(w.bind(r)),j.beforeEach(_.bind(r)),j.afterEach(S),j.afterEach(L.bind(r)),!E.serverRendered){t.next=22;break}return a(),t.abrupt("return");case 22:_.call(r,j.currentRoute,j.currentRoute,function(t){if(!t)return S(j.currentRoute,j.currentRoute),q.call(r,j.currentRoute),void a();j.push(t,function(){return a()},function(t){if(!t)return a();console.error(t)})});case 23:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),k=[],$=void 0,j=void 0,E=window.__NUXT__||{};function R(t,e,n){var r=function(t){var r=function(t,e){if(!t||!t.options||!t.options[e])return{};var n=t.options[e];if("function"==typeof n){for(var r=arguments.length,o=Array(r>2?r-2:0),a=2;a1&&void 0!==arguments[1]&&arguments[1];return[].concat.apply([],t.matched.map(function(t,n){return h()(t.instances).map(function(r){return e&&e.push(n),t.instances[r]})}))},e.c=w,e.k=_,n.d(e,"h",function(){return C}),n.d(e,"m",function(){return k}),e.i=function t(e,n){if(!e.length||n._redirected||n._errored)return l.a.resolve();return $(e[0],n).then(function(){return t(e.slice(1),n)})},e.j=$,e.d=function(t,e){var n=window.location.pathname;if("hash"===e)return window.location.hash.replace(/^#\//,"");t&&0===n.indexOf(t)&&(n=n.slice(t.length));return(n||"/")+window.location.search+window.location.hash},e.b=function(t,e){return function(t){for(var e=new Array(t.length),n=0;n1&&void 0!==arguments[1]&&arguments[1];return[].concat.apply([],t.matched.map(function(t,n){return h()(t.components).map(function(r){return e&&e.push(n),t.components[r]})}))}function w(t,e){return Array.prototype.concat.apply([],t.matched.map(function(t,n){return h()(t.components).map(function(r){return e(t.components[r],t.instances[r],t,r,n)})}))}function _(t){var e=this;return l.a.all(w(t,function(){var t=f()(u.a.mark(function t(n,r,o,a){return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof n||n.options){t.next=4;break}return t.next=3,n();case 3:n=t.sent;case 4:return t.abrupt("return",o.components[a]=g(n));case 5:case"end":return t.stop()}},t,e)}));return function(e,n,r,o){return t.apply(this,arguments)}}()))}window._nuxtReadyCbs=[],window.onNuxtReady=function(t){window._nuxtReadyCbs.push(t)};var C=function(){var t=f()(u.a.mark(function t(e){return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_(e);case 2:return t.abrupt("return",m()({},e,{meta:b(e).map(function(t){return t.options.meta||{}})}));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),k=function(){var t=f()(u.a.mark(function t(e,n){return u.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n.to?n.to:n.route,e.context){t.next=13;break}t.t0=!0,t.t1=e,t.t2=n.payload,t.t3=n.error,t.t4={},e.context={get isServer(){return console.warn("context.isServer has been deprecated, please use process.server instead."),!1},get isClient(){return console.warn("context.isClient has been deprecated, please use process.client instead."),!0},isStatic:t.t0,isDev:!1,isHMR:!1,app:t.t1,payload:t.t2,error:t.t3,base:"/",env:t.t4},n.req&&(e.context.req=n.req),n.res&&(e.context.res=n.res),e.context.redirect=function(t,n,r){if(t){e.context._redirected=!0;var o=void 0===n?"undefined":i()(n);if("number"==typeof t||"undefined"!==o&&"object"!==o||(r=n||{},o=void 0===(n=t)?"undefined":i()(n),t=302),"object"===o&&(n=e.router.resolve(n).href),!/(^[.]{1,2}\/)|(^\/(?!\/))/.test(n))throw n=A(n,r),window.location.replace(n),new Error("ERR_REDIRECT");e.context.next({path:n,query:r,status:t})}},e.context.nuxtState=window.__NUXT__;case 13:if(e.context.next=n.next,e.context._redirected=!1,e.context._errored=!1,e.context.isHMR=!!n.isHMR,!n.route){t.next=21;break}return t.next=20,C(n.route);case 20:e.context.route=t.sent;case 21:if(e.context.params=e.context.route.params||{},e.context.query=e.context.route.query||{},!n.from){t.next=27;break}return t.next=26,C(n.from);case 26:e.context.from=t.sent;case 27:case"end":return t.stop()}},t,this)}));return function(e,n){return t.apply(this,arguments)}}();function $(t,e){var n=void 0;return(n=2===t.length?new l.a(function(n){t(e,function(t,r){t&&e.error(t),n(r=r||{})})}):t(e))&&(n instanceof l.a||"function"==typeof n.then)||(n=l.a.resolve(n)),n}var j=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function E(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function R(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function O(t){return t.replace(/([.+*?=^!:()[\]|\/\\])/g,"\\$1")}function T(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function A(t,e){var n=void 0,r=t.indexOf("://");-1!==r?(n=t.substring(0,r),t=t.substring(r+3)):0===t.indexOf("//")&&(t=t.substring(2));var a=t.split("/"),i=(n?n+"://":"//")+a.shift(),s=a.filter(Boolean).join("/"),u=void 0;return 2===(a=s.split("#")).length&&(s=a[0],u=a[1]),i+=s?"/"+s:"",e&&"{}"!==o()(e)&&(i+=(2===t.split("?").length?"&":"?")+function(t){return h()(t).sort().map(function(e){var n=t[e];return null==n?"":Array.isArray(n)?n.slice().map(function(t){return[e,"=",t].join("")}).join("&"):e+"="+n}).filter(Boolean).join("&")}(e)),i+=u?"#"+u:""}},YtZR:function(t,e,n){var r=n("rT3t");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("3795b723",r,!1,{sourceMap:!1})},cC6m:function(t,e,n){var r=n("A8YE");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("12b08fd0",r,!1,{sourceMap:!1})},ct3O:function(t,e,n){"use strict";var r=n("s/9M"),o=n("LHtR"),a=!1;var i=function(t){a||n("YtZR")},s=n("VU/8")(r.a,o.a,!1,i,null,null);s.options.__file=".nuxt/components/nuxt-error.vue",e.a=s.exports},kxK3:function(t,e,n){"use strict";var r=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"nuxt-progress",style:{width:this.percent+"%",height:this.height,"background-color":this.canSuccess?this.color:this.failedColor,opacity:this.show?1:0}})};r._withStripped=!0;var o={render:r,staticRenderFns:[]};e.a=o},mtxM:function(t,e,n){"use strict";e.a=function(){return new i.default({mode:"history",base:"/",linkActiveClass:"nuxt-link-active",linkExactActiveClass:"nuxt-link-exact-active",scrollBehavior:f,routes:[{path:"/docs",component:s,name:"docs"},{path:"/getting-started",component:u,name:"getting-started"},{path:"/",component:c,name:"index"}],fallback:!1})};var r=n("//Fk"),o=n.n(r),a=n("/5sW"),i=n("/ocq");a.default.use(i.default);var s=function(){return n.e(0).then(n.bind(null,"CxOa")).then(function(t){return t.default||t})},u=function(){return n.e(3).then(n.bind(null,"L6rg")).then(function(t){return t.default||t})},c=function(){return n.e(2).then(n.bind(null,"2NXm")).then(function(t){return t.default||t})};window.history.scrollRestoration="manual";var f=function(t,e,n){var r=!1;return t.matched.length<2?r={x:0,y:0}:t.matched.some(function(t){return t.components.default.options.scrollToTop})&&(r={x:0,y:0}),n&&(r=n),new o.a(function(e){window.$nuxt.$once("triggerScroll",function(){if(t.hash){var n=t.hash;void 0!==window.CSS&&void 0!==window.CSS.escape&&(n="#"+window.CSS.escape(n.substr(1)));try{document.querySelector(n)&&(r={selector:n})}catch(t){console.warn("Failed to save scroll position. Please add CSS.escape() polyfill (https://github.com/mathiasbynens/CSS.escape).")}}e(r)})})}},pOfJ:function(t,e,n){"use strict";var r=n("/5sW"),o=n("6OFi"),a=n.n(o);r.default.use(a.a)},"q/Mu":function(t,e,n){"use strict";var r=n("/5sW");e.a={name:"nuxt-loading",data:function(){return{percent:0,show:!1,canSuccess:!0,duration:5e3,height:"2px",color:"#3B8070",failedColor:"red"}},methods:{start:function(){var t=this;return this.show=!0,this.canSuccess=!0,this._timer&&(clearInterval(this._timer),this.percent=0),this._cut=1e4/Math.floor(this.duration),this._timer=setInterval(function(){t.increase(t._cut*Math.random()),t.percent>95&&t.finish()},100),this},set:function(t){return this.show=!0,this.canSuccess=!0,this.percent=Math.floor(t),this},get:function(){return Math.floor(this.percent)},increase:function(t){return this.percent=this.percent+Math.floor(t),this},decrease:function(t){return this.percent=this.percent-Math.floor(t),this},finish:function(){return this.percent=100,this.hide(),this},pause:function(){return clearInterval(this._timer),this},hide:function(){var t=this;return clearInterval(this._timer),this._timer=null,setTimeout(function(){t.show=!1,r.default.nextTick(function(){setTimeout(function(){t.percent=0},200)})},500),this},fail:function(){return this.canSuccess=!1,this}}}},qcny:function(t,e,n){"use strict";n.d(e,"b",function(){return T});var r=n("Xxa5"),o=n.n(r),a=n("//Fk"),i=(n.n(a),n("C4MV")),s=n.n(i),u=n("woOf"),c=n.n(u),f=n("Dd8w"),p=n.n(f),l=n("exGp"),d=n.n(l),h=n("MU8w"),x=(n.n(h),n("/5sW")),m=n("p3jY"),v=n.n(m),y=n("mtxM"),g=n("0F0d"),b=n("HBB+"),w=n("WRRc"),_=n("ct3O"),C=n("Hot+"),k=n("yTq1"),$=n("YLfZ"),j=n("Phgh"),E=n("pOfJ"),R=n("IZcJ"),O=n("tXrW");n.d(e,"a",function(){return _.a});var T=function(){var t=d()(o.a.mark(function t(e){var n,r,a,i,u,f;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(y.a)(e),r=p()({router:n,nuxt:{defaultTransition:A,transitions:[A],setTransitions:function(t){return Array.isArray(t)||(t=[t]),t=t.map(function(t){return t=t?"string"==typeof t?c()({},A,{name:t}):c()({},A,t):A}),this.$options.nuxt.transitions=t,t},err:null,dateErr:null,error:function(t){t=t||null,r.context._errored=!!t,"string"==typeof t&&(t={statusCode:500,message:t});var n=this.nuxt||this.$options.nuxt;return n.dateErr=Date.now(),n.err=t,e&&(e.nuxt.error=t),t}}},k.a),a=e?e.next:function(t){return r.router.push(t)},i=void 0,e?i=n.resolve(e.url).route:(u=Object($.d)(n.options.base),i=n.resolve(u).route),t.next=7,Object($.m)(r,{route:i,next:a,error:r.nuxt.error.bind(r),payload:e?e.payload:void 0,req:e?e.req:void 0,res:e?e.res:void 0,beforeRenderFns:e?e.beforeRenderFns:void 0});case 7:if(f=function(t,e){if(!t)throw new Error("inject(key, value) has no key provided");if(!e)throw new Error("inject(key, value) has no value provided");r[t="$"+t]=e;var n="__nuxt_"+t+"_installed__";x.default[n]||(x.default[n]=!0,x.default.use(function(){x.default.prototype.hasOwnProperty(t)||s()(x.default.prototype,t,{get:function(){return this.$root.$options[t]}})}))},"function"!=typeof j.default){t.next=11;break}return t.next=11,Object(j.default)(r.context,f);case 11:if("function"!=typeof E.default){t.next=14;break}return t.next=14,Object(E.default)(r.context,f);case 14:if("function"!=typeof R.default){t.next=17;break}return t.next=17,Object(R.default)(r.context,f);case 17:if("function"!=typeof O.default){t.next=21;break}return t.next=21,Object(O.default)(r.context,f);case 21:t.next=24;break;case 24:return t.abrupt("return",{app:r,router:n});case 25:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}();x.default.component(g.a.name,g.a),x.default.component(b.a.name,b.a),x.default.component(w.a.name,w.a),x.default.component(C.a.name,C.a),x.default.use(v.a,{keyName:"head",attribute:"data-n-head",ssrAttribute:"data-n-head-ssr",tagIDKeyName:"hid"});var A={name:"page",mode:"out-in",appear:!1,appearClass:"appear",appearActiveClass:"appear-active",appearToClass:"appear-to"}},rT3t:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,".__nuxt-error-page{padding:16px;padding:1rem;background:#f7f8fb;color:#47494e;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;font-family:sans-serif;font-weight:100!important;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;position:absolute;top:0;left:0;right:0;bottom:0}.__nuxt-error-page .error{max-width:450px}.__nuxt-error-page .title{font-size:24px;font-size:1.5rem;margin-top:15px;color:#47494e;margin-bottom:8px}.__nuxt-error-page .description{color:#7f828b;line-height:21px;margin-bottom:10px}.__nuxt-error-page a{color:#7f828b!important;text-decoration:none}.__nuxt-error-page .logo{position:fixed;left:12px;bottom:12px}",""])},"s/9M":function(t,e,n){"use strict";e.a={name:"nuxt-error",props:["error"],head:function(){return{title:this.message,meta:[{name:"viewport",content:"width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"}]}},computed:{statusCode:function(){return this.error&&this.error.statusCode||500},message:function(){return this.error.message||"Error"}}}},tXrW:function(t,e,n){"use strict";var r=n("/5sW"),o=n("GBOZ");n("p3C9"),r.default.use(o.a)},unZF:function(t,e,n){"use strict";e.a={}},yTq1:function(t,e,n){"use strict";var r=n("//Fk"),o=n.n(r),a=n("/5sW"),i=n("F88d"),s={_default:function(){return n.e(1).then(n.bind(null,"lfHO")).then(function(t){return t.default||t})}},u={};e.a={head:{title:"Turf.js | Advanced geospatial analysis",meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{hid:"description",name:"description",content:"Turf.js | Advanced geospatial analysis for browsers and Node.js"}],link:[{rel:"icon",type:"image/x-icon",href:"/favicon.ico"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Montserrat:200,400"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Istok+Web"},{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/iview/2.7.4/styles/iview.css"}],style:[],script:[]},render:function(t,e){var n=t("nuxt-loading",{ref:"loading"}),r=t(this.layout||"nuxt");return t("div",{domProps:{id:"__nuxt"}},[n,t("transition",{props:{name:"layout",mode:"out-in"}},[t("div",{domProps:{id:"__layout"},key:this.layoutName},[r])])])},data:function(){return{layout:null,layoutName:""}},beforeCreate:function(){a.default.util.defineReactive(this,"nuxt",this.$options.nuxt)},created:function(){a.default.prototype.$nuxt=this,"undefined"!=typeof window&&(window.$nuxt=this),this.error=this.nuxt.error},mounted:function(){this.$loading=this.$refs.loading},watch:{"nuxt.err":"errorChanged"},methods:{errorChanged:function(){this.nuxt.err&&this.$loading&&(this.$loading.fail&&this.$loading.fail(),this.$loading.finish&&this.$loading.finish())},setLayout:function(t){t&&u["_"+t]||(t="default"),this.layoutName=t;var e="_"+t;return this.layout=u[e],this.layout},loadLayout:function(t){var e=this;t&&(s["_"+t]||u["_"+t])||(t="default");var n="_"+t;return u[n]?o.a.resolve(u[n]):s[n]().then(function(t){return u[n]=t,delete s[n],u[n]}).catch(function(t){if(e.$nuxt)return e.$nuxt.error({statusCode:500,message:t.message})})}},components:{NuxtLoading:i.a}}}},["T23V"]); \ No newline at end of file diff --git a/docs/js/layouts/default.53b86a39fb4547f988cd.js b/docs/js/layouts/default.53b86a39fb4547f988cd.js new file mode 100644 index 00000000..68f908c0 --- /dev/null +++ b/docs/js/layouts/default.53b86a39fb4547f988cd.js @@ -0,0 +1 @@ +webpackJsonp([1],{"/BnR":function(t,e,n){"use strict";var r=n("lZ5c"),o=n("JzRy"),a=n("2LA7"),i=n.n(a);e.a={name:"app",components:{Sidebar:r.a,Github:o.a},data:function(){return{selectedModuleName:"along",modules:i.a.modules}},computed:{selectedModule:function(){return{}},isDocsPage:function(){return"docs"===this.$route.name}},methods:{setModule:function(t){location.hash=t,this.selectedModuleName=t}}}},"/FRg":function(t,e,n){var r=n("uUoQ");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("54b59656",r,!1,{sourceMap:!1})},"2LA7":function(t,e){t.exports={modules:[{group:"Measurement",modules:[{name:"along",hidden:!1,parent:null,description:'Takes a LineString and returns a Point at a specified distance along the line.',snippet:"var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]]);\nvar options = {units: 'miles'};\n\nvar along = turf.along(line, 200, options);\n",example:"var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]]);\nvar options = {units: 'miles'};\n\nvar along = turf.along(line, 200, options);\n\n//addToMap\nvar addToMap = [along, line]",hasMap:!0,npmName:"@turf/along",returns:[{type:'Feature <Point>',desc:"Point distance units along the line"}],params:[{Argument:"line",Type:'Feature <LineString>',Description:"input line"},{Argument:"distance",Type:"number",Description:"distance along the line"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"area",hidden:!1,parent:null,description:"Takes one or more features and returns their area in square meters.",snippet:"var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);\n\nvar area = turf.area(polygon);\n",example:"var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);\n\nvar area = turf.area(polygon);\n\n//addToMap\nvar addToMap = [polygon]\npolygon.properties.area = area",hasMap:!0,npmName:"@turf/area",returns:[{type:"number",desc:"area in square meters"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input GeoJSON feature(s)"}],options:null,throws:[]},{name:"bbox",hidden:!1,parent:null,description:"Takes a set of features, calculates the bbox of all input features, and returns a bounding box.",snippet:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\nvar bbox = turf.bbox(line);\nvar bboxPolygon = turf.bboxPolygon(bbox);\n",example:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\nvar bbox = turf.bbox(line);\nvar bboxPolygon = turf.bboxPolygon(bbox);\n\n//addToMap\nvar addToMap = [line, bboxPolygon]",hasMap:!0,npmName:"@turf/bbox",returns:[{type:'BBox',desc:"bbox extent in minX, minY, maxX, maxY order"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any GeoJSON object"}],options:null,throws:[]},{name:"bboxPolygon",hidden:!1,parent:null,description:'Takes a bbox and returns an equivalent polygon.',snippet:"var bbox = [0, 0, 10, 10];\n\nvar poly = turf.bboxPolygon(bbox);\n",example:"var bbox = [0, 0, 10, 10];\n\nvar poly = turf.bboxPolygon(bbox);\n\n//addToMap\nvar addToMap = [poly]",hasMap:!0,npmName:"@turf/bbox-polygon",returns:[{type:'Feature <Polygon>',desc:"a Polygon representation of the bounding box"}],params:[{Argument:"bbox",Type:'BBox',Description:"extent in minX, minY, maxX, maxY order"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Properties",Default:"{}",Description:"Translate properties to Polygon"},{Prop:"id",Type:"(string|number)",Default:"{}",Description:"Translate Id to Polygon"}],throws:[]},{name:"bearing",hidden:!1,parent:null,description:'Takes two points and finds the geographic bearing between them,\ni.e. the angle measured in degrees from the north line (0 degrees)',snippet:"var point1 = turf.point([-75.343, 39.984]);\nvar point2 = turf.point([-75.534, 39.123]);\n\nvar bearing = turf.bearing(point1, point2);\n",example:"var point1 = turf.point([-75.343, 39.984]);\nvar point2 = turf.point([-75.534, 39.123]);\n\nvar bearing = turf.bearing(point1, point2);\n\n//addToMap\nvar addToMap = [point1, point2]\npoint1.properties['marker-color'] = '#f00'\npoint2.properties['marker-color'] = '#0f0'\npoint1.properties.bearing = bearing",hasMap:!0,npmName:"@turf/bearing",returns:[{type:"number",desc:"bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)"}],params:[{Argument:"start",Type:'Coord',Description:"starting Point"},{Argument:"end",Type:'Coord',Description:"ending Point"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"final",Type:"boolean",Default:"false",Description:"calculates the final bearing if true"}],throws:[]},{name:"center",hidden:!1,parent:null,description:'Takes a Feature or FeatureCollection and returns the absolute center point of all features.',snippet:"var features = turf.points([\n [-97.522259, 35.4691],\n [-97.502754, 35.463455],\n [-97.508269, 35.463245]\n]);\n\nvar center = turf.center(features);\n",example:"var features = turf.points([\n [-97.522259, 35.4691],\n [-97.502754, 35.463455],\n [-97.508269, 35.463245]\n]);\n\nvar center = turf.center(features);\n\n//addToMap\nvar addToMap = [features, center]\ncenter.properties['marker-size'] = 'large';\ncenter.properties['marker-color'] = '#000';",hasMap:!0,npmName:"@turf/center",returns:[{type:'Feature <Point>',desc:"a Point feature at the absolute center point of all input features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be centered"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate GeoJSON Properties to Point"},{Prop:"bbox",Type:"Object",Default:"{}",Description:"Translate GeoJSON BBox to Point"},{Prop:"id",Type:"Object",Default:"{}",Description:"Translate GeoJSON Id to Point"}],throws:[]},{name:"centerOfMass",hidden:!1,parent:null,description:'Takes any Feature or a FeatureCollection and returns its center of mass using this formula: Centroid of Polygon.',snippet:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar center = turf.centerOfMass(polygon);\n",example:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar center = turf.centerOfMass(polygon);\n\n//addToMap\nvar addToMap = [polygon, center]",hasMap:!0,npmName:"@turf/center-of-mass",returns:[{type:'Feature <Point>',desc:"the center of mass"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be centered"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate Properties to Feature"}],throws:[]},{name:"centroid",hidden:!1,parent:null,description:"Takes one or more features and calculates the centroid using the mean of all vertices.\nThis lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.",snippet:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar centroid = turf.centroid(polygon);\n",example:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar centroid = turf.centroid(polygon);\n\n//addToMap\nvar addToMap = [polygon, centroid]",hasMap:!0,npmName:"@turf/centroid",returns:[{type:'Feature <Point>',desc:"the centroid of the input features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be centered"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"an Object that is used as the "}],throws:[]},{name:"destination",hidden:!1,parent:null,description:'Takes a Point and calculates the location of a destination point given a distance in\ndegrees, radians, miles, or kilometers; and bearing in degrees.\nThis uses the Haversine formula to account for global curvature.',snippet:"var point = turf.point([-75.343, 39.984]);\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: 'miles'};\n\nvar destination = turf.destination(point, distance, bearing, options);\n",example:"var point = turf.point([-75.343, 39.984]);\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: 'miles'};\n\nvar destination = turf.destination(point, distance, bearing, options);\n\n//addToMap\nvar addToMap = [point, destination]\ndestination.properties['marker-color'] = '#f00';\npoint.properties['marker-color'] = '#0f0';",hasMap:!0,npmName:"@turf/destination",returns:[{type:'Feature <Point>',desc:"destination point"}],params:[{Argument:"origin",Type:'Coord',Description:"starting point"},{Argument:"distance",Type:"number",Description:"distance from the origin point"},{Argument:"bearing",Type:"number",Description:"ranging from -180 to 180"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"},{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate properties to Point"}],throws:[]},{name:"distance",hidden:!1,parent:null,description:'Calculates the distance between two points in degrees, radians, miles, or kilometers.\nThis uses the Haversine formula to account for global curvature.',snippet:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.distance(from, to, options);\n",example:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.distance(from, to, options);\n\n//addToMap\nvar addToMap = [from, to];\nfrom.properties.distance = distance;\nto.properties.distance = distance;",hasMap:!0,npmName:"@turf/distance",returns:[{type:"number",desc:"distance between the two points"}],params:[{Argument:"from",Type:'(Coord|Point)',Description:"origin point or coordinate"},{Argument:"to",Type:'(Coord|Point)',Description:"destination point or coordinate"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"envelope",hidden:!1,parent:null,description:'Takes any number of features and returns a rectangular Polygon that encompasses all vertices.',snippet:'var features = turf.featureCollection([\n turf.point([-75.343, 39.984], {"name": "Location A"}),\n turf.point([-75.833, 39.284], {"name": "Location B"}),\n turf.point([-75.534, 39.123], {"name": "Location C"})\n]);\n\nvar enveloped = turf.envelope(features);\n',example:'var features = turf.featureCollection([\n turf.point([-75.343, 39.984], {"name": "Location A"}),\n turf.point([-75.833, 39.284], {"name": "Location B"}),\n turf.point([-75.534, 39.123], {"name": "Location C"})\n]);\n\nvar enveloped = turf.envelope(features);\n\n//addToMap\nvar addToMap = [features, enveloped];',hasMap:!0,npmName:"@turf/envelope",returns:[{type:'Feature <Polygon>',desc:"a rectangular Polygon feature that encompasses all vertices"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input features"}],options:null,throws:[]},{name:"length",hidden:!1,parent:null,description:'Takes a GeoJSON and measures its length in the specified units, (Multi)Point \'s distance are ignored.',snippet:"var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]]);\nvar length = turf.length(line, {units: 'miles'});\n",example:"var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]]);\nvar length = turf.length(line, {units: 'miles'});\n\n//addToMap\nvar addToMap = [line];\nline.properties.distance = length;",hasMap:!0,npmName:"@turf/length",returns:[{type:"number",desc:"length of GeoJSON"}],params:[{Argument:"geojson",Type:'Feature <(LineString|MultiLineString)>',Description:"GeoJSON to measure"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"kilometers",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"midpoint",hidden:!1,parent:null,description:'Takes two points and returns a point midway between them.\nThe midpoint is calculated geodesically, meaning the curvature of the earth is taken into account.',snippet:"var point1 = turf.point([144.834823, -37.771257]);\nvar point2 = turf.point([145.14244, -37.830937]);\n\nvar midpoint = turf.midpoint(point1, point2);\n",example:"var point1 = turf.point([144.834823, -37.771257]);\nvar point2 = turf.point([145.14244, -37.830937]);\n\nvar midpoint = turf.midpoint(point1, point2);\n\n//addToMap\nvar addToMap = [point1, point2, midpoint];\nmidpoint.properties['marker-color'] = '#f00';",hasMap:!0,npmName:"@turf/midpoint",returns:[{type:'Feature <Point>',desc:"a point midway between pt1 and pt2"}],params:[{Argument:"point1",Type:'Coord',Description:"first point"},{Argument:"point2",Type:'Coord',Description:"second point"}],options:null,throws:[]},{name:"pointOnFeature",hidden:!1,parent:null,description:'Takes a Feature or FeatureCollection and returns a Point guaranteed to be on the surface of the feature.',snippet:"var polygon = turf.polygon([[\n [116, -36],\n [131, -32],\n [146, -43],\n [155, -25],\n [133, -9],\n [111, -22],\n [116, -36]\n]]);\n\nvar pointOnPolygon = turf.pointOnFeature(polygon);\n",example:"var polygon = turf.polygon([[\n [116, -36],\n [131, -32],\n [146, -43],\n [155, -25],\n [133, -9],\n [111, -22],\n [116, -36]\n]]);\n\nvar pointOnPolygon = turf.pointOnFeature(polygon);\n\n//addToMap\nvar addToMap = [polygon, pointOnPolygon];",hasMap:!0,npmName:"@turf/point-on-feature",returns:[{type:'Feature <Point>',desc:"a point on the surface of input"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any Feature or FeatureCollection"}],options:null,throws:[]},{name:"polygonTangents",hidden:!1,parent:null,description:'Finds the tangents of a (Multi)Polygon from a Point.',snippet:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar point = turf.point([61, 5]);\n\nvar tangents = turf.polygonTangents(point, polygon)\n",example:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar point = turf.point([61, 5]);\n\nvar tangents = turf.polygonTangents(point, polygon)\n\n//addToMap\nvar addToMap = [tangents, point, polygon];",hasMap:!0,npmName:"@turf/polygon-tangents",returns:[{type:'FeatureCollection <Point>',desc:"Feature Collection containing the two tangent points"}],params:[{Argument:"pt",Type:'Coord',Description:"to calculate the tangent points from"},{Argument:"polygon",Type:'Feature <(Polygon|MultiPolygon)>',Description:"to get tangents from"}],options:null,throws:[]},{name:"pointToLineDistance",hidden:!1,parent:null,description:'Returns the minimum distance between a Point and a LineString , being the distance from a line the\nminimum distance between the point and any segment of the LineString.',snippet:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[1, 1],[-1, 1]]);\n\nvar distance = turf.pointToLineDistance(pt, line, {units: 'miles'});\n//=69.11854715938406",example:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[1, 1],[-1, 1]]);\n\nvar distance = turf.pointToLineDistance(pt, line, {units: 'miles'});\n//=69.11854715938406",hasMap:!1,npmName:"@turf/point-to-line-distance",returns:[{type:"number",desc:"distance between point and line"}],params:[{Argument:"pt",Type:'(Feature <Point>|Array )',Description:"Feature or Geometry"},{Argument:"line",Type:'Feature <LineString>',Description:"GeoJSON Feature or Geometry"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"can be anything supported by turf/convertLength\n(ex: degrees, radians, miles, or kilometers)"},{Prop:"method",Type:"string",Default:'"geodesic"',Description:"wether to calculate the distance based on geodesic (spheroid) or\nplanar (flat) method. Valid options are 'geodesic' or 'planar'."}],throws:[]},{name:"rhumbBearing",hidden:!1,parent:null,description:'Takes two points and finds the bearing angle between them along a Rhumb line\ni.e. the angle measured in degrees start the north line (0 degrees)',snippet:'var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});\nvar point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});\n\nvar bearing = turf.rhumbBearing(point1, point2);\n',example:'var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});\nvar point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});\n\nvar bearing = turf.rhumbBearing(point1, point2);\n\n//addToMap\nvar addToMap = [point1, point2];\npoint1.properties.bearing = bearing;\npoint2.properties.bearing = bearing;',hasMap:!0,npmName:"@turf/rhumb-bearing",returns:[{type:"number",desc:"bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)"}],params:[{Argument:"start",Type:'Coord',Description:"starting Point"},{Argument:"end",Type:'Coord',Description:"ending Point"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"final",Type:"boolean",Default:"false",Description:"calculates the final bearing if true"}],throws:[]},{name:"rhumbDestination",hidden:!1,parent:null,description:'Returns the destination Point having travelled the given distance along a Rhumb line from the\norigin Point with the (varant) given bearing.',snippet:'var pt = turf.point([-75.343, 39.984], {"marker-color": "F00"});\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: \'miles\'};\n\nvar destination = turf.rhumbDestination(pt, distance, bearing, options);\n',example:"var pt = turf.point([-75.343, 39.984], {\"marker-color\": \"F00\"});\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: 'miles'};\n\nvar destination = turf.rhumbDestination(pt, distance, bearing, options);\n\n//addToMap\nvar addToMap = [pt, destination]\ndestination.properties['marker-color'] = '#00F';",hasMap:!0,npmName:"@turf/rhumb-destination",returns:[{type:'Feature <Point>',desc:"Destination point."}],params:[{Argument:"origin",Type:'Coord',Description:"starting point"},{Argument:"distance",Type:"number",Description:"distance from the starting point"},{Argument:"bearing",Type:"number",Description:"varant bearing angle ranging from -180 to 180 degrees from north"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"},{Prop:"properties",Type:"Object",Default:"{}",Description:"translate properties to destination point"}],throws:[]},{name:"rhumbDistance",hidden:!1,parent:null,description:'Calculates the distance along a rhumb line between two points in degrees, radians,\nmiles, or kilometers.',snippet:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.rhumbDistance(from, to, options);\n",example:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.rhumbDistance(from, to, options);\n\n//addToMap\nvar addToMap = [from, to];\nfrom.properties.distance = distance;\nto.properties.distance = distance;",hasMap:!0,npmName:"@turf/rhumb-distance",returns:[{type:"number",desc:"distance between the two points"}],params:[{Argument:"from",Type:'Coord',Description:"origin point"},{Argument:"to",Type:'Coord',Description:"destination point"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"square",hidden:!1,parent:null,description:"Takes a bounding box and calculates the minimum square bounding box that\nwould contain the input.",snippet:"var bbox = [-20, -20, -15, 0];\nvar squared = turf.square(bbox);\n",example:"var bbox = [-20, -20, -15, 0];\nvar squared = turf.square(bbox);\n\n//addToMap\nvar addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]",hasMap:!0,npmName:"@turf/square",returns:[{type:'BBox',desc:"a square surrounding bbox"}],params:[{Argument:"bbox",Type:'BBox',Description:"extent in west, south, east, north order"}],options:null,throws:[]},{name:"greatCircle",hidden:!1,parent:null,description:'Calculate great circles routes as LineString or MultiLineString.\nIf the start and end points span the antimeridian, the resulting feature will\nbe split into a MultiLineString .',snippet:"var start = turf.point([-122, 48]);\nvar end = turf.point([-77, 39]);\n\nvar greatCircle = turf.greatCircle(start, end, {properties: {name: 'Seattle to DC'}});\n",example:"var start = turf.point([-122, 48]);\nvar end = turf.point([-77, 39]);\n\nvar greatCircle = turf.greatCircle(start, end, {properties: {name: 'Seattle to DC'}});\n\n//addToMap\nvar addToMap = [start, end, greatCircle]",hasMap:!0,npmName:"@turf/great-circle",returns:[{type:'Feature <(LineString|MultiLineString)>',desc:"great circle line feature"}],params:[{Argument:"start",Type:'Coord',Description:"source point feature"},{Argument:"end",Type:'Coord',Description:"destination point feature"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"line feature properties"},{Prop:"npoints",Type:"number",Default:"100",Description:"number of points"},{Prop:"offset",Type:"number",Default:"10",Description:"offset controls the likelyhood that lines will\nbe split which cross the dateline. The higher the number the more likely."}],throws:[]}]},{group:"Coordinate Mutation",modules:[{name:"cleanCoords",hidden:!1,parent:null,description:"Removes redundant coordinates from any GeoJSON Geometry.",snippet:"var line = turf.lineString([[0, 0], [0, 2], [0, 5], [0, 8], [0, 8], [0, 10]]);\nvar multiPoint = turf.multiPoint([[0, 0], [0, 0], [2, 2]]);\n\nturf.cleanCoords(line).geometry.coordinates;\n//= [[0, 0], [0, 10]]\n\nturf.cleanCoords(multiPoint).geometry.coordinates;\n//= [[0, 0], [2, 2]]",example:"var line = turf.lineString([[0, 0], [0, 2], [0, 5], [0, 8], [0, 8], [0, 10]]);\nvar multiPoint = turf.multiPoint([[0, 0], [0, 0], [2, 2]]);\n\nturf.cleanCoords(line).geometry.coordinates;\n//= [[0, 0], [0, 10]]\n\nturf.cleanCoords(multiPoint).geometry.coordinates;\n//= [[0, 0], [2, 2]]",hasMap:!1,npmName:"@turf/clean-coords",returns:[{type:'(Geometry|Feature)',desc:"the cleaned input Feature/Geometry"}],params:[{Argument:"geojson",Type:'(Geometry|Feature)',Description:"Feature or Geometry"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated"}],throws:[]},{name:"flip",hidden:!1,parent:null,description:"Takes input features and flips all of their coordinates from [x, y] to [y, x].",snippet:"var serbia = turf.point([20.566406, 43.421008]);\n\nvar saudiArabia = turf.flip(serbia);\n",example:"var serbia = turf.point([20.566406, 43.421008]);\n\nvar saudiArabia = turf.flip(serbia);\n\n//addToMap\nvar addToMap = [serbia, saudiArabia];",hasMap:!0,npmName:"@turf/flip",returns:[{type:'GeoJSON',desc:"a feature or set of features of the same type as input with flipped coordinates"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input features"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"rewind",hidden:!1,parent:null,description:'Rewind (Multi)LineString or (Multi)Polygon outer ring counterclockwise and inner rings clockwise (Uses Shoelace Formula ).',snippet:"var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);\n\nvar rewind = turf.rewind(polygon);\n",example:"var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);\n\nvar rewind = turf.rewind(polygon);\n\n//addToMap\nvar addToMap = [rewind];",hasMap:!0,npmName:"@turf/rewind",returns:[{type:'GeoJSON',desc:"rewind Polygon"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input GeoJSON Polygon"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"reverse",Type:"boolean",Default:"false",Description:"enable reverse winding"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"round",hidden:!1,parent:"@turf/helpers",description:"Round number to precision",snippet:"turf.round(120.4321)\n//=120\n\nturf.round(120.4321, 2)\n//=120.43",example:"turf.round(120.4321)\n//=120\n\nturf.round(120.4321, 2)\n//=120.43",hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"rounded number"}],params:[{Argument:"num",Type:"number",Description:"Number"},{Argument:"precision",Type:"number",Description:"Precision"}],options:null,throws:[]},{name:"truncate",hidden:!1,parent:null,description:"Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.",snippet:"var point = turf.point([\n 70.46923055566859,\n 58.11088890802906,\n 1508\n]);\nvar options = {precision: 3, coordinates: 2};\nvar truncated = turf.truncate(point, options);\n//=truncated.geometry.coordinates => [70.469, 58.111]\n",example:"var point = turf.point([\n 70.46923055566859,\n 58.11088890802906,\n 1508\n]);\nvar options = {precision: 3, coordinates: 2};\nvar truncated = turf.truncate(point, options);\n//=truncated.geometry.coordinates => [70.469, 58.111]\n\n//addToMap\nvar addToMap = [truncated];",hasMap:!0,npmName:"@turf/truncate",returns:[{type:'GeoJSON',desc:"layer with truncated geometry"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection."},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"precision",Type:"number",Default:"6",Description:"coordinate decimal precision"},{Prop:"coordinates",Type:"number",Default:"3",Description:"maximum number of coordinates (primarly used to remove z coordinates)"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]}]},{group:"Transformation",modules:[{name:"bboxClip",hidden:!1,parent:null,description:'Takes a Feature and a bbox and clips the feature to the bbox using\n lineclip.\nMay result in degenerate edges when clipping Polygons.',snippet:"var bbox = [0, 0, 10, 10];\nvar poly = turf.polygon([[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]);\n\nvar clipped = turf.bboxClip(poly, bbox);\n",example:"var bbox = [0, 0, 10, 10];\nvar poly = turf.polygon([[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]);\n\nvar clipped = turf.bboxClip(poly, bbox);\n\n//addToMap\nvar addToMap = [bbox, poly, clipped]",hasMap:!0,npmName:"@turf/bbox-clip",returns:[{type:'Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>',desc:"clipped Feature"}],params:[{Argument:"feature",Type:'Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>',Description:"feature to clip to the bbox"},{Argument:"bbox",Type:'BBox',Description:"extent in minX, minY, maxX, maxY order"}],options:null,throws:[]},{name:"bezierSpline",hidden:!1,parent:null,description:"Takes a line and returns a curved version\nby applying a Bezier spline \nalgorithm.",snippet:"var line = turf.lineString([\n [-76.091308, 18.427501],\n [-76.695556, 18.729501],\n [-76.552734, 19.40443],\n [-74.61914, 19.134789],\n [-73.652343, 20.07657],\n [-73.157958, 20.210656]\n]);\n\nvar curved = turf.bezierSpline(line);\n",example:"var line = turf.lineString([\n [-76.091308, 18.427501],\n [-76.695556, 18.729501],\n [-76.552734, 19.40443],\n [-74.61914, 19.134789],\n [-73.652343, 20.07657],\n [-73.157958, 20.210656]\n]);\n\nvar curved = turf.bezierSpline(line);\n\n//addToMap\nvar addToMap = [line, curved]\ncurved.properties = { stroke: '#0F0' };",hasMap:!0,npmName:"@turf/bezier-spline",returns:[{type:'Feature <LineString>',desc:"curved line"}],params:[{Argument:"line",Type:'Feature <LineString>',Description:"input LineString"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate properties to output"},{Prop:"resolution",Type:"number",Default:"10000",Description:"time in milliseconds between points"},{Prop:"sharpness",Type:"number",Default:"0.85",Description:"a measure of how curvy the path should be between splines"}],throws:[]},{name:"buffer",hidden:!1,parent:null,description:"Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.",snippet:"var point = turf.point([-90.548630, 14.616599]);\nvar buffered = turf.buffer(point, 500, {units: 'miles'});\n",example:"var point = turf.point([-90.548630, 14.616599]);\nvar buffered = turf.buffer(point, 500, {units: 'miles'});\n\n//addToMap\nvar addToMap = [point, buffered]",hasMap:!0,npmName:"@turf/buffer",returns:[{type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>|undefined)',desc:"buffered features"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Geometry|Feature )',Description:"input to be buffered"},{Argument:"radius",Type:"number",Description:"distance to draw the buffer (negative values are allowed)"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"any of the options supported by turf units"},{Prop:"steps",Type:"number",Default:"8",Description:"number of steps"}],throws:[]},{name:"circle",hidden:!1,parent:null,description:'Takes a Point and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.',snippet:"var center = [-75.343, 39.984];\nvar radius = 5;\nvar options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\nvar circle = turf.circle(center, radius, options);\n",example:"var center = [-75.343, 39.984];\nvar radius = 5;\nvar options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\nvar circle = turf.circle(center, radius, options);\n\n//addToMap\nvar addToMap = [turf.point(center), circle]",hasMap:!0,npmName:"@turf/circle",returns:[{type:'Feature <Polygon>',desc:"circle polygon"}],params:[{Argument:"center",Type:'(Feature <Point>|Array )',Description:"center point"},{Argument:"radius",Type:"number",Description:"radius of the circle"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"},{Prop:"properties",Type:"Object",Default:"{}",Description:"properties"}],throws:[]},{name:"clone",hidden:!1,parent:null,description:"Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.\n~3-5x faster than the common JSON.parse + JSON.stringify combo method.",snippet:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n\nvar lineCloned = turf.clone(line);",example:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n\nvar lineCloned = turf.clone(line);",hasMap:!1,npmName:"@turf/clone",returns:[{type:'GeoJSON',desc:"cloned GeoJSON Object"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON Object"}],options:null,throws:[]},{name:"concave",hidden:!1,parent:null,description:'Takes a set of points and returns a concave hull Polygon or MultiPolygon.\nInternally, this uses turf-tin to generate geometries.',snippet:"var points = turf.featureCollection([\n turf.point([-63.601226, 44.642643]),\n turf.point([-63.591442, 44.651436]),\n turf.point([-63.580799, 44.648749]),\n turf.point([-63.573589, 44.641788]),\n turf.point([-63.587665, 44.64533]),\n turf.point([-63.595218, 44.64765])\n]);\nvar options = {units: 'miles', maxEdge: 1};\n\nvar hull = turf.concave(points, options);\n",example:"var points = turf.featureCollection([\n turf.point([-63.601226, 44.642643]),\n turf.point([-63.591442, 44.651436]),\n turf.point([-63.580799, 44.648749]),\n turf.point([-63.573589, 44.641788]),\n turf.point([-63.587665, 44.64533]),\n turf.point([-63.595218, 44.64765])\n]);\nvar options = {units: 'miles', maxEdge: 1};\n\nvar hull = turf.concave(points, options);\n\n//addToMap\nvar addToMap = [points, hull]",hasMap:!0,npmName:"@turf/concave",returns:[{type:'(Feature <(Polygon|MultiPolygon)>|null)',desc:"a concave hull (null value is returned if unable to compute hull)"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"maxEdge",Type:"number",Default:"Infinity",Description:"the length (in 'units') of an edge necessary for part of the\nhull to become concave."},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"convex",hidden:!1,parent:null,description:'Takes a Feature or a FeatureCollection and returns a convex hull Polygon.',snippet:"var points = turf.featureCollection([\n turf.point([10.195312, 43.755225]),\n turf.point([10.404052, 43.8424511]),\n turf.point([10.579833, 43.659924]),\n turf.point([10.360107, 43.516688]),\n turf.point([10.14038, 43.588348]),\n turf.point([10.195312, 43.755225])\n]);\n\nvar hull = turf.convex(points);\n",example:"var points = turf.featureCollection([\n turf.point([10.195312, 43.755225]),\n turf.point([10.404052, 43.8424511]),\n turf.point([10.579833, 43.659924]),\n turf.point([10.360107, 43.516688]),\n turf.point([10.14038, 43.588348]),\n turf.point([10.195312, 43.755225])\n]);\n\nvar hull = turf.convex(points);\n\n//addToMap\nvar addToMap = [points, hull]",hasMap:!0,npmName:"@turf/convex",returns:[{type:'Feature <Polygon>',desc:"a convex hull"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input Feature or FeatureCollection"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"concavity",Type:"number",Default:"Infinity",Description:"1 - thin shape. Infinity - convex hull."},{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate Properties to Feature"}],throws:[]},{name:"difference",hidden:!1,parent:null,description:'Finds the difference between two polygons by clipping the second polygon from the first.',snippet:'var polygon1 = turf.polygon([[\n [128, -26],\n [141, -26],\n [141, -21],\n [128, -21],\n [128, -26]\n]], {\n "fill": "#F00",\n "fill-opacity": 0.1\n});\nvar polygon2 = turf.polygon([[\n [126, -28],\n [140, -28],\n [140, -20],\n [126, -20],\n [126, -28]\n]], {\n "fill": "#00F",\n "fill-opacity": 0.1\n});\n\nvar difference = turf.difference(polygon1, polygon2);\n',example:'var polygon1 = turf.polygon([[\n [128, -26],\n [141, -26],\n [141, -21],\n [128, -21],\n [128, -26]\n]], {\n "fill": "#F00",\n "fill-opacity": 0.1\n});\nvar polygon2 = turf.polygon([[\n [126, -28],\n [140, -28],\n [140, -20],\n [126, -20],\n [126, -28]\n]], {\n "fill": "#00F",\n "fill-opacity": 0.1\n});\n\nvar difference = turf.difference(polygon1, polygon2);\n\n//addToMap\nvar addToMap = [polygon1, polygon2, difference];',hasMap:!0,npmName:"@turf/difference",returns:[{type:'(Feature <(Polygon|MultiPolygon)>|null)',desc:"a Polygon or MultiPolygon feature showing the area of polygon1 excluding the area of polygon2 (if empty returns null )"}],params:[{Argument:"polygon1",Type:'Feature <(Polygon|MultiPolygon)>',Description:"input Polygon feature"},{Argument:"polygon2",Type:'Feature <(Polygon|MultiPolygon)>',Description:"Polygon feature to difference from polygon1"}],options:null,throws:[]},{name:"dissolve",hidden:!1,parent:null,description:'Dissolves a FeatureCollection of polygon features, filtered by an optional property name:value.\nNote that mulitpolygon features within the collection are not supported',snippet:"var features = turf.featureCollection([\n turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {combine: 'yes'}),\n turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {combine: 'yes'}),\n turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {combine: 'no'}),\n]);\n\nvar dissolved = turf.dissolve(features, {propertyName: 'combine'});\n",example:"var features = turf.featureCollection([\n turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {combine: 'yes'}),\n turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {combine: 'yes'}),\n turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {combine: 'no'}),\n]);\n\nvar dissolved = turf.dissolve(features, {propertyName: 'combine'});\n\n//addToMap\nvar addToMap = [features, dissolved]",hasMap:!0,npmName:"@turf/dissolve",returns:[{type:'FeatureCollection <Polygon>',desc:"a FeatureCollection containing the dissolved polygons"}],params:[{Argument:"featureCollection",Type:'FeatureCollection <Polygon>',Description:"input feature collection to be dissolved"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"propertyName",Type:"(string)",Default:null,Description:"features with the same "}],throws:[]},{name:"intersect",hidden:!1,parent:null,description:'Takes two polygon or multi-polygon geometries and\nfinds their polygonal intersection. If they don\'t intersect, returns null.',snippet:"var poly1 = turf.polygon([[\n [-122.801742, 45.48565],\n [-122.801742, 45.60491],\n [-122.584762, 45.60491],\n [-122.584762, 45.48565],\n [-122.801742, 45.48565]\n]]);\n\nvar poly2 = turf.polygon([[\n [-122.520217, 45.535693],\n [-122.64038, 45.553967],\n [-122.720031, 45.526554],\n [-122.669906, 45.507309],\n [-122.723464, 45.446643],\n [-122.532577, 45.408574],\n [-122.487258, 45.477466],\n [-122.520217, 45.535693]\n]]);\n\nvar intersection = turf.intersect(poly1, poly2);\n",example:"var poly1 = turf.polygon([[\n [-122.801742, 45.48565],\n [-122.801742, 45.60491],\n [-122.584762, 45.60491],\n [-122.584762, 45.48565],\n [-122.801742, 45.48565]\n]]);\n\nvar poly2 = turf.polygon([[\n [-122.520217, 45.535693],\n [-122.64038, 45.553967],\n [-122.720031, 45.526554],\n [-122.669906, 45.507309],\n [-122.723464, 45.446643],\n [-122.532577, 45.408574],\n [-122.487258, 45.477466],\n [-122.520217, 45.535693]\n]]);\n\nvar intersection = turf.intersect(poly1, poly2);\n\n//addToMap\nvar addToMap = [poly1, poly2, intersection];",hasMap:!0,npmName:"@turf/intersect",returns:[{type:'(Feature|null)',desc:'returns a feature representing the area they share (either a Polygon or\n MultiPolygon ). If they do not share any area, returns null.'}],params:[{Argument:"poly1",Type:'Feature <(Polygon|MultiPolygon)>',Description:"the first polygon or multipolygon"},{Argument:"poly2",Type:'Feature <(Polygon|MultiPolygon)>',Description:"the second polygon or multipolygon"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate GeoJSON Properties to Feature"}],throws:[]},{name:"lineOffset",hidden:!1,parent:"@turf/line-offset",description:"Takes a line and returns a line at offset by the specified distance.",snippet:'var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { "stroke": "#F00" });\n\nvar offsetLine = turf.lineOffset(line, 2, {units: \'miles\'});\n',example:'var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { "stroke": "#F00" });\n\nvar offsetLine = turf.lineOffset(line, 2, {units: \'miles\'});\n\n//addToMap\nvar addToMap = [offsetLine, line]\noffsetLine.properties.stroke = "#00F"',hasMap:!0,npmName:"@turf/line-offset",returns:[{type:'Feature <(LineString|MultiLineString)>',desc:"Line offset from the input line"}],params:[{Argument:"geojson",Type:'(Geometry|Feature <(LineString|MultiLineString)>)',Description:"input GeoJSON"},{Argument:"distance",Type:"number",Description:"distance to offset the line (can be of negative value)"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, kilometers, inches, yards, meters"}],throws:[]},{name:"polygonSmooth",hidden:!1,parent:null,description:'Smooths a Polygon or MultiPolygon. Based on Chaikin\'s algorithm .\nWarning: may create degenerate polygons.',snippet:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n\nvar smoothed = turf.polygonSmooth(polygon, {iterations: 3})\n",example:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n\nvar smoothed = turf.polygonSmooth(polygon, {iterations: 3})\n\n//addToMap\nvar addToMap = [smoothed, polygon];",hasMap:!0,npmName:"@turf/polygon-smooth",returns:[{type:'FeatureCollection <Polygon>',desc:"FeatureCollection containing the smoothed polygon/poylgons"}],params:[{Argument:"inputPolys",Type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>)',Description:"(Multi)Polygon(s) to smooth"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"iterations",Type:"string",Default:"1",Description:"THe number of times to smooth the polygon. A higher value means a smoother polygon."}],throws:[]},{name:"simplify",hidden:!1,parent:null,description:'Takes a GeoJSON object and returns a simplified version. Internally uses\n simplify-js to perform simplification using the Ramer-Douglas-Peucker algorithm.',snippet:"var geojson = turf.polygon([[\n [-70.603637, -33.399918],\n [-70.614624, -33.395332],\n [-70.639343, -33.392466],\n [-70.659942, -33.394759],\n [-70.683975, -33.404504],\n [-70.697021, -33.419406],\n [-70.701141, -33.434306],\n [-70.700454, -33.446339],\n [-70.694274, -33.458369],\n [-70.682601, -33.465816],\n [-70.668869, -33.472117],\n [-70.646209, -33.473835],\n [-70.624923, -33.472117],\n [-70.609817, -33.468107],\n [-70.595397, -33.458369],\n [-70.587158, -33.442901],\n [-70.587158, -33.426283],\n [-70.590591, -33.414248],\n [-70.594711, -33.406224],\n [-70.603637, -33.399918]\n]]);\nvar options = {tolerance: 0.01, highQuality: false};\nvar simplified = turf.simplify(geojson, options);\n",example:"var geojson = turf.polygon([[\n [-70.603637, -33.399918],\n [-70.614624, -33.395332],\n [-70.639343, -33.392466],\n [-70.659942, -33.394759],\n [-70.683975, -33.404504],\n [-70.697021, -33.419406],\n [-70.701141, -33.434306],\n [-70.700454, -33.446339],\n [-70.694274, -33.458369],\n [-70.682601, -33.465816],\n [-70.668869, -33.472117],\n [-70.646209, -33.473835],\n [-70.624923, -33.472117],\n [-70.609817, -33.468107],\n [-70.595397, -33.458369],\n [-70.587158, -33.442901],\n [-70.587158, -33.426283],\n [-70.590591, -33.414248],\n [-70.594711, -33.406224],\n [-70.603637, -33.399918]\n]]);\nvar options = {tolerance: 0.01, highQuality: false};\nvar simplified = turf.simplify(geojson, options);\n\n//addToMap\nvar addToMap = [geojson, simplified]",hasMap:!0,npmName:"@turf/simplify",returns:[{type:'GeoJSON',desc:"a simplified GeoJSON"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"object to be simplified"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"tolerance",Type:"number",Default:"1",Description:"simplification tolerance"},{Prop:"highQuality",Type:"boolean",Default:"false",Description:"whether or not to spend more time to create a higher-quality simplification with a different algorithm"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"tesselate",hidden:!1,parent:null,description:"Tesselates a Feature into a FeatureCollection of triangles\nusing earcut.",snippet:"var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar triangles = turf.tesselate(poly);\n",example:"var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar triangles = turf.tesselate(poly);\n\n//addToMap\nvar addToMap = [poly, triangles]",hasMap:!0,npmName:"@turf/tesselate",returns:[{type:'FeatureCollection <Polygon>',desc:"a geometrycollection feature"}],params:[{Argument:"poly",Type:'Feature <Polygon>',Description:"the polygon to tesselate"}],options:null,throws:[]},{name:"transformRotate",hidden:!1,parent:null,description:"Rotates any geojson Feature or Geometry of a specified angle, around its centroid or a given pivot point.",snippet:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar options = {pivot: [0, 25]};\nvar rotatedPoly = turf.transformRotate(poly, 10, options);\n",example:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar options = {pivot: [0, 25]};\nvar rotatedPoly = turf.transformRotate(poly, 10, options);\n\n//addToMap\nvar addToMap = [poly, rotatedPoly];\nrotatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};",hasMap:!0,npmName:"@turf/transform-rotate",returns:[{type:'GeoJSON',desc:"the rotated GeoJSON feature"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"object to be rotated"},{Argument:"angle",Type:"number",Description:"of rotation in decimal degrees, positive clockwise"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"pivot",Type:'Coord',Default:"'centroid'",Description:"point around which the rotation will be performed"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"transformTranslate",hidden:!1,parent:null,description:"Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\non the provided direction angle.",snippet:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar translatedPoly = turf.transformTranslate(poly, 100, 35);\n",example:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar translatedPoly = turf.transformTranslate(poly, 100, 35);\n\n//addToMap\nvar addToMap = [poly, translatedPoly];\ntranslatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};",hasMap:!0,npmName:"@turf/transform-translate",returns:[{type:'GeoJSON',desc:"the translated GeoJSON object"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"object to be translated"},{Argument:"distance",Type:"number",Description:"length of the motion; negative values determine motion in opposite direction"},{Argument:"direction",Type:"number",Description:"of the motion; angle from North in decimal degrees, positive clockwise"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"in which "},{Prop:"zTranslation",Type:"number",Default:"0",Description:"length of the vertical motion, same unit of distance"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"transformScale",hidden:!1,parent:null,description:"Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).\nIf a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.",snippet:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar scaledPoly = turf.transformScale(poly, 3);\n",example:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar scaledPoly = turf.transformScale(poly, 3);\n\n//addToMap\nvar addToMap = [poly, scaledPoly];\nscaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};",hasMap:!0,npmName:"@turf/transform-scale",returns:[{type:'GeoJSON',desc:"scaled GeoJSON"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be scaled"},{Argument:"factor",Type:"number",Description:"of scaling, positive or negative values greater than 0"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"origin",Type:'(string|Coord)',Default:"'centroid'",Description:"Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"union",hidden:!1,parent:null,description:'Takes two (Multi)Polygon(s) and returns a combined polygon. If the input polygons are not contiguous, this function returns a MultiPolygon feature.',snippet:'var poly1 = turf.polygon([[\n [-82.574787, 35.594087],\n [-82.574787, 35.615581],\n [-82.545261, 35.615581],\n [-82.545261, 35.594087],\n [-82.574787, 35.594087]\n]], {"fill": "#0f0"});\nvar poly2 = turf.polygon([[\n [-82.560024, 35.585153],\n [-82.560024, 35.602602],\n [-82.52964, 35.602602],\n [-82.52964, 35.585153],\n [-82.560024, 35.585153]\n]], {"fill": "#00f"});\n\nvar union = turf.union(poly1, poly2);\n',example:'var poly1 = turf.polygon([[\n [-82.574787, 35.594087],\n [-82.574787, 35.615581],\n [-82.545261, 35.615581],\n [-82.545261, 35.594087],\n [-82.574787, 35.594087]\n]], {"fill": "#0f0"});\nvar poly2 = turf.polygon([[\n [-82.560024, 35.585153],\n [-82.560024, 35.602602],\n [-82.52964, 35.602602],\n [-82.52964, 35.585153],\n [-82.560024, 35.585153]\n]], {"fill": "#00f"});\n\nvar union = turf.union(poly1, poly2);\n\n//addToMap\nvar addToMap = [poly1, poly2, union];',hasMap:!0,npmName:"@turf/union",returns:[{type:'Feature <(Polygon|MultiPolygon)>',desc:'a combined Polygon or MultiPolygon feature, or null if the inputs are empty'}],params:[{Argument:"polygon1",Type:'Feature <(Polygon|MultiPolygon)>',Description:"input Polygon feature"},{Argument:"polygon2",Type:'Feature <(Polygon|MultiPolygon)>',Description:"Polygon feature to difference from polygon1"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate Properties to output Feature"}],throws:[]},{name:"voronoi",hidden:!1,parent:null,description:"Takes a FeatureCollection of points, and a bounding box, and returns a FeatureCollection\nof Voronoi polygons.",snippet:"var options = {\n bbox: [-70, 40, -60, 60]\n};\nvar points = turf.randomPoint(100, options);\nvar voronoiPolygons = turf.voronoi(points, options);\n",example:"var options = {\n bbox: [-70, 40, -60, 60]\n};\nvar points = turf.randomPoint(100, options);\nvar voronoiPolygons = turf.voronoi(points, options);\n\n//addToMap\nvar addToMap = [voronoiPolygons, points];",hasMap:!0,npmName:"@turf/voronoi",returns:[{type:'FeatureCollection <Polygon>',desc:"a set of polygons, one per input point."}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"to find the Voronoi polygons around."},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-85,180,-85]",Description:"clipping rectangle, in "}],throws:[]}]},{group:"Feature Conversion",modules:[{name:"combine",hidden:!1,parent:null,description:'Combines a FeatureCollection of Point , LineString , or Polygon features\ninto MultiPoint , MultiLineString , or MultiPolygon features.',snippet:"var fc = turf.featureCollection([\n turf.point([19.026432, 47.49134]),\n turf.point([19.074497, 47.509548])\n]);\n\nvar combined = turf.combine(fc);\n",example:"var fc = turf.featureCollection([\n turf.point([19.026432, 47.49134]),\n turf.point([19.074497, 47.509548])\n]);\n\nvar combined = turf.combine(fc);\n\n//addToMap\nvar addToMap = [combined]",hasMap:!0,npmName:"@turf/combine",returns:[{type:'FeatureCollection <(MultiPoint|MultiLineString|MultiPolygon)>',desc:"a FeatureCollection of corresponding type to input"}],params:[{Argument:"fc",Type:'FeatureCollection <(Point|LineString|Polygon)>',Description:"a FeatureCollection of any type"}],options:null,throws:[]},{name:"explode",hidden:!1,parent:null,description:'Takes a feature or set of features and returns all positions as points.',snippet:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar explode = turf.explode(polygon);\n",example:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar explode = turf.explode(polygon);\n\n//addToMap\nvar addToMap = [polygon, explode]",hasMap:!0,npmName:"@turf/explode",returns:[{type:'FeatureCollection <point>',desc:"points representing the exploded input features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input features"}],options:null,throws:[{type:"Error",desc:"if it encounters an unknown geometry type"}]},{name:"flatten",hidden:!1,parent:null,description:'Flattens any GeoJSON to a FeatureCollection inspired by geojson-flatten.',snippet:"var multiGeometry = turf.multiPolygon([\n [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],\n [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]\n]);\n\nvar flatten = turf.flatten(multiGeometry);\n",example:"var multiGeometry = turf.multiPolygon([\n [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],\n [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]\n]);\n\nvar flatten = turf.flatten(multiGeometry);\n\n//addToMap\nvar addToMap = [flatten]",hasMap:!0,npmName:"@turf/flatten",returns:[{type:'FeatureCollection ',desc:"all Multi-Geometries are flattened into single Features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any valid GeoJSON Object"}],options:null,throws:[]},{name:"lineToPolygon",hidden:!1,parent:null,description:"Converts (Multi)LineString(s) to Polygon(s).",snippet:"var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n\nvar polygon = turf.lineToPolygon(line);\n",example:"var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n\nvar polygon = turf.lineToPolygon(line);\n\n//addToMap\nvar addToMap = [polygon];",hasMap:!0,npmName:"@turf/line-to-polygon",returns:[{type:'Feature <(Polygon|MultiPolygon)>',desc:"converted to Polygons"}],params:[{Argument:"lines",Type:'(FeatureCollection|Feature <(LineString|MultiLineString)>)',Description:"Features to convert"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"translates GeoJSON properties to Feature"},{Prop:"autoComplete",Type:"boolean",Default:"true",Description:"auto complete linestrings (matches first & last coordinates)"},{Prop:"orderCoords",Type:"boolean",Default:"true",Description:"sorts linestrings to place outer ring at the first position of the coordinates"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"mutate the original linestring using autoComplete (matches first & last coordinates)"}],throws:[]},{name:"polygonize",hidden:!1,parent:null,description:'Polygonizes (Multi)LineString(s) into Polygons.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/polygonize",returns:[{type:'FeatureCollection <Polygon>',desc:"Polygons created"}],params:[{Argument:"geoJson",Type:'(FeatureCollection|Geometry|Feature <(LineString|MultiLineString)>)',Description:"Lines in order to polygonize"}],options:null,throws:[{type:"Error",desc:"if geoJson is invalid."}]},{name:"polygonToLine",hidden:!1,parent:null,description:'Converts a Polygon to (Multi)LineString or MultiPolygon to a\n FeatureCollection of (Multi)LineString.',snippet:"var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);\n\nvar line = turf.polygonToLine(poly);\n",example:"var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);\n\nvar line = turf.polygonToLine(poly);\n\n//addToMap\nvar addToMap = [line];",hasMap:!0,npmName:"@turf/polygon-to-line",returns:[{type:'(FeatureCollection|Feature <(LineString|MultiLinestring)>)',desc:"converted (Multi)Polygon to (Multi)LineString"}],params:[{Argument:"poly",Type:'Feature <(Polygon|MultiPolygon)>',Description:"Feature to convert"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"translates GeoJSON properties to Feature"}],throws:[]}]},{group:"Misc",modules:[{name:"ellipse",hidden:!1,parent:null,description:'Takes a Point and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision.',snippet:"var center = [-75, 40];\nvar xSemiAxis = 5;\nvar ySemiAxis = 2;\nvar ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);\n",example:"var center = [-75, 40];\nvar xSemiAxis = 5;\nvar ySemiAxis = 2;\nvar ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);\n\n//addToMap\nvar addToMap = [turf.point(center), ellipse]",hasMap:!0,npmName:"@turf/ellipse",returns:[{type:'Feature <Polygon>',desc:"ellipse polygon"}],params:[{Argument:"center",Type:'Coord',Description:"center point"},{Argument:"xSemiAxis",Type:"number",Description:"semi (major) axis of the ellipse along the x-axis"},{Argument:"ySemiAxis",Type:"number",Description:"semi (minor) axis of the ellipse along the y-axis"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"angle",Type:"number",Default:"0",Description:"angle of rotation in decimal degrees, positive clockwise"},{Prop:"pivot",Type:'Coord',Default:"'origin'",Description:"point around which the rotation will be performed"},{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"unit of measurement for axes"},{Prop:"properties",Type:"Object",Default:"{}",Description:"properties"}],throws:[]},{name:"kinks",hidden:!1,parent:null,description:'Takes a linestring , multi-linestring ,\n multi-polygon or polygon and\nreturns points at all self-intersections.',snippet:"var poly = turf.polygon([[\n [-12.034835, 8.901183],\n [-12.060413, 8.899826],\n [-12.03638, 8.873199],\n [-12.059383, 8.871418],\n [-12.034835, 8.901183]\n]]);\n\nvar kinks = turf.kinks(poly);\n",example:"var poly = turf.polygon([[\n [-12.034835, 8.901183],\n [-12.060413, 8.899826],\n [-12.03638, 8.873199],\n [-12.059383, 8.871418],\n [-12.034835, 8.901183]\n]]);\n\nvar kinks = turf.kinks(poly);\n\n//addToMap\nvar addToMap = [poly, kinks]",hasMap:!0,npmName:"@turf/kinks",returns:[{type:'FeatureCollection <Point>',desc:"self-intersections"}],params:[{Argument:"featureIn",Type:'Feature <(LineString|MultiLineString|MultiPolygon|Polygon)>',Description:"input feature"}],options:null,throws:[]},{name:"lineArc",hidden:!1,parent:null,description:"Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2;\n0 bearing is North of center point, positive clockwise.",snippet:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 47;\n\nvar arc = turf.lineArc(center, radius, bearing1, bearing2);\n",example:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 47;\n\nvar arc = turf.lineArc(center, radius, bearing1, bearing2);\n\n//addToMap\nvar addToMap = [center, arc]",hasMap:!0,npmName:"@turf/line-arc",returns:[{type:'Feature <LineString>',desc:"line arc"}],params:[{Argument:"center",Type:'Coord',Description:"center point"},{Argument:"radius",Type:"number",Description:"radius of the circle"},{Argument:"bearing1",Type:"number",Description:"angle, in decimal degrees, of the first radius of the arc"},{Argument:"bearing2",Type:"number",Description:"angle, in decimal degrees, of the second radius of the arc"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"}],throws:[]},{name:"lineChunk",hidden:!1,parent:null,description:'Divides a LineString into chunks of a specified length.\nIf the line is shorter than the segment length then the original line is returned.',snippet:"var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n\nvar chunk = turf.lineChunk(line, 15, {units: 'miles'});\n",example:"var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n\nvar chunk = turf.lineChunk(line, 15, {units: 'miles'});\n\n//addToMap\nvar addToMap = [chunk];",hasMap:!0,npmName:"@turf/line-chunk",returns:[{type:'FeatureCollection <LineString>',desc:"collection of line segments"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Geometry|Feature <(LineString|MultiLineString)>)',Description:"the lines to split"},{Argument:"segmentLength",Type:"number",Description:"how long to make each segment"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"units can be degrees, radians, miles, or kilometers"},{Prop:"reverse",Type:"boolean",Default:"false",Description:"reverses coordinates to start the first chunked segment at the end"}],throws:[]},{name:"lineIntersect",hidden:!1,parent:null,description:"Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).",snippet:"var line1 = turf.lineString([[126, -11], [129, -21]]);\nvar line2 = turf.lineString([[123, -18], [131, -14]]);\nvar intersects = turf.lineIntersect(line1, line2);\n",example:"var line1 = turf.lineString([[126, -11], [129, -21]]);\nvar line2 = turf.lineString([[123, -18], [131, -14]]);\nvar intersects = turf.lineIntersect(line1, line2);\n\n//addToMap\nvar addToMap = [line1, line2, intersects]",hasMap:!0,npmName:"@turf/line-intersect",returns:[{type:'FeatureCollection <Point>',desc:"point(s) that intersect both"}],params:[{Argument:"line1",Type:'GeoJSON',Description:"any LineString or Polygon"},{Argument:"line2",Type:'GeoJSON',Description:"any LineString or Polygon"}],options:null,throws:[]},{name:"lineOverlap",hidden:!1,parent:null,description:"Takes any LineString or Polygon and returns the overlapping lines between both features.",snippet:"var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\nvar line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n\nvar overlapping = turf.lineOverlap(line1, line2);\n",example:"var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\nvar line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n\nvar overlapping = turf.lineOverlap(line1, line2);\n\n//addToMap\nvar addToMap = [line1, line2, overlapping]",hasMap:!0,npmName:"@turf/line-overlap",returns:[{type:'FeatureCollection <LineString>',desc:"lines(s) that are overlapping between both features"}],params:[{Argument:"line1",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"any LineString or Polygon"},{Argument:"line2",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"any LineString or Polygon"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"tolerance",Type:"number",Default:"0",Description:"Tolerance distance to match overlapping line segments (in kilometers)"}],throws:[]},{name:"lineSegment",hidden:!1,parent:null,description:'Creates a FeatureCollection of 2-vertex LineString segments from a\n (Multi)LineString or (Multi)Polygon.',snippet:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\nvar segments = turf.lineSegment(polygon);\n",example:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\nvar segments = turf.lineSegment(polygon);\n\n//addToMap\nvar addToMap = [polygon, segments]",hasMap:!0,npmName:"@turf/line-segment",returns:[{type:'FeatureCollection <LineString>',desc:"2-vertex line segments"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON Polygon or LineString"}],options:null,throws:[]},{name:"lineSlice",hidden:!1,parent:null,description:'Takes a line , a start Point , and a stop point\nand returns a subsection of the line in-between those points.\nThe start & stop points don\'t need to fall exactly on the line.',snippet:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar start = turf.point([-77.029609, 38.881946]);\nvar stop = turf.point([-77.021884, 38.889563]);\n\nvar sliced = turf.lineSlice(start, stop, line);\n",example:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar start = turf.point([-77.029609, 38.881946]);\nvar stop = turf.point([-77.021884, 38.889563]);\n\nvar sliced = turf.lineSlice(start, stop, line);\n\n//addToMap\nvar addToMap = [start, stop, line]",hasMap:!0,npmName:"@turf/line-slice",returns:[{type:'Feature <LineString>',desc:"sliced line"}],params:[{Argument:"startPt",Type:'Coord',Description:"starting point"},{Argument:"stopPt",Type:'Coord',Description:"stopping point"},{Argument:"line",Type:'(Feature <LineString>|LineString)',Description:"line to slice"}],options:null,throws:[]},{name:"lineSliceAlong",hidden:!1,parent:null,description:'Takes a line , a specified distance along the line to a start Point ,\nand a specified distance along the line to a stop point\nand returns a subsection of the line in-between those points.',snippet:"var line = turf.lineString([[7, 45], [9, 45], [14, 40], [14, 41]]);\nvar start = 12.5;\nvar stop = 25;\nvar sliced = turf.lineSliceAlong(line, start, stop, {units: 'miles'});\n",example:"var line = turf.lineString([[7, 45], [9, 45], [14, 40], [14, 41]]);\nvar start = 12.5;\nvar stop = 25;\nvar sliced = turf.lineSliceAlong(line, start, stop, {units: 'miles'});\n\n//addToMap\nvar addToMap = [line, start, stop, sliced]",hasMap:!0,npmName:"@turf/line-slice-along",returns:[{type:'Feature <LineString>',desc:"sliced line"}],params:[{Argument:"line",Type:'(Feature <LineString>|LineString)',Description:"input line"},{Argument:"startDist",Type:"number",Description:"distance along the line to starting point"},{Argument:"stopDist",Type:"number",Description:"distance along the line to ending point"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"lineSplit",hidden:!1,parent:null,description:"Split a LineString by another GeoJSON Feature.",snippet:"var line = turf.lineString([[120, -25], [145, -25]]);\nvar splitter = turf.lineString([[130, -15], [130, -35]]);\n\nvar split = turf.lineSplit(line, splitter);\n",example:"var line = turf.lineString([[120, -25], [145, -25]]);\nvar splitter = turf.lineString([[130, -15], [130, -35]]);\n\nvar split = turf.lineSplit(line, splitter);\n\n//addToMap\nvar addToMap = [line, splitter]",hasMap:!0,npmName:"@turf/line-split",returns:[{type:'FeatureCollection <LineString>',desc:"Split LineStrings"}],params:[{Argument:"line",Type:'Feature <LineString>',Description:"LineString Feature to split"},{Argument:"splitter",Type:'Feature ',Description:"Feature used to split line"}],options:null,throws:[]},{name:"mask",hidden:!1,parent:null,description:'Takes any type of polygon and an optional mask and returns a polygon exterior ring with holes.',snippet:"var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\nvar mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n\nvar masked = turf.mask(polygon, mask);\n",example:"var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\nvar mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n\nvar masked = turf.mask(polygon, mask);\n\n//addToMap\nvar addToMap = [masked]",hasMap:!0,npmName:"@turf/mask",returns:[{type:'Feature <Polygon>',desc:"Masked Polygon (exterior ring with holes)."}],params:[{Argument:"polygon",Type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>)',Description:"GeoJSON Polygon used as interior rings or holes."},{Argument:"mask",Type:'(Feature <Polygon>)',Description:"GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used)"}],options:null,throws:[]},{name:"nearestPointOnLine",hidden:!1,parent:null,description:'Takes a Point and a LineString and calculates the closest Point on the (Multi)LineString.',snippet:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar pt = turf.point([-77.037076, 38.884017]);\n\nvar snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n",example:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar pt = turf.point([-77.037076, 38.884017]);\n\nvar snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n\n//addToMap\nvar addToMap = [line, pt, snapped];\nsnapped.properties['marker-color'] = '#00f';",hasMap:!0,npmName:"@turf/nearest-point-on-line",returns:[{type:'Feature <Point>',desc:"closest point on the line to point. The properties object will contain three values: index : closest point was found on nth line part, dist : distance between pt and the closest point, location : distance along the line between start and the closest point."}],params:[{Argument:"lines",Type:'(Geometry|Feature <(LineString|MultiLineString)>)',Description:"lines to snap to"},{Argument:"pt",Type:'(Geometry|Feature <Point>|Array )',Description:"point to snap from"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"sector",hidden:!1,parent:null,description:'Creates a circular sector of a circle of given radius and center Point ,\nbetween (clockwise) bearing1 and bearing2; 0 bearing is North of center point, positive clockwise.',snippet:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 45;\n\nvar sector = turf.sector(center, radius, bearing1, bearing2);\n",example:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 45;\n\nvar sector = turf.sector(center, radius, bearing1, bearing2);\n\n//addToMap\nvar addToMap = [center, sector];",hasMap:!0,npmName:"@turf/sector",returns:[{type:'Feature <Polygon>',desc:"sector polygon"}],params:[{Argument:"center",Type:'Coord',Description:"center point"},{Argument:"radius",Type:"number",Description:"radius of the circle"},{Argument:"bearing1",Type:"number",Description:"angle, in decimal degrees, of the first radius of the sector"},{Argument:"bearing2",Type:"number",Description:"angle, in decimal degrees, of the second radius of the sector"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"},{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"properties",Type:"Properties",Default:"{}",Description:"Translate properties to Feature Polygon"}],throws:[]},{name:"shortestPath",hidden:!1,parent:null,description:'Returns the shortest path from start to end without colliding with\nany Feature in obstacles',snippet:"var start = [-5, -6];\nvar end = [9, -6];\nvar options = {\n obstacles: turf.polygon([[[0, -7], [5, -7], [5, -3], [0, -3], [0, -7]]])\n};\n\nvar path = turf.shortestPath(start, end, options);\n",example:"var start = [-5, -6];\nvar end = [9, -6];\nvar options = {\n obstacles: turf.polygon([[[0, -7], [5, -7], [5, -3], [0, -3], [0, -7]]])\n};\n\nvar path = turf.shortestPath(start, end, options);\n\n//addToMap\nvar addToMap = [start, end, options.obstacles, path];",hasMap:!0,npmName:"@turf/shortest-path",returns:[{type:'Feature <LineString>',desc:"shortest path between start and end"}],params:[{Argument:"start",Type:'Coord',Description:"point"},{Argument:"end",Type:'Coord',Description:"point"},{Argument:"options",Type:"Object",Description:"optional parameters"}],options:[{Prop:"obstacles",Type:'((Geometry|Feature|FeatureCollection <Polygon>))',Default:null,Description:"areas which path cannot travel"},{Prop:"minDistance",Type:"(number)",Default:null,Description:"minimum distance between shortest path and obstacles"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"unit in which resolution & minimum distance will be expressed in; it can be degrees, radians, miles, kilometers, ..."},{Prop:"resolution",Type:"number",Default:"100",Description:"distance between matrix points on which the path will be calculated"}],throws:[]},{name:"unkinkPolygon",hidden:!1,parent:"@turf/unkink-polygon",description:"Takes a kinked polygon and returns a feature collection of polygons that have no kinks.\nUses simplepolygon internally.",snippet:"var poly = turf.polygon([[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]);\n\nvar result = turf.unkinkPolygon(poly);\n",example:"var poly = turf.polygon([[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]);\n\nvar result = turf.unkinkPolygon(poly);\n\n//addToMap\nvar addToMap = [poly, result]",hasMap:!0,npmName:"@turf/unkink-polygon",returns:[{type:'FeatureCollection <Polygon>',desc:"Unkinked polygons"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>)',Description:"GeoJSON Polygon or MultiPolygon"}],options:null,throws:[]}]},{group:"Helper",modules:[{name:"featureCollection",hidden:!1,parent:"@turf/helpers",description:'Takes one or more Features and creates a FeatureCollection.',snippet:"var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\nvar locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\nvar locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n\nvar collection = turf.featureCollection([\n locationA,\n locationB,\n locationC\n]);\n\n//=collection",example:"var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\nvar locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\nvar locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n\nvar collection = turf.featureCollection([\n locationA,\n locationB,\n locationC\n]);\n\n//=collection",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'FeatureCollection',desc:"FeatureCollection of Features"}],params:[{Argument:"features",Type:'Array <Feature>',Description:"input features"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"feature",hidden:!1,parent:"@turf/helpers",description:'Wraps a GeoJSON Geometry in a GeoJSON Feature.',snippet:'var geometry = {\n "type": "Point",\n "coordinates": [110, 50]\n};\n\nvar feature = turf.feature(geometry);\n\n//=feature',example:'var geometry = {\n "type": "Point",\n "coordinates": [110, 50]\n};\n\nvar feature = turf.feature(geometry);\n\n//=feature',hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature',desc:"a GeoJSON Feature"}],params:[{Argument:"geometry",Type:'Geometry',Description:"input geometry"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"geometryCollection",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:'var pt = turf.geometry("Point", [100, 0]);\nvar line = turf.geometry("LineString", [[101, 0], [102, 1]]);\nvar collection = turf.geometryCollection([pt, line]);\n\n// => collection',example:'var pt = turf.geometry("Point", [100, 0]);\nvar line = turf.geometry("LineString", [[101, 0], [102, 1]]);\nvar collection = turf.geometryCollection([pt, line]);\n\n// => collection',hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <GeometryCollection>',desc:"a GeoJSON GeometryCollection Feature"}],params:[{Argument:"geometries",Type:'Array <Geometry>',Description:"an array of GeoJSON Geometries"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"lineString",hidden:!1,parent:"@turf/helpers",description:'Creates a LineString Feature from an Array of Positions.',snippet:"var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\nvar linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n\n//=linestring1\n//=linestring2",example:"var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\nvar linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n\n//=linestring1\n//=linestring2",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <LineString>',desc:"LineString Feature"}],params:[{Argument:"coordinates",Type:"Array >",Description:"an array of Positions"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"multiLineString",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:"var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n\n//=multiLine",example:"var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n\n//=multiLine",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <MultiLineString>',desc:"a MultiLineString feature"}],params:[{Argument:"coordinates",Type:"Array >>",Description:"an array of LineStrings"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[{type:"Error",desc:"if no coordinates are passed"}]},{name:"multiPoint",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:"var multiPt = turf.multiPoint([[0,0],[10,10]]);\n\n//=multiPt",example:"var multiPt = turf.multiPoint([[0,0],[10,10]]);\n\n//=multiPt",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <MultiPoint>',desc:"a MultiPoint feature"}],params:[{Argument:"coordinates",Type:"Array >",Description:"an array of Positions"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[{type:"Error",desc:"if no coordinates are passed"}]},{name:"multiPolygon",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:"var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n\n//=multiPoly",example:"var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n\n//=multiPoly",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <MultiPolygon>',desc:"a multipolygon feature"}],params:[{Argument:"coordinates",Type:"Array >>>",Description:"an array of Polygons"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[{type:"Error",desc:"if no coordinates are passed"}]},{name:"point",hidden:!1,parent:"@turf/helpers",description:'Creates a Point Feature from a Position.',snippet:"var point = turf.point([-75.343, 39.984]);\n\n//=point",example:"var point = turf.point([-75.343, 39.984]);\n\n//=point",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <Point>',desc:"a Point feature"}],params:[{Argument:"coordinates",Type:"Array ",Description:"longitude, latitude position (each in decimal degrees)"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"polygon",hidden:!1,parent:"@turf/helpers",description:'Creates a Polygon Feature from an Array of LinearRings.',snippet:"var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n\n//=polygon",example:"var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n\n//=polygon",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <Polygon>',desc:"Polygon Feature"}],params:[{Argument:"coordinates",Type:"Array >>",Description:"an array of LinearRings"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]}]},{group:"Random",modules:[{name:"randomPosition",hidden:!1,parent:"@turf/random",description:"Returns a random position within a box.",snippet:"var position = turf.randomPosition([-180, -90, 180, 90])\n// => position",example:"var position = turf.randomPosition([-180, -90, 180, 90])\n// => position",hasMap:!1,npmName:"@turf/random",returns:[{type:"Array ",desc:"Position longitude, latitude"}],params:[{Argument:"bbox",Type:"Array ",Description:"a bounding box inside of which positions are placed."}],options:null,throws:[]},{name:"randomPoint",hidden:!1,parent:"@turf/random",description:'Returns a random point.',snippet:"var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n// => points",example:"var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n// => points",hasMap:!1,npmName:"@turf/random",returns:[{type:'FeatureCollection <Point>',desc:"GeoJSON FeatureCollection of points"}],params:[{Argument:"count",Type:"number",Description:"how many geometries will be generated"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-90,180,90]",Description:"a bounding box inside of which geometries are placed."}],throws:[]},{name:"randomLineString",hidden:!1,parent:"@turf/random",description:'Returns a random linestring.',snippet:"var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n// => lineStrings",example:"var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n// => lineStrings",hasMap:!1,npmName:"@turf/random",returns:[{type:'FeatureCollection <LineString>',desc:"GeoJSON FeatureCollection of linestrings"}],params:[{Argument:"count",Type:"number",Description:"how many geometries will be generated"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-90,180,90]",Description:"a bounding box inside of which geometries are placed."},{Prop:"num_vertices",Type:"number",Default:"10",Description:"is how many coordinates each LineString will contain."},{Prop:"max_length",Type:"number",Default:"0.0001",Description:"is the maximum number of decimal degrees that a\nvertex can be from its predecessor"},{Prop:"max_rotation",Type:"number",Default:"Math.PI/8",Description:"is the maximum number of radians that a\nline segment can turn from the previous segment."}],throws:[]},{name:"randomPolygon",hidden:!1,parent:"@turf/random",description:'Returns a random polygon.',snippet:"var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n// => polygons",example:"var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n// => polygons",hasMap:!1,npmName:"@turf/random",returns:[{type:'FeatureCollection <Polygon>',desc:"GeoJSON FeatureCollection of polygons"}],params:[{Argument:"count",Type:"number",Description:"how many geometries will be generated"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-90,180,90]",Description:"a bounding box inside of which geometries are placed."},{Prop:"num_vertices",Type:"number",Default:"10",Description:"is how many coordinates each LineString will contain."},{Prop:"max_radial_length",Type:"number",Default:"10",Description:"is the maximum number of decimal degrees latitude or longitude that a\nvertex can reach out of the center of the Polygon."}],throws:[]}]},{group:"Data",modules:[{name:"sample",hidden:!1,parent:null,description:'Takes a FeatureCollection and returns a FeatureCollection with given number of features at random.',snippet:"var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});\n\nvar sample = turf.sample(points, 5);\n",example:"var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});\n\nvar sample = turf.sample(points, 5);\n\n//addToMap\nvar addToMap = [points, sample]\nturf.featureEach(sample, function (currentFeature) {\n currentFeature.properties['marker-size'] = 'large';\n currentFeature.properties['marker-color'] = '#000';\n});",hasMap:!0,npmName:"@turf/sample",returns:[{type:'FeatureCollection',desc:"a FeatureCollection with n features"}],params:[{Argument:"featurecollection",Type:'FeatureCollection',Description:"set of input features"},{Argument:"num",Type:"number",Description:"number of features to select"}],options:null,throws:[]}]},{group:"Interpolation",modules:[{name:"interpolate",hidden:!1,parent:null,description:"Takes a set of points and estimates their 'property' values on a grid using the Inverse Distance Weighting (IDW) method.",snippet:"var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point\nturf.featureEach(points, function(point) {\n point.properties.solRad = Math.random() * 50;\n});\nvar options = {gridType: 'points', property: 'solRad', units: 'miles'};\nvar grid = turf.interpolate(points, 100, options);\n",example:"var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point\nturf.featureEach(points, function(point) {\n point.properties.solRad = Math.random() * 50;\n});\nvar options = {gridType: 'points', property: 'solRad', units: 'miles'};\nvar grid = turf.interpolate(points, 100, options);\n\n//addToMap\nvar addToMap = [grid];",hasMap:!0,npmName:"@turf/interpolate",returns:[{type:'FeatureCollection <(Point|Polygon)>',desc:"grid of points or polygons with interpolated 'property'"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"with known value"},{Argument:"cellSize",Type:"number",Description:"the distance across each grid point"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"gridType",Type:"string",Default:"'square'",Description:"defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle')"},{Prop:"property",Type:"string",Default:"'elevation'",Description:"the property name in "},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSize, can be degrees, radians, miles, or kilometers"},{Prop:"weight",Type:"number",Default:"1",Description:"exponent regulating the distance-decay weighting"}],throws:[]},{name:"isobands",hidden:!1,parent:"@turf/isobands",description:'Takes a square or rectangular grid FeatureCollection of Point features with z-values and an array of\nvalue breaks and generates filled contour isobands.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/isobands",returns:[{type:'FeatureCollection <MultiPolygon>',desc:'a FeatureCollection of MultiPolygon features representing isobands'}],params:[{Argument:"pointGrid",Type:'FeatureCollection <Point>',Description:"input points - must be square or rectangular"},{Argument:"breaks",Type:"Array ",Description:"where to draw contours"},{Argument:"options",Type:"Object",Description:"options on output"}],options:[{Prop:"zProperty",Type:"string",Default:"'elevation'",Description:"the property name in "},{Prop:"commonProperties",Type:"Object",Default:"{}",Description:"GeoJSON properties passed to ALL isobands"},{Prop:"breaksProperties",Type:"Array ",Default:"[]",Description:"GeoJSON properties passed, in order, to the correspondent isoband (order defined by breaks)"}],throws:[]},{name:"isolines",hidden:!1,parent:"@turf/isolines",description:'Takes a grid FeatureCollection of Point features with z-values and an array of\nvalue breaks and generates isolines.',snippet:"// create a grid of points with random z-values in their properties\nvar extent = [0, 30, 20, 50];\nvar cellWidth = 100;\nvar pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});\n\nfor (var i = 0; i < pointGrid.features.length; i++) {\n pointGrid.features[i].properties.temperature = Math.random() * 10;\n}\nvar breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\nvar lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});\n",example:"// create a grid of points with random z-values in their properties\nvar extent = [0, 30, 20, 50];\nvar cellWidth = 100;\nvar pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});\n\nfor (var i = 0; i < pointGrid.features.length; i++) {\n pointGrid.features[i].properties.temperature = Math.random() * 10;\n}\nvar breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\nvar lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});\n\n//addToMap\nvar addToMap = [lines];",hasMap:!0,npmName:"@turf/isolines",returns:[{type:'FeatureCollection <MultiLineString>',desc:'a FeatureCollection of MultiLineString features representing isolines'}],params:[{Argument:"pointGrid",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"breaks",Type:"Array ",Description:"values of zProperty where to draw isolines"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"zProperty",Type:"string",Default:"'elevation'",Description:"the property name in "},{Prop:"commonProperties",Type:"Object",Default:"{}",Description:"GeoJSON properties passed to ALL isolines"},{Prop:"breaksProperties",Type:"Array ",Default:"[]",Description:"GeoJSON properties passed, in order, to the correspondent isoline;\nthe breaks array will define the order in which the isolines are created"}],throws:[]},{name:"planepoint",hidden:!1,parent:null,description:'Takes a triangular plane as a Polygon \nand a Point within that triangle and returns the z-value\nat that point. The Polygon should have properties a , b , and c \nthat define the values at its three corners. Alternatively, the z-values\nof each triangle point can be provided by their respective 3rd coordinate\nif their values are not provided as properties.',snippet:'var point = turf.point([-75.3221, 39.529]);\n// "a", "b", and "c" values represent the values of the coordinates in order.\nvar triangle = turf.polygon([[\n [-75.1221, 39.57],\n [-75.58, 39.18],\n [-75.97, 39.86],\n [-75.1221, 39.57]\n]], {\n "a": 11,\n "b": 122,\n "c": 44\n});\n\nvar zValue = turf.planepoint(point, triangle);\npoint.properties.zValue = zValue;\n',example:'var point = turf.point([-75.3221, 39.529]);\n// "a", "b", and "c" values represent the values of the coordinates in order.\nvar triangle = turf.polygon([[\n [-75.1221, 39.57],\n [-75.58, 39.18],\n [-75.97, 39.86],\n [-75.1221, 39.57]\n]], {\n "a": 11,\n "b": 122,\n "c": 44\n});\n\nvar zValue = turf.planepoint(point, triangle);\npoint.properties.zValue = zValue;\n\n//addToMap\nvar addToMap = [triangle, point];',hasMap:!0,npmName:"@turf/planepoint",returns:[{type:"number",desc:"the z-value for interpolatedPoint"}],params:[{Argument:"point",Type:'Coord',Description:"the Point for which a z-value will be calculated"},{Argument:"triangle",Type:'Feature <Polygon>',Description:"a Polygon feature with three vertices"}],options:null,throws:[]},{name:"tin",hidden:!1,parent:"@turf/tin",description:'Takes a set of points and creates a\n Triangulated Irregular Network ,\nor a TIN for short, returned as a collection of Polygons. These are often used\nfor developing elevation contour maps or stepped heat visualizations.',snippet:"// generate some random point data\nvar points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point between 0 and 9\nfor (var i = 0; i < points.features.length; i++) {\n points.features[i].properties.z = ~~(Math.random() * 9);\n}\nvar tin = turf.tin(points, 'z');\n",example:"// generate some random point data\nvar points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point between 0 and 9\nfor (var i = 0; i < points.features.length; i++) {\n points.features[i].properties.z = ~~(Math.random() * 9);\n}\nvar tin = turf.tin(points, 'z');\n\n//addToMap\nvar addToMap = [tin, points]\nfor (var i = 0; i < tin.features.length; i++) {\n var properties = tin.features[i].properties;\n properties.fill = '#' + properties.a + properties.b + properties.c;\n}",hasMap:!0,npmName:"@turf/tin",returns:[{type:'FeatureCollection <Polygon>',desc:"TIN output"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"z",Type:"(String)",Description:"name of the property from which to pull z values\nThis is optional: if not given, then there will be no extra data added to the derived triangles."}],options:null,throws:[]}]},{group:"Joins",modules:[{name:"pointsWithinPolygon",hidden:!1,parent:null,description:'Finds Points or MultiPoint coordinate positions that fall within (Multi)Polygon(s).',snippet:"var points = turf.points([\n [-46.6318, -23.5523],\n [-46.6246, -23.5325],\n [-46.6062, -23.5513],\n [-46.663, -23.554],\n [-46.643, -23.557]\n]);\n\nvar searchWithin = turf.polygon([[\n [-46.653,-23.543],\n [-46.634,-23.5346],\n [-46.613,-23.543],\n [-46.614,-23.559],\n [-46.631,-23.567],\n [-46.653,-23.560],\n [-46.653,-23.543]\n]]);\n\nvar ptsWithin = turf.pointsWithinPolygon(points, searchWithin);\n",example:"var points = turf.points([\n [-46.6318, -23.5523],\n [-46.6246, -23.5325],\n [-46.6062, -23.5513],\n [-46.663, -23.554],\n [-46.643, -23.557]\n]);\n\nvar searchWithin = turf.polygon([[\n [-46.653,-23.543],\n [-46.634,-23.5346],\n [-46.613,-23.543],\n [-46.614,-23.559],\n [-46.631,-23.567],\n [-46.653,-23.560],\n [-46.653,-23.543]\n]]);\n\nvar ptsWithin = turf.pointsWithinPolygon(points, searchWithin);\n\n//addToMap\nvar addToMap = [points, searchWithin, ptsWithin]\nturf.featureEach(ptsWithin, function (currentFeature) {\n currentFeature.properties['marker-size'] = 'large';\n currentFeature.properties['marker-color'] = '#000';\n});",hasMap:!0,npmName:"@turf/points-within-polygon",returns:[{type:'FeatureCollection <(Point|MultiPoint)>',desc:"Point(s) or MultiPoint(s) with positions that land within at least one polygon. The geometry type will match what was passsed in"}],params:[{Argument:"points",Type:'(Feature|FeatureCollection <(Point|MultiPoint)>)',Description:"Point(s) or MultiPoint(s) as input search"},{Argument:"polygons",Type:'(FeatureCollection|Geometry|Feature <(Polygon|MultiPolygon)>)',Description:"(Multi)Polygon(s) to check if points are within"}],options:null,throws:[]},{name:"tag",hidden:!1,parent:null,description:'Takes a set of points and a set of polygons and/or multipolygons and performs a spatial join.',snippet:"var pt1 = turf.point([-77, 44]);\nvar pt2 = turf.point([-77, 38]);\nvar poly1 = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]], {pop: 3000});\nvar poly2 = turf.polygon([[\n [-81, 35],\n [-81, 41],\n [-72, 41],\n [-72, 35],\n [-81, 35]\n]], {pop: 1000});\n\nvar points = turf.featureCollection([pt1, pt2]);\nvar polygons = turf.featureCollection([poly1, poly2]);\n\nvar tagged = turf.tag(points, polygons, 'pop', 'population');\n",example:"var pt1 = turf.point([-77, 44]);\nvar pt2 = turf.point([-77, 38]);\nvar poly1 = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]], {pop: 3000});\nvar poly2 = turf.polygon([[\n [-81, 35],\n [-81, 41],\n [-72, 41],\n [-72, 35],\n [-81, 35]\n]], {pop: 1000});\n\nvar points = turf.featureCollection([pt1, pt2]);\nvar polygons = turf.featureCollection([poly1, poly2]);\n\nvar tagged = turf.tag(points, polygons, 'pop', 'population');\n\n//addToMap\nvar addToMap = [tagged, polygons]",hasMap:!0,npmName:"@turf/tag",returns:[{type:'FeatureCollection <Point>',desc:"points with containingPolyId property containing values from polyId"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"polygons",Type:'FeatureCollection <(Polygon|MultiPolygon)>',Description:"input (multi)polygons"},{Argument:"field",Type:"string",Description:"property in polygons to add to joined { } features"},{Argument:"outField",Type:"string",Description:"property in points in which to store joined property from polygons"}],options:null,throws:[]}]},{group:"Grids",modules:[{name:"hexGrid",hidden:!1,parent:null,description:'Takes a bounding box and the diameter of the cell and returns a FeatureCollection of flat-topped\nhexagons or triangles ( Polygon features) aligned in an "odd-q" vertical grid as\ndescribed in Hexagonal Grids.',snippet:"var bbox = [-96,31,-84,40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar hexgrid = turf.hexGrid(bbox, cellSide, options);\n",example:"var bbox = [-96,31,-84,40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar hexgrid = turf.hexGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [hexgrid];",hasMap:!0,npmName:"@turf/hex-grid",returns:[{type:'FeatureCollection <Polygon>',desc:"a hexagonal grid"}],params:[{Argument:"bbox",Type:'BBox',Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"length of the side of the the hexagons or triangles, in units. It will also coincide with the\nradius of the circumcircle of the hexagons."},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cell size, can be degrees, radians, miles, or kilometers"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each hexagon or triangle of the grid"},{Prop:"mask",Type:'(Feature <Polygon>)',Default:null,Description:"if passed a Polygon or MultiPolygon, the grid Points will be created only inside it"},{Prop:"triangles",Type:"boolean",Default:"false",Description:"whether to return as triangles instead of hexagons"}],throws:[]},{name:"pointGrid",hidden:!1,parent:null,description:'Creates a Point grid from a bounding box, FeatureCollection or Feature.',snippet:"var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\nvar cellSide = 3;\nvar options = {units: 'miles'};\n\nvar grid = turf.pointGrid(extent, cellSide, options);\n",example:"var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\nvar cellSide = 3;\nvar options = {units: 'miles'};\n\nvar grid = turf.pointGrid(extent, cellSide, options);\n\n//addToMap\nvar addToMap = [grid];",hasMap:!0,npmName:"@turf/point-grid",returns:[{type:'FeatureCollection <Point>',desc:"grid of points"}],params:[{Argument:"bbox",Type:"Array ",Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"the distance between points, in units"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSide, can be degrees, radians, miles, or kilometers"},{Prop:"mask",Type:'(Feature <(Polygon|MultiPolygon)>)',Default:null,Description:"if passed a Polygon or MultiPolygon, the grid Points will be created only inside it"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each point of the grid"}],throws:[]},{name:"squareGrid",hidden:!1,parent:null,description:"Creates a square grid from a bounding box.",snippet:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar squareGrid = turf.squareGrid(bbox, cellSide, options);\n",example:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar squareGrid = turf.squareGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [squareGrid]",hasMap:!0,npmName:"@turf/square-grid",returns:[{type:'FeatureCollection <Polygon>',desc:"grid a grid of polygons"}],params:[{Argument:"bbox",Type:"Array ",Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"of each cell, in units"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSide, can be degrees,\nradians, miles, or kilometers"},{Prop:"mask",Type:'(Feature <(Polygon|MultiPolygon)>)',Default:null,Description:"if passed a Polygon or MultiPolygon,\nthe grid Points will be created only inside it"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each point of the grid"}],throws:[]},{name:"triangleGrid",hidden:!1,parent:null,description:'Takes a bounding box and a cell depth and returns a set of triangular polygons in a grid.',snippet:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n",example:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [triangleGrid];",hasMap:!0,npmName:"@turf/triangle-grid",returns:[{type:'FeatureCollection <Polygon>',desc:"grid of polygons"}],params:[{Argument:"bbox",Type:"Array ",Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"dimension of each cell"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSide, can be degrees, radians, miles, or kilometers"},{Prop:"mask",Type:'(Feature <Polygon>)',Default:null,Description:"if passed a Polygon or MultiPolygon, the grid Points will be created only inside it"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each point of the grid"}],throws:[]}]},{group:"Classification",modules:[{name:"nearestPoint",hidden:!1,parent:null,description:'Takes a reference point and a FeatureCollection of Features\nwith Point geometries and returns the\npoint from the FeatureCollection closest to the reference. This calculation\nis geodesic.',snippet:'var targetPoint = turf.point([28.965797, 41.010086], {"marker-color": "#0F0"});\nvar points = turf.featureCollection([\n turf.point([28.973865, 41.011122]),\n turf.point([28.948459, 41.024204]),\n turf.point([28.938674, 41.013324])\n]);\n\nvar nearest = turf.nearestPoint(targetPoint, points);\n',example:"var targetPoint = turf.point([28.965797, 41.010086], {\"marker-color\": \"#0F0\"});\nvar points = turf.featureCollection([\n turf.point([28.973865, 41.011122]),\n turf.point([28.948459, 41.024204]),\n turf.point([28.938674, 41.013324])\n]);\n\nvar nearest = turf.nearestPoint(targetPoint, points);\n\n//addToMap\nvar addToMap = [targetPoint, points, nearest];\nnearest.properties['marker-color'] = '#F00';",hasMap:!0,npmName:"@turf/nearest-point",returns:[{type:'Feature <Point>',desc:"the closest point in the set to the reference point"}],params:[{Argument:"targetPoint",Type:'Coord',Description:"the reference point"},{Argument:"points",Type:'FeatureCollection <Point>',Description:"against input point set"}],options:null,throws:[]}]},{group:"Aggregation",modules:[{name:"collect",hidden:!1,parent:null,description:"Merges a specified property from a FeatureCollection of points into a\nFeatureCollection of polygons. Given an inProperty on points and an outProperty \nfor polygons, this finds every point that lies within each polygon, collects the\n inProperty values from those points, and adds them as an array to outProperty \non the polygon.",snippet:"var poly1 = turf.polygon([[[0,0],[10,0],[10,10],[0,10],[0,0]]]);\nvar poly2 = turf.polygon([[[10,0],[20,10],[20,20],[20,0],[10,0]]]);\nvar polyFC = turf.featureCollection([poly1, poly2]);\nvar pt1 = turf.point([5,5], {population: 200});\nvar pt2 = turf.point([1,3], {population: 600});\nvar pt3 = turf.point([14,2], {population: 100});\nvar pt4 = turf.point([13,1], {population: 200});\nvar pt5 = turf.point([19,7], {population: 300});\nvar pointFC = turf.featureCollection([pt1, pt2, pt3, pt4, pt5]);\nvar collected = turf.collect(polyFC, pointFC, 'population', 'values');\nvar values = collected.features[0].properties.values\n//=values => [200, 600]\n",example:"var poly1 = turf.polygon([[[0,0],[10,0],[10,10],[0,10],[0,0]]]);\nvar poly2 = turf.polygon([[[10,0],[20,10],[20,20],[20,0],[10,0]]]);\nvar polyFC = turf.featureCollection([poly1, poly2]);\nvar pt1 = turf.point([5,5], {population: 200});\nvar pt2 = turf.point([1,3], {population: 600});\nvar pt3 = turf.point([14,2], {population: 100});\nvar pt4 = turf.point([13,1], {population: 200});\nvar pt5 = turf.point([19,7], {population: 300});\nvar pointFC = turf.featureCollection([pt1, pt2, pt3, pt4, pt5]);\nvar collected = turf.collect(polyFC, pointFC, 'population', 'values');\nvar values = collected.features[0].properties.values\n//=values => [200, 600]\n\n//addToMap\nvar addToMap = [pointFC, collected]",hasMap:!0,npmName:"@turf/collect",returns:[{type:'FeatureCollection <Polygon>',desc:"polygons with properties listed based on outField"}],params:[{Argument:"polygons",Type:'FeatureCollection <Polygon>',Description:"polygons with values on which to aggregate"},{Argument:"points",Type:'FeatureCollection <Point>',Description:"points to be aggregated"},{Argument:"inProperty",Type:"string",Description:"property to be nested from"},{Argument:"outProperty",Type:"string",Description:"property to be nested into"}],options:null,throws:[]},{name:"clustersDbscan",hidden:!1,parent:null,description:'Takes a set of points and partition them into clusters according to https://en.wikipedia.org/wiki/DBSCAN data clustering algorithm.',snippet:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar maxDistance = 100;\nvar clustered = turf.clustersDbscan(points, maxDistance);\n",example:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar maxDistance = 100;\nvar clustered = turf.clustersDbscan(points, maxDistance);\n\n//addToMap\nvar addToMap = [clustered];",hasMap:!0,npmName:"@turf/clusters-dbscan",returns:[{type:'FeatureCollection <Point>',desc:"Clustered Points with an additional two properties associated to each Feature:"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"to be clustered"},{Argument:"maxDistance",Type:"number",Description:"Maximum Distance between any point of the cluster to generate the clusters (kilometers only)"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"in which "},{Prop:"mutate",Type:"boolean",Default:"false",Description:"Allows GeoJSON input to be mutated"},{Prop:"minPoints",Type:"number",Default:"3",Description:"Minimum number of points to generate a single cluster,\npoints which do not meet this requirement will be classified as an 'edge' or 'noise'."}],throws:[]},{name:"clustersKmeans",hidden:!1,parent:null,description:'Takes a set of points and partition them into clusters using the k-mean.\nIt uses the k-means algorithm',snippet:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar options = {numberOfClusters: 7};\nvar clustered = turf.clustersKmeans(points, options);\n",example:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar options = {numberOfClusters: 7};\nvar clustered = turf.clustersKmeans(points, options);\n\n//addToMap\nvar addToMap = [clustered];",hasMap:!0,npmName:"@turf/clusters-kmeans",returns:[{type:'FeatureCollection <Point>',desc:"Clustered Points with an additional two properties associated to each Feature:"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"to be clustered"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"numberOfClusters",Type:"number",Default:"Math.sqrt(numberOfPoints/2)",Description:"numberOfClusters that will be generated"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]}]},{group:"Meta",modules:[{name:"coordAll",hidden:!1,parent:"@turf/meta",description:"Get all coordinates from any GeoJSON object.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nvar coords = turf.coordAll(features);\n//= [[26, 37], [36, 53]]",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nvar coords = turf.coordAll(features);\n//= [[26, 37], [36, 53]]",hasMap:!1,npmName:"@turf/meta",returns:[{type:"Array >",desc:"coordinate position array"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"}],options:null,throws:[]},{name:"coordEach",hidden:!1,parent:"@turf/meta",description:"Iterate over coordinates in any GeoJSON object, similar to Array.forEach()",snippet:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n});',example:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n});',hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)"},{Argument:"excludeWrapCoord",Type:"boolean",Description:"whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration."}],options:null,throws:[]},{name:"coordReduce",hidden:!1,parent:"@turf/meta",description:"Reduce coordinates in any GeoJSON object, similar to Array.reduce()",snippet:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=previousValue\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n return currentCoord;\n});',example:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=previousValue\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n return currentCoord;\n});',hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Geometry|Feature)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentCoord, coordIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."},{Argument:"excludeWrapCoord",Type:"boolean",Description:"whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration."}],options:null,throws:[]},{name:"featureEach",hidden:!1,parent:"@turf/meta",description:"Iterate over features in any GeoJSON object, similar to\nArray.forEach.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.featureEach(features, function (currentFeature, featureIndex) {\n //=currentFeature\n //=featureIndex\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.featureEach(features, function (currentFeature, featureIndex) {\n //=currentFeature\n //=featureIndex\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentFeature, featureIndex)"}],options:null,throws:[]},{name:"featureReduce",hidden:!1,parent:"@turf/meta",description:"Reduce features in any GeoJSON object, similar to Array.reduce().",snippet:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n return currentFeature\n});',example:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n return currentFeature\n});',hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentFeature, featureIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"flattenEach",hidden:!1,parent:"@turf/meta",description:"Iterate over flattened features in any GeoJSON object, similar to\nArray.forEach.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n});",hasMap:!1,npmName:"@turf/meta",returns:[],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentFeature, featureIndex, multiFeatureIndex)"}],options:null,throws:[]},{name:"flattenReduce",hidden:!1,parent:"@turf/meta",description:"Reduce flattened features in any GeoJSON object, similar to Array.reduce().",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n return currentFeature\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n return currentFeature\n});",hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"getCoord",hidden:!1,parent:"@turf/invariant",description:"Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.",snippet:"var pt = turf.point([10, 10]);\n\nvar coord = turf.getCoord(pt);\n//= [10, 10]",example:"var pt = turf.point([10, 10]);\n\nvar coord = turf.getCoord(pt);\n//= [10, 10]",hasMap:!1,npmName:"@turf/invariant",returns:[{type:"Array ",desc:"coordinates"}],params:[{Argument:"coord",Type:'(Array |Geometry <Point>|Feature <Point>)',Description:"GeoJSON Point or an Array of numbers"}],options:null,throws:[]},{name:"getCoords",hidden:!1,parent:"@turf/invariant",description:"Unwrap coordinates from a Feature, Geometry Object or an Array",snippet:"var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n\nvar coords = turf.getCoords(poly);\n//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]",example:"var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n\nvar coords = turf.getCoords(poly);\n//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]",hasMap:!1,npmName:"@turf/invariant",returns:[{type:"Array ",desc:"coordinates"}],params:[{Argument:"coords",Type:'(Array |Geometry|Feature)',Description:"Feature, Geometry Object or an Array"}],options:null,throws:[]},{name:"getGeom",hidden:!1,parent:"@turf/invariant",description:"Get Geometry from Feature or Geometry Object",snippet:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getGeom(point)\n//={"type": "Point", "coordinates": [110, 40]}',example:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getGeom(point)\n//={"type": "Point", "coordinates": [110, 40]}',hasMap:!1,npmName:"@turf/invariant",returns:[{type:'(Geometry|null)',desc:"GeoJSON Geometry Object"}],params:[{Argument:"geojson",Type:'(Feature|Geometry)',Description:"GeoJSON Feature or Geometry Object"}],options:null,throws:[{type:"Error",desc:"if geojson is not a Feature or Geometry Object"}]},{name:"getType",hidden:!1,parent:"@turf/invariant",description:"Get GeoJSON object's type, Geometry type is prioritize.",snippet:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getType(point)\n//="Point"',example:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getType(point)\n//="Point"',hasMap:!1,npmName:"@turf/invariant",returns:[{type:"string",desc:"GeoJSON type"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON object"},{Argument:"name",Type:"string",Description:"name of the variable to display in error message (unused)"}],options:null,throws:[]},{name:"geomEach",hidden:!1,parent:"@turf/meta",description:"Iterate over each geometry in any GeoJSON object, similar to Array.forEach()",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)"}],options:null,throws:[]},{name:"geomReduce",hidden:!1,parent:"@turf/meta",description:"Reduce geometry in any GeoJSON object, similar to Array.reduce().",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=previousValue\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n return currentGeometry\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=previousValue\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n return currentGeometry\n});",hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"propEach",hidden:!1,parent:"@turf/meta",description:"Iterate over properties in any GeoJSON object, similar to Array.forEach()",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propEach(features, function (currentProperties, featureIndex) {\n //=currentProperties\n //=featureIndex\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propEach(features, function (currentProperties, featureIndex) {\n //=currentProperties\n //=featureIndex\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentProperties, featureIndex)"}],options:null,throws:[]},{name:"propReduce",hidden:!1,parent:"@turf/meta",description:"Reduce properties in any GeoJSON object into a single value,\nsimilar to how Array.reduce works. However, in this case we lazily run\nthe reduction, so an array of all properties is unnecessary.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n //=previousValue\n //=currentProperties\n //=featureIndex\n return currentProperties\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n //=previousValue\n //=currentProperties\n //=featureIndex\n return currentProperties\n});",hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentProperties, featureIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"segmentEach",hidden:!1,parent:"@turf/meta",description:"Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n(Multi)Point geometries do not contain segments therefore they are ignored during this operation.",snippet:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //=currentSegment\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n //=segmentIndex\n});\n\n// Calculate the total number of segments\nvar total = 0;\nturf.segmentEach(polygon, function () {\n total++;\n});",example:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //=currentSegment\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n //=segmentIndex\n});\n\n// Calculate the total number of segments\nvar total = 0;\nturf.segmentEach(polygon, function () {\n total++;\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)"}],options:null,throws:[]},{name:"segmentReduce",hidden:!1,parent:"@turf/meta",description:"Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n(Multi)Point geometries do not contain segments therefore they are ignored during this operation.",snippet:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //= previousSegment\n //= currentSegment\n //= featureIndex\n //= multiFeatureIndex\n //= geometryIndex\n //= segmentIndex\n return currentSegment\n});\n\n// Calculate the total number of segments\nvar initialValue = 0\nvar total = turf.segmentReduce(polygon, function (previousValue) {\n previousValue++;\n return previousValue;\n}, initialValue);",example:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //= previousSegment\n //= currentSegment\n //= featureIndex\n //= multiFeatureIndex\n //= geometryIndex\n //= segmentIndex\n return currentSegment\n});\n\n// Calculate the total number of segments\nvar initialValue = 0\nvar total = turf.segmentReduce(polygon, function (previousValue) {\n previousValue++;\n return previousValue;\n}, initialValue);",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentSegment, currentIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"getCluster",hidden:!1,parent:"@turf/clusters",description:"Get Cluster",snippet:"var geojson = turf.featureCollection([\n turf.point([0, 0], {'marker-symbol': 'circle'}),\n turf.point([2, 4], {'marker-symbol': 'star'}),\n turf.point([3, 6], {'marker-symbol': 'star'}),\n turf.point([5, 1], {'marker-symbol': 'square'}),\n turf.point([4, 2], {'marker-symbol': 'circle'})\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Retrieve first cluster (0)\nvar cluster = turf.getCluster(clustered, {cluster: 0});\n//= cluster\n\n// Retrieve cluster based on custom properties\nturf.getCluster(clustered, {'marker-symbol': 'circle'}).length;\n//= 2\nturf.getCluster(clustered, {'marker-symbol': 'square'}).length;\n//= 1",example:"var geojson = turf.featureCollection([\n turf.point([0, 0], {'marker-symbol': 'circle'}),\n turf.point([2, 4], {'marker-symbol': 'star'}),\n turf.point([3, 6], {'marker-symbol': 'star'}),\n turf.point([5, 1], {'marker-symbol': 'square'}),\n turf.point([4, 2], {'marker-symbol': 'circle'})\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Retrieve first cluster (0)\nvar cluster = turf.getCluster(clustered, {cluster: 0});\n//= cluster\n\n// Retrieve cluster based on custom properties\nturf.getCluster(clustered, {'marker-symbol': 'circle'}).length;\n//= 2\nturf.getCluster(clustered, {'marker-symbol': 'square'}).length;\n//= 1",hasMap:!1,npmName:"@turf/clusters",returns:[{type:'FeatureCollection',desc:"Single Cluster filtered by GeoJSON Properties"}],params:[{Argument:"geojson",Type:'FeatureCollection',Description:"GeoJSON Features"},{Argument:"filter",Type:"*",Description:"Filter used on GeoJSON properties to get Cluster"}],options:null,throws:[]},{name:"clusterEach",hidden:!1,parent:"@turf/clusters",description:"clusterEach",snippet:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue, currentIndex) {\n //= cluster\n //= clusterValue\n //= currentIndex\n})\n\n// Calculate the total number of clusters\nvar total = 0\nturf.clusterEach(clustered, 'cluster', function () {\n total++;\n});\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = []\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue) {\n values.push(clusterValue);\n});",example:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue, currentIndex) {\n //= cluster\n //= clusterValue\n //= currentIndex\n})\n\n// Calculate the total number of clusters\nvar total = 0\nturf.clusterEach(clustered, 'cluster', function () {\n total++;\n});\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = []\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue) {\n values.push(clusterValue);\n});",hasMap:!1,npmName:"@turf/clusters",returns:[!1],params:[{Argument:"geojson",Type:'FeatureCollection',Description:"GeoJSON Features"},{Argument:"property",Type:"(string|number)",Description:"GeoJSON property key/value used to create clusters"},{Argument:"callback",Type:"Function",Description:"a method that takes (cluster, clusterValue, currentIndex)"}],options:null,throws:[]},{name:"clusterReduce",hidden:!1,parent:"@turf/clusters",description:"Reduce clusters in GeoJSON Features, similar to Array.reduce()",snippet:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster and perform a calculation\nvar initialValue = 0\nturf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue, currentIndex) {\n //=previousValue\n //=cluster\n //=clusterValue\n //=currentIndex\n return previousValue++;\n}, initialValue);\n\n// Calculate the total number of clusters\nvar total = turf.clusterReduce(clustered, 'cluster', function (previousValue) {\n return previousValue++;\n}, 0);\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = turf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue) {\n return previousValue.concat(clusterValue);\n}, []);",example:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster and perform a calculation\nvar initialValue = 0\nturf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue, currentIndex) {\n //=previousValue\n //=cluster\n //=clusterValue\n //=currentIndex\n return previousValue++;\n}, initialValue);\n\n// Calculate the total number of clusters\nvar total = turf.clusterReduce(clustered, 'cluster', function (previousValue) {\n return previousValue++;\n}, 0);\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = turf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue) {\n return previousValue.concat(clusterValue);\n}, []);",hasMap:!1,npmName:"@turf/clusters",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'FeatureCollection',Description:"GeoJSON Features"},{Argument:"property",Type:"(string|number)",Description:"GeoJSON property key/value used to create clusters"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, cluster, clusterValue, currentIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]}]},{group:"Assertions",modules:[{name:"collectionOf",hidden:!1,parent:"@turf/invariant",description:'Enforce expectations about types of FeatureCollection inputs for Turf.\nInternally this uses geojsonType to judge geometry types.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[],params:[{Argument:"featureCollection",Type:'FeatureCollection',Description:"a FeatureCollection for which features will be judged"},{Argument:"type",Type:"string",Description:"expected GeoJSON type"},{Argument:"name",Type:"string",Description:"name of calling function"}],options:null,throws:[{type:"Error",desc:"if value is not the expected type."}]},{name:"containsNumber",hidden:!1,parent:"@turf/invariant",description:"Checks if coordinates contains a number",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[{type:"boolean",desc:"true if Array contains a number"}],params:[{Argument:"coordinates",Type:"Array ",Description:"GeoJSON Coordinates"}],options:null,throws:[]},{name:"geojsonType",hidden:!1,parent:"@turf/invariant",description:"Enforce expectations about types of GeoJSON objects for Turf.",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[],params:[{Argument:"value",Type:'GeoJSON',Description:"any GeoJSON object"},{Argument:"type",Type:"string",Description:"expected GeoJSON type"},{Argument:"name",Type:"string",Description:"name of calling function"}],options:null,throws:[{type:"Error",desc:"if value is not the expected type."}]},{name:"featureOf",hidden:!1,parent:"@turf/invariant",description:'Enforce expectations about types of Feature inputs for Turf.\nInternally this uses geojsonType to judge geometry types.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[],params:[{Argument:"feature",Type:'Feature',Description:"a feature with an expected geometry type"},{Argument:"type",Type:"string",Description:"expected GeoJSON type"},{Argument:"name",Type:"string",Description:"name of calling function"}],options:null,throws:[{type:"Error",desc:"error if value is not the expected type."}]}]},{group:"Booleans",modules:[{name:"booleanClockwise",hidden:!1,parent:null,description:"Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.",snippet:"var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\nvar counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n\nturf.booleanClockwise(clockwiseRing)\n//=true\nturf.booleanClockwise(counterClockwiseRing)\n//=false",example:"var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\nvar counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n\nturf.booleanClockwise(clockwiseRing)\n//=true\nturf.booleanClockwise(counterClockwiseRing)\n//=false",hasMap:!1,npmName:"@turf/boolean-clockwise",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"line",Type:'(Feature <LineString>|LineString|Array >)',Description:"to be evaluated"}],options:null,throws:[]},{name:"booleanConcave",hidden:!1,parent:null,description:"Takes a polygon and return true or false as to whether it is concave or not.",snippet:"var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n\nturf.booleanConcave(convexPolygon)\n//=false",example:"var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n\nturf.booleanConcave(convexPolygon)\n//=false",hasMap:!1,npmName:"@turf/boolean-concave",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"polygon",Type:'Feature <Polygon>',Description:"to be evaluated"}],options:null,throws:[]},{name:"booleanContains",hidden:!1,parent:null,description:"Boolean-contains returns True if the second geometry is completely contained by the first geometry.\nThe interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\nmust not intersect the exterior of the primary (geometry a).\nBoolean-contains returns the exact opposite result of the @turf/boolean-within.",snippet:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanContains(line, point);\n//=true",example:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanContains(line, point);\n//=true",hasMap:!1,npmName:"@turf/boolean-contains",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanCrosses",hidden:!1,parent:null,description:"Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\nthe maximum dimension of the two source geometries and the intersection set is interior to\nboth source geometries.",snippet:"var line1 = turf.lineString([[-2, 2], [4, 2]]);\nvar line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nvar cross = turf.booleanCrosses(line1, line2);\n//=true",example:"var line1 = turf.lineString([[-2, 2], [4, 2]]);\nvar line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nvar cross = turf.booleanCrosses(line1, line2);\n//=true",hasMap:!1,npmName:"@turf/boolean-crosses",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanDisjoint",hidden:!1,parent:null,description:"Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.",snippet:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanDisjoint(line, point);\n//=true",example:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanDisjoint(line, point);\n//=true",hasMap:!1,npmName:"@turf/boolean-disjoint",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanEqual",hidden:!1,parent:null,description:"Determine whether two geometries of the same type have identical X,Y coordinate values.\nSee http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm",snippet:"var pt1 = turf.point([0, 0]);\nvar pt2 = turf.point([0, 0]);\nvar pt3 = turf.point([1, 1]);\n\nturf.booleanEqual(pt1, pt2);\n//= true\nturf.booleanEqual(pt2, pt3);\n//= false",example:"var pt1 = turf.point([0, 0]);\nvar pt2 = turf.point([0, 0]);\nvar pt3 = turf.point([1, 1]);\n\nturf.booleanEqual(pt1, pt2);\n//= true\nturf.booleanEqual(pt2, pt3);\n//= false",hasMap:!1,npmName:"@turf/boolean-equal",returns:[{type:"boolean",desc:"true if the objects are equal, false otherwise"}],params:[{Argument:"feature1",Type:'(Geometry|Feature)',Description:"GeoJSON input"},{Argument:"feature2",Type:'(Geometry|Feature)',Description:"GeoJSON input"}],options:null,throws:[]},{name:"booleanIntersects",hidden:!1,parent:null,description:"Boolean-intersects returns (TRUE) two geometries intersect.",snippet:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanIntersects(line, point);\n//=true",example:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanIntersects(line, point);\n//=true",hasMap:!1,npmName:"@turf/boolean-intersects",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanOverlap",hidden:!1,parent:null,description:"Compares two geometries of the same dimension and returns true if their intersection set results in a geometry\ndifferent from both but of the same dimension. It applies to Polygon/Polygon, LineString/LineString,\nMultipoint/Multipoint, MultiLineString/MultiLineString and MultiPolygon/MultiPolygon.\nIn other words, it returns true if the two geometries overlap, provided that neither completely contains the other.",snippet:"var poly1 = turf.polygon([[[0,0],[0,5],[5,5],[5,0],[0,0]]]);\nvar poly2 = turf.polygon([[[1,1],[1,6],[6,6],[6,1],[1,1]]]);\nvar poly3 = turf.polygon([[[10,10],[10,15],[15,15],[15,10],[10,10]]]);\n\nturf.booleanOverlap(poly1, poly2)\n//=true\nturf.booleanOverlap(poly2, poly3)\n//=false",example:"var poly1 = turf.polygon([[[0,0],[0,5],[5,5],[5,0],[0,0]]]);\nvar poly2 = turf.polygon([[[1,1],[1,6],[6,6],[6,1],[1,1]]]);\nvar poly3 = turf.polygon([[[10,10],[10,15],[15,15],[15,10],[10,10]]]);\n\nturf.booleanOverlap(poly1, poly2)\n//=true\nturf.booleanOverlap(poly2, poly3)\n//=false",hasMap:!1,npmName:"@turf/boolean-overlap",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"input"},{Argument:"feature2",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"input"}],options:null,throws:[]},{name:"booleanParallel",hidden:!1,parent:null,description:"Boolean-Parallel returns True if each segment of line1 is parallel to the correspondent segment of line2",snippet:"var line1 = turf.lineString([[0, 0], [0, 1]]);\nvar line2 = turf.lineString([[1, 0], [1, 1]]);\n\nturf.booleanParallel(line1, line2);\n//=true",example:"var line1 = turf.lineString([[0, 0], [0, 1]]);\nvar line2 = turf.lineString([[1, 0], [1, 1]]);\n\nturf.booleanParallel(line1, line2);\n//=true",hasMap:!1,npmName:"@turf/boolean-parallel",returns:[{type:"boolean",desc:"true/false if the lines are parallel"}],params:[{Argument:"line1",Type:'(Geometry|Feature <LineString>)',Description:"GeoJSON Feature or Geometry"},{Argument:"line2",Type:'(Geometry|Feature <LineString>)',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanPointInPolygon",hidden:!1,parent:null,description:'Takes a Point and a Polygon or MultiPolygon and determines if the point\nresides inside the polygon. The polygon can be convex or concave. The function accounts for holes.',snippet:"var pt = turf.point([-77, 44]);\nvar poly = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]]);\n\nturf.booleanPointInPolygon(pt, poly);\n//= true",example:"var pt = turf.point([-77, 44]);\nvar poly = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]]);\n\nturf.booleanPointInPolygon(pt, poly);\n//= true",hasMap:!1,npmName:"@turf/boolean-point-in-polygon",returns:[{type:"boolean",desc:"true if the Point is inside the Polygon; false if the Point is not inside the Polygon"}],params:[{Argument:"point",Type:'Coord',Description:"input point"},{Argument:"polygon",Type:'Feature <(Polygon|MultiPolygon)>',Description:"input polygon or multipolygon"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"ignoreBoundary",Type:"boolean",Default:"false",Description:"True if polygon boundary should be ignored when determining if\nthe point is inside the polygon otherwise false."}],throws:[]},{name:"booleanPointOnLine",hidden:!1,parent:null,description:"Returns true if a point is on a line. Accepts a optional parameter to ignore the\nstart and end vertices of the linestring.",snippet:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);\nvar isPointOnLine = turf.booleanPointOnLine(pt, line);\n//=true",example:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);\nvar isPointOnLine = turf.booleanPointOnLine(pt, line);\n//=true",hasMap:!1,npmName:"@turf/boolean-point-on-line",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"pt",Type:'Coord',Description:"GeoJSON Point"},{Argument:"line",Type:'Feature <LineString>',Description:"GeoJSON LineString"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"ignoreEndVertices",Type:"boolean",Default:"false",Description:"whether to ignore the start and end vertices."},{Prop:"epsilon",Type:"(number)",Default:null,Description:"Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points"}],throws:[]},{name:"booleanWithin",hidden:!1,parent:null,description:"Boolean-within returns true if the first geometry is completely within the second geometry.\nThe interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)\nmust not intersect the exterior of the secondary (geometry b).\nBoolean-within returns the exact opposite result of the @turf/boolean-contains.",snippet:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanWithin(point, line);\n//=true",example:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanWithin(point, line);\n//=true",hasMap:!1,npmName:"@turf/boolean-within",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]}]},{group:"Unit Conversion",modules:[{name:"bearingToAzimuth",hidden:!1,parent:"@turf/helpers",description:"Converts any bearing angle from the north line direction (positive clockwise)\nand returns an angle between 0-360 degrees (positive clockwise), 0 being the north line",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"angle between 0 and 360 degrees"}],params:[{Argument:"bearing",Type:"number",Description:"angle, between -180 and +180 degrees"}],options:null,throws:[]},{name:"convertArea",hidden:!1,parent:"@turf/helpers",description:"Converts a area to the requested unit.\nValid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"the converted area"}],params:[{Argument:"area",Type:"number",Description:"to be converted"},{Argument:"originalUnit",Type:"Units",Description:"of the distance"},{Argument:"finalUnit",Type:"Units",Description:"returned unit"}],options:null,throws:[]},{name:"convertLength",hidden:!1,parent:"@turf/helpers",description:"Converts a length to the requested unit.\nValid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"the converted length"}],params:[{Argument:"length",Type:"number",Description:"to be converted"},{Argument:"originalUnit",Type:"Units",Description:"of the length"},{Argument:"finalUnit",Type:"Units",Description:"returned unit"}],options:null,throws:[]},{name:"degreesToRadians",hidden:!1,parent:"@turf/helpers",description:"Converts an angle in degrees to radians",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"angle in radians"}],params:[{Argument:"degrees",Type:"number",Description:"angle between 0 and 360 degrees"}],options:null,throws:[]},{name:"lengthToRadians",hidden:!1,parent:"@turf/helpers",description:"Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\nValid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"radians"}],params:[{Argument:"distance",Type:"number",Description:"in real units"},{Argument:"units",Type:"string",Description:"can be degrees, radians, miles, inches, yards, metres,\nmeters, kilometres, kilometers."}],options:null,throws:[]},{name:"lengthToDegrees",hidden:!1,parent:"@turf/helpers",description:"Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\nValid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"degrees"}],params:[{Argument:"distance",Type:"number",Description:"in real units"},{Argument:"units",Type:"string",Description:"can be degrees, radians, miles, inches, yards, metres,\nmeters, kilometres, kilometers."}],options:null,throws:[]},{name:"radiansToLength",hidden:!1,parent:"@turf/helpers",description:"Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\nValid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"distance"}],params:[{Argument:"radians",Type:"number",Description:"in radians across the sphere"},{Argument:"units",Type:"string",Description:"can be degrees, radians, miles, inches, yards, metres,\nmeters, kilometres, kilometers."}],options:null,throws:[]},{name:"radiansToDegrees",hidden:!1,parent:"@turf/helpers",description:"Converts an angle in radians to degrees",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"degrees between 0 and 360 degrees"}],params:[{Argument:"radians",Type:"number",Description:"angle in radians"}],options:null,throws:[]},{name:"toMercator",hidden:!1,parent:"@turf/projection",description:"Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection",snippet:"var pt = turf.point([-71,41]);\nvar converted = turf.toMercator(pt);\n",example:"var pt = turf.point([-71,41]);\nvar converted = turf.toMercator(pt);\n\n//addToMap\nvar addToMap = [pt, converted];",hasMap:!0,npmName:"@turf/projection",returns:[{type:'GeoJSON',desc:"Projected GeoJSON"}],params:[{Argument:"geojson",Type:'(GeoJSON|Position)',Description:"WGS84 GeoJSON object"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"toWgs84",hidden:!1,parent:"@turf/projection",description:"Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection",snippet:"var pt = turf.point([-7903683.846322424, 5012341.663847514]);\nvar converted = turf.toWgs84(pt);\n",example:"var pt = turf.point([-7903683.846322424, 5012341.663847514]);\nvar converted = turf.toWgs84(pt);\n\n//addToMap\nvar addToMap = [pt, converted];",hasMap:!0,npmName:"@turf/projection",returns:[{type:'GeoJSON',desc:"Projected GeoJSON"}],params:[{Argument:"geojson",Type:'(GeoJSON|Position)',Description:"Mercator GeoJSON object"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]}]}]}},"2g0B":function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("Row",{staticClass:"app",attrs:{id:"app"}},[e("Col",{staticClass:"sideCol sideColResponsive",attrs:{span:"4"}},[e("sidebar",{attrs:{modules:this.modules},on:{changeModule:this.setModule}})],1),e("Col",{staticClass:"infoResponsive",attrs:{span:"18",offset:"1"}},[e("github"),e("nuxt")],1)],1)};r._withStripped=!0;var o={render:r,staticRenderFns:[]};e.a=o},"3l61":function(t,e,n){"use strict";e.a={name:"Sidebar",props:["modules"],data:function(){return{menu:{open:!1,resize:void 0},filter:""}},mounted:function(){var t=this.menu;t.resize=function(){window.innerWidth>900&&(t.open=!1,document.body.style.overflow="auto")},window.addEventListener("resize",t.resize)},unmounted:function(){window.removeEventListener("resize",this.menu.resize)},computed:{displayedModules:function(){var t=[];return this.modules.forEach(function(e){var n=e.modules.filter(function(t){return-1!==t.name.toUpperCase().indexOf(this.filter.toUpperCase())},this).map(function(t){return t.href="/docs/#"+t.name,t});n.length>0&&t.push({group:e.group,modules:n})},this),t}},watch:{"menu.open":function(t){document.body.style.overflow=t?"hidden":"auto"}},methods:{close:function(){this.menu.open=!1},goHome:function(){this.$router.push("/")}}}},"7V2L":function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,'.sidebarContents{top:0;bottom:0;width:inherit}.sidebarContents .topMenu{padding-left:30px;padding-top:20px}.sidebarContents .logo{height:120px;background-color:#2ecc71;margin-right:0;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:center;align-self:center}.sidebarContents .logo h1{font-size:32px;font-size:2rem;color:#fff;text-align:center;letter-spacing:6.4px;letter-spacing:.4rem;font-weight:600}.sidebarContents .logo h1:before{content:"<";opacity:0;-webkit-transition:.3s;transition:.3s}.sidebarContents .logo h1:after{content:">";-webkit-transition:.3s;transition:.3s;opacity:0}.sidebarContents .logo h1:hover:after,.sidebarContents .logo h1:hover:before{opacity:1}.sidebarContents .fixedContent{width:inherit;position:fixed;background-color:#fcfcfc}.sidebarContents .fixedContent #sidebarFilter{margin:20px 0;font-size:14.4px;font-size:.9rem;width:80%;padding:5px;border:3px solid #efefef;color:#656565;-webkit-transition:.3s;transition:.3s}.sidebarContents .fixedContent #sidebarFilter:focus{outline:none;border:3px solid #ccc}.sidebarContents .turfModules{height:calc(100vh - 250px);position:relative;overflow-y:scroll;width:100%;bottom:0;width:inherit;background-color:#fcfcfc;left:0;padding-bottom:20px;padding-left:30px}.sidebarContents .turfModules::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:rgba(12,57,82,.02)}.sidebarContents .turfModules::-webkit-scrollbar{width:6px;background-color:rgba(12,57,82,.02)}.sidebarContents .turfModules::-webkit-scrollbar-thumb{background-color:rgba(12,57,82,.3)}.sidebarContents .menuItem{margin-left:8px!important;margin-bottom:16px;margin:2px 0;font-size:14.4px;font-size:.9rem;color:#656565;text-decoration:none;cursor:pointer;list-style-type:none}.sidebarContents .menuLink{text-decoration:none}.sidebarContents .heading{margin-left:0!important;font-weight:700;text-transform:uppercase;margin-top:10px;font-size:14px}.sidebarContents .githubResponsive,.sidebarContents .menuToggle,.sidebarContents label{display:none}.sidebarContents .menuToggle:checked~.menuDropDown{display:block}@media screen and (max-width:900px){.sidebarContents .links{margin-top:20px}.sidebarContents #sidebarFilter{margin:18px 0!important}.sidebarContents .menuToggle~.menuDropDown{display:none}.sidebarContents .menuToggle:checked~.menuDropDown{display:block}.sidebarContents .menuToggle{display:none;position:absolute;height:100%;height:50px;width:50px}.sidebarContents .toggleLabel{display:inline-block;cursor:pointer;padding:10px;padding-left:30px}.sidebarContents .toggleLabel span{display:block;width:30px;height:4px;margin-bottom:5px;background-color:#fff;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.sidebarContents .toggleLabel span:first-of-type{-webkit-transform-origin:top left;transform-origin:top left}.sidebarContents .toggleLabel span:last-of-type{-webkit-transform-origin:bottom left;transform-origin:bottom left}.sidebarContents .menuToggle:checked+.toggleLabel span:first-of-type{-webkit-transform:rotate(45deg) translate(6px,-6px);transform:rotate(45deg) translate(6px,-6px)}.sidebarContents .menuToggle:checked+.toggleLabel span:nth-of-type(2){opacity:0}.sidebarContents .menuToggle:checked+.toggleLabel span:nth-of-type(3){-webkit-transform:rotate(-45deg) translate(6px,6px);transform:rotate(-45deg) translate(6px,6px)}.sidebarContents .menuToggle,.sidebarContents .toggleLabel{position:absolute;top:36px}.sidebarContents .githubResponsive{display:block}.sidebarContents .githubResponsive>a{margin-left:0!important;font-weight:700;text-transform:uppercase;margin-top:10px;font-size:14px;color:#656565;text-decoration:none;cursor:pointer;list-style-type:none}.sidebarContents .fixedContentResponsive{position:fixed;z-index:10000000}.sidebarContents .headingResponsive{background:red;padding-top:10px;margin-top:0}.sidebarContents .turfModulesResponsive{width:100%;height:calc(100vh - 289px)}}',""])},JzRy:function(t,e,n){"use strict";var r=n("wicR"),o=!1;var a=function(t){o||n("/FRg")},i=n("VU/8")(null,r.a,!1,a,null,null);i.options.__file="src/components/Github.vue",e.a=i.exports},SBIk:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"html{width:100%;height:100%}body{font-family:Istok Web,sans-serif;color:#444;font-size:16px;font-size:1rem;min-height:100%;background:rgba(236,240,241,.85)}h1,h2,h3,h4{font-family:Montserrat,serif;color:#5a5a5a}h3{font-size:48px;font-size:3rem;font-weight:200;margin-top:5px}h4{font-weight:600;margin:20px 0 10px}a{color:#0c3952;text-underline-position:under;-webkit-text-decoration-style:solid;text-decoration-style:solid;text-decoration:underline}.mainContentArea pre{background-color:#fafafa;border:2px solid #ecf0f1;overflow-x:auto}.hljs{background:none!important;padding:20px}.sideCol{background-color:#fcfcfc;min-height:100vh}.mainContentArea{background-color:#f6f6f6;padding:40px;margin-top:60px;margin-bottom:40px;border:2px solid rgba(12,57,82,.1)}.mainContentArea h3{font-weight:200;font-size:48px;font-size:3rem;margin-bottom:10px;margin-top:0}@media screen and (max-width:900px){.appResponsive{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.appResponsive,.sideColResponsive{display:-webkit-box;display:-ms-flexbox;display:flex}.sideColResponsive{width:100%;min-height:0!important}.mainContentAreaResponsive{margin-top:120px!important;margin-bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.infoResponsive{margin-left:0;width:100%}.infoResponsive>a>svg{display:none}.mapResponsive{margin-left:0}}",""])},XXcc:function(t,e,n){var r=n("7V2L");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("c36a6458",r,!1,{sourceMap:!1})},lZ5c:function(t,e,n){"use strict";var r=n("3l61"),o=n("oTPc"),a=!1;var i=function(t){a||n("XXcc")},s=n("VU/8")(r.a,o.a,!1,i,null,null);s.options.__file="src/components/Sidebar.vue",e.a=s.exports},lfHO:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("/BnR"),o=n("2g0B"),a=!1;var i=function(t){a||n("x4A4")},s=n("VU/8")(r.a,o.a,!1,i,null,null);s.options.__file="src/layouts/default.vue",e.default=s.exports},oTPc:function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebarContents"},[n("div",{staticClass:"fixedContent fixedContentResponsive"},[t._m(0),n("input",{directives:[{name:"model",rawName:"v-model",value:t.menu.open,expression:"menu.open"}],staticClass:"menuToggle",attrs:{type:"checkbox",id:"menuToggle"},domProps:{checked:Array.isArray(t.menu.open)?t._i(t.menu.open,null)>-1:t.menu.open},on:{change:function(e){var n=t.menu.open,r=e.target,o=!!r.checked;if(Array.isArray(n)){var a=t._i(n,null);r.checked?a<0&&t.$set(t.menu,"open",n.concat([null])):a>-1&&t.$set(t.menu,"open",n.slice(0,a).concat(n.slice(a+1)))}else t.$set(t.menu,"open",o)}}}),n("div",{staticClass:"logo",on:{click:t.goHome}},[n("h1",[t._v("TURF")])]),n("div",{staticClass:"menuDropDown"},[n("div",{staticClass:"topMenu"},[n("div",{staticClass:"links"},[n("span",{on:{click:t.close}},[n("nuxt-link",{staticClass:"menuItem heading",attrs:{to:"/getting-started",tag:"li"}},[t._v("Getting Started")])],1),t._m(1)]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.filter,expression:"filter"}],attrs:{id:"sidebarFilter",placeholder:"Search modules"},domProps:{value:t.filter},on:{input:function(e){e.target.composing||(t.filter=e.target.value)}}})]),n("ul",{staticClass:"turfModules turfModulesResponsive"},t._l(t.displayedModules,function(e){return n("div",{key:e.group},[n("li",{staticClass:"menuItem heading"},[t._v(t._s(e.group))]),n("span",{on:{click:t.close}},t._l(e.modules,function(e){return n("nuxt-link",{key:e.name,staticClass:"menuLink",attrs:{to:e.href}},[n("li",{staticClass:"menuItem"},[t._v("\n "+t._s(e.name)+"\n ")])])}),1)])}),0)])])])};r._withStripped=!0;var o={render:r,staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("label",{staticClass:"toggleLabel",attrs:{for:"menuToggle"}},[e("span"),e("span"),e("span")])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",{staticClass:"menuItem heading githubResponsive"},[e("a",{attrs:{href:"https://www.github.com/turfjs/turf"}},[this._v("GitHub")])])}]};e.a=o},uUoQ:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,".githubLogo{float:right;height:25px;width:25px;margin-top:8px;cursor:pointer;position:fixed;right:10px}.githubLogo path{fill:rgba(12,57,82,.6);-webkit-transition:.3s;transition:.3s}.githubLogo path:hover{fill:#2ecc71}",""])},wicR:function(t,e,n){"use strict";var r=function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"https://github.com/Turfjs/turf/"}},[e("svg",{staticClass:"githubLogo",attrs:{width:"512px",height:"512px",viewBox:"0 0 512 512"}},[e("g",{attrs:{id:"g3"}},[e("path",{attrs:{d:"M256,0C114.615,0,0,114.615,0,256s114.615,256,256,256s256-114.615,256-256S397.385,0,256,0z M408.027,408.027 c-19.76,19.759-42.756,35.267-68.354,46.094c-6.502,2.75-13.105,5.164-19.801,7.246V423c0-20.167-6.916-35-20.75-44.5 c8.668-0.833,16.625-2,23.875-3.5s14.918-3.667,23-6.5c8.084-2.833,15.334-6.208,21.75-10.125c6.418-3.917,12.584-9,18.5-15.25 c5.918-6.25,10.875-13.333,14.875-21.25s7.168-17.417,9.5-28.5c2.334-11.083,3.5-23.292,3.5-36.625c0-25.833-8.416-47.833-25.25-66 c7.668-20,6.834-41.75-2.5-65.25l-6.25-0.75c-4.332-0.5-12.125,1.333-23.375,5.5s-23.875,11-37.875,20.5 c-19.832-5.5-40.416-8.25-61.749-8.25c-21.5,0-42,2.75-61.5,8.25c-8.833-6-17.208-10.958-25.125-14.875s-14.25-6.583-19-8 s-9.167-2.292-13.25-2.625s-6.708-0.417-7.875-0.25s-2,0.333-2.5,0.5c-9.333,23.667-10.167,45.417-2.5,65.25 c-16.833,18.167-25.25,40.167-25.25,66c0,13.333,1.167,25.542,3.5,36.625s5.5,20.583,9.5,28.5s8.958,15,14.875,21.25 s12.083,11.333,18.5,15.25s13.667,7.292,21.75,10.125s15.75,5,23,6.5s15.208,2.667,23.875,3.5c-13.667,9.333-20.5,24.167-20.5,44.5 v39.115c-7.549-2.247-14.99-4.902-22.3-7.994c-25.597-10.827-48.594-26.335-68.353-46.094 c-19.758-19.758-35.267-42.756-46.093-68.354C46.679,313.195,41,285.043,41,256s5.679-57.195,16.879-83.675 c10.827-25.597,26.335-48.594,46.093-68.353c19.758-19.759,42.756-35.267,68.353-46.093C198.805,46.679,226.957,41,256,41 s57.195,5.679,83.676,16.879c25.598,10.827,48.594,26.335,68.354,46.093c19.758,19.758,35.266,42.756,46.092,68.353 C465.32,198.805,471,226.957,471,256s-5.68,57.195-16.879,83.675C443.295,365.271,427.785,388.27,408.027,408.027z",id:"path5"}})])])])};r._withStripped=!0;var o={render:r,staticRenderFns:[]};e.a=o},x4A4:function(t,e,n){var r=n("SBIk");"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n("rjj0")("3e3e13cf",r,!1,{sourceMap:!1})}}); \ No newline at end of file diff --git a/docs/js/manifest.870740f68a3bb2977f96.js b/docs/js/manifest.870740f68a3bb2977f96.js new file mode 100644 index 00000000..0860d984 --- /dev/null +++ b/docs/js/manifest.870740f68a3bb2977f96.js @@ -0,0 +1 @@ +!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var u,i,f,s=0,l=[];sLineString and returns a Point at a specified distance along the line.',snippet:"var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]]);\nvar options = {units: 'miles'};\n\nvar along = turf.along(line, 200, options);\n",example:"var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]]);\nvar options = {units: 'miles'};\n\nvar along = turf.along(line, 200, options);\n\n//addToMap\nvar addToMap = [along, line]",hasMap:!0,npmName:"@turf/along",returns:[{type:'Feature <Point>',desc:"Point distance units along the line"}],params:[{Argument:"line",Type:'Feature <LineString>',Description:"input line"},{Argument:"distance",Type:"number",Description:"distance along the line"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"area",hidden:!1,parent:null,description:"Takes one or more features and returns their area in square meters.",snippet:"var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);\n\nvar area = turf.area(polygon);\n",example:"var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);\n\nvar area = turf.area(polygon);\n\n//addToMap\nvar addToMap = [polygon]\npolygon.properties.area = area",hasMap:!0,npmName:"@turf/area",returns:[{type:"number",desc:"area in square meters"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input GeoJSON feature(s)"}],options:null,throws:[]},{name:"bbox",hidden:!1,parent:null,description:"Takes a set of features, calculates the bbox of all input features, and returns a bounding box.",snippet:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\nvar bbox = turf.bbox(line);\nvar bboxPolygon = turf.bboxPolygon(bbox);\n",example:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\nvar bbox = turf.bbox(line);\nvar bboxPolygon = turf.bboxPolygon(bbox);\n\n//addToMap\nvar addToMap = [line, bboxPolygon]",hasMap:!0,npmName:"@turf/bbox",returns:[{type:'BBox',desc:"bbox extent in minX, minY, maxX, maxY order"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any GeoJSON object"}],options:null,throws:[]},{name:"bboxPolygon",hidden:!1,parent:null,description:'Takes a bbox and returns an equivalent polygon.',snippet:"var bbox = [0, 0, 10, 10];\n\nvar poly = turf.bboxPolygon(bbox);\n",example:"var bbox = [0, 0, 10, 10];\n\nvar poly = turf.bboxPolygon(bbox);\n\n//addToMap\nvar addToMap = [poly]",hasMap:!0,npmName:"@turf/bbox-polygon",returns:[{type:'Feature <Polygon>',desc:"a Polygon representation of the bounding box"}],params:[{Argument:"bbox",Type:'BBox',Description:"extent in minX, minY, maxX, maxY order"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Properties",Default:"{}",Description:"Translate properties to Polygon"},{Prop:"id",Type:"(string|number)",Default:"{}",Description:"Translate Id to Polygon"}],throws:[]},{name:"bearing",hidden:!1,parent:null,description:'Takes two points and finds the geographic bearing between them,\ni.e. the angle measured in degrees from the north line (0 degrees)',snippet:"var point1 = turf.point([-75.343, 39.984]);\nvar point2 = turf.point([-75.534, 39.123]);\n\nvar bearing = turf.bearing(point1, point2);\n",example:"var point1 = turf.point([-75.343, 39.984]);\nvar point2 = turf.point([-75.534, 39.123]);\n\nvar bearing = turf.bearing(point1, point2);\n\n//addToMap\nvar addToMap = [point1, point2]\npoint1.properties['marker-color'] = '#f00'\npoint2.properties['marker-color'] = '#0f0'\npoint1.properties.bearing = bearing",hasMap:!0,npmName:"@turf/bearing",returns:[{type:"number",desc:"bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)"}],params:[{Argument:"start",Type:'Coord',Description:"starting Point"},{Argument:"end",Type:'Coord',Description:"ending Point"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"final",Type:"boolean",Default:"false",Description:"calculates the final bearing if true"}],throws:[]},{name:"center",hidden:!1,parent:null,description:'Takes a Feature or FeatureCollection and returns the absolute center point of all features.',snippet:"var features = turf.points([\n [-97.522259, 35.4691],\n [-97.502754, 35.463455],\n [-97.508269, 35.463245]\n]);\n\nvar center = turf.center(features);\n",example:"var features = turf.points([\n [-97.522259, 35.4691],\n [-97.502754, 35.463455],\n [-97.508269, 35.463245]\n]);\n\nvar center = turf.center(features);\n\n//addToMap\nvar addToMap = [features, center]\ncenter.properties['marker-size'] = 'large';\ncenter.properties['marker-color'] = '#000';",hasMap:!0,npmName:"@turf/center",returns:[{type:'Feature <Point>',desc:"a Point feature at the absolute center point of all input features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be centered"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate GeoJSON Properties to Point"},{Prop:"bbox",Type:"Object",Default:"{}",Description:"Translate GeoJSON BBox to Point"},{Prop:"id",Type:"Object",Default:"{}",Description:"Translate GeoJSON Id to Point"}],throws:[]},{name:"centerOfMass",hidden:!1,parent:null,description:'Takes any Feature or a FeatureCollection and returns its center of mass using this formula: Centroid of Polygon.',snippet:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar center = turf.centerOfMass(polygon);\n",example:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar center = turf.centerOfMass(polygon);\n\n//addToMap\nvar addToMap = [polygon, center]",hasMap:!0,npmName:"@turf/center-of-mass",returns:[{type:'Feature <Point>',desc:"the center of mass"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be centered"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate Properties to Feature"}],throws:[]},{name:"centroid",hidden:!1,parent:null,description:"Takes one or more features and calculates the centroid using the mean of all vertices.\nThis lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.",snippet:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar centroid = turf.centroid(polygon);\n",example:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar centroid = turf.centroid(polygon);\n\n//addToMap\nvar addToMap = [polygon, centroid]",hasMap:!0,npmName:"@turf/centroid",returns:[{type:'Feature <Point>',desc:"the centroid of the input features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be centered"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"an Object that is used as the "}],throws:[]},{name:"destination",hidden:!1,parent:null,description:'Takes a Point and calculates the location of a destination point given a distance in\ndegrees, radians, miles, or kilometers; and bearing in degrees.\nThis uses the Haversine formula to account for global curvature.',snippet:"var point = turf.point([-75.343, 39.984]);\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: 'miles'};\n\nvar destination = turf.destination(point, distance, bearing, options);\n",example:"var point = turf.point([-75.343, 39.984]);\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: 'miles'};\n\nvar destination = turf.destination(point, distance, bearing, options);\n\n//addToMap\nvar addToMap = [point, destination]\ndestination.properties['marker-color'] = '#f00';\npoint.properties['marker-color'] = '#0f0';",hasMap:!0,npmName:"@turf/destination",returns:[{type:'Feature <Point>',desc:"destination point"}],params:[{Argument:"origin",Type:'Coord',Description:"starting point"},{Argument:"distance",Type:"number",Description:"distance from the origin point"},{Argument:"bearing",Type:"number",Description:"ranging from -180 to 180"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"},{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate properties to Point"}],throws:[]},{name:"distance",hidden:!1,parent:null,description:'Calculates the distance between two points in degrees, radians, miles, or kilometers.\nThis uses the Haversine formula to account for global curvature.',snippet:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.distance(from, to, options);\n",example:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.distance(from, to, options);\n\n//addToMap\nvar addToMap = [from, to];\nfrom.properties.distance = distance;\nto.properties.distance = distance;",hasMap:!0,npmName:"@turf/distance",returns:[{type:"number",desc:"distance between the two points"}],params:[{Argument:"from",Type:'(Coord|Point)',Description:"origin point or coordinate"},{Argument:"to",Type:'(Coord|Point)',Description:"destination point or coordinate"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"envelope",hidden:!1,parent:null,description:'Takes any number of features and returns a rectangular Polygon that encompasses all vertices.',snippet:'var features = turf.featureCollection([\n turf.point([-75.343, 39.984], {"name": "Location A"}),\n turf.point([-75.833, 39.284], {"name": "Location B"}),\n turf.point([-75.534, 39.123], {"name": "Location C"})\n]);\n\nvar enveloped = turf.envelope(features);\n',example:'var features = turf.featureCollection([\n turf.point([-75.343, 39.984], {"name": "Location A"}),\n turf.point([-75.833, 39.284], {"name": "Location B"}),\n turf.point([-75.534, 39.123], {"name": "Location C"})\n]);\n\nvar enveloped = turf.envelope(features);\n\n//addToMap\nvar addToMap = [features, enveloped];',hasMap:!0,npmName:"@turf/envelope",returns:[{type:'Feature <Polygon>',desc:"a rectangular Polygon feature that encompasses all vertices"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input features"}],options:null,throws:[]},{name:"length",hidden:!1,parent:null,description:'Takes a GeoJSON and measures its length in the specified units, (Multi)Point \'s distance are ignored.',snippet:"var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]]);\nvar length = turf.length(line, {units: 'miles'});\n",example:"var line = turf.lineString([[115, -32], [131, -22], [143, -25], [150, -34]]);\nvar length = turf.length(line, {units: 'miles'});\n\n//addToMap\nvar addToMap = [line];\nline.properties.distance = length;",hasMap:!0,npmName:"@turf/length",returns:[{type:"number",desc:"length of GeoJSON"}],params:[{Argument:"geojson",Type:'Feature <(LineString|MultiLineString)>',Description:"GeoJSON to measure"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"kilometers",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"midpoint",hidden:!1,parent:null,description:'Takes two points and returns a point midway between them.\nThe midpoint is calculated geodesically, meaning the curvature of the earth is taken into account.',snippet:"var point1 = turf.point([144.834823, -37.771257]);\nvar point2 = turf.point([145.14244, -37.830937]);\n\nvar midpoint = turf.midpoint(point1, point2);\n",example:"var point1 = turf.point([144.834823, -37.771257]);\nvar point2 = turf.point([145.14244, -37.830937]);\n\nvar midpoint = turf.midpoint(point1, point2);\n\n//addToMap\nvar addToMap = [point1, point2, midpoint];\nmidpoint.properties['marker-color'] = '#f00';",hasMap:!0,npmName:"@turf/midpoint",returns:[{type:'Feature <Point>',desc:"a point midway between pt1 and pt2"}],params:[{Argument:"point1",Type:'Coord',Description:"first point"},{Argument:"point2",Type:'Coord',Description:"second point"}],options:null,throws:[]},{name:"pointOnFeature",hidden:!1,parent:null,description:'Takes a Feature or FeatureCollection and returns a Point guaranteed to be on the surface of the feature.',snippet:"var polygon = turf.polygon([[\n [116, -36],\n [131, -32],\n [146, -43],\n [155, -25],\n [133, -9],\n [111, -22],\n [116, -36]\n]]);\n\nvar pointOnPolygon = turf.pointOnFeature(polygon);\n",example:"var polygon = turf.polygon([[\n [116, -36],\n [131, -32],\n [146, -43],\n [155, -25],\n [133, -9],\n [111, -22],\n [116, -36]\n]]);\n\nvar pointOnPolygon = turf.pointOnFeature(polygon);\n\n//addToMap\nvar addToMap = [polygon, pointOnPolygon];",hasMap:!0,npmName:"@turf/point-on-feature",returns:[{type:'Feature <Point>',desc:"a point on the surface of input"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any Feature or FeatureCollection"}],options:null,throws:[]},{name:"polygonTangents",hidden:!1,parent:null,description:'Finds the tangents of a (Multi)Polygon from a Point.',snippet:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar point = turf.point([61, 5]);\n\nvar tangents = turf.polygonTangents(point, polygon)\n",example:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar point = turf.point([61, 5]);\n\nvar tangents = turf.polygonTangents(point, polygon)\n\n//addToMap\nvar addToMap = [tangents, point, polygon];",hasMap:!0,npmName:"@turf/polygon-tangents",returns:[{type:'FeatureCollection <Point>',desc:"Feature Collection containing the two tangent points"}],params:[{Argument:"pt",Type:'Coord',Description:"to calculate the tangent points from"},{Argument:"polygon",Type:'Feature <(Polygon|MultiPolygon)>',Description:"to get tangents from"}],options:null,throws:[]},{name:"pointToLineDistance",hidden:!1,parent:null,description:'Returns the minimum distance between a Point and a LineString , being the distance from a line the\nminimum distance between the point and any segment of the LineString.',snippet:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[1, 1],[-1, 1]]);\n\nvar distance = turf.pointToLineDistance(pt, line, {units: 'miles'});\n//=69.11854715938406",example:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[1, 1],[-1, 1]]);\n\nvar distance = turf.pointToLineDistance(pt, line, {units: 'miles'});\n//=69.11854715938406",hasMap:!1,npmName:"@turf/point-to-line-distance",returns:[{type:"number",desc:"distance between point and line"}],params:[{Argument:"pt",Type:'(Feature <Point>|Array )',Description:"Feature or Geometry"},{Argument:"line",Type:'Feature <LineString>',Description:"GeoJSON Feature or Geometry"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"can be anything supported by turf/convertLength\n(ex: degrees, radians, miles, or kilometers)"},{Prop:"method",Type:"string",Default:'"geodesic"',Description:"wether to calculate the distance based on geodesic (spheroid) or\nplanar (flat) method. Valid options are 'geodesic' or 'planar'."}],throws:[]},{name:"rhumbBearing",hidden:!1,parent:null,description:'Takes two points and finds the bearing angle between them along a Rhumb line\ni.e. the angle measured in degrees start the north line (0 degrees)',snippet:'var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});\nvar point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});\n\nvar bearing = turf.rhumbBearing(point1, point2);\n',example:'var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});\nvar point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});\n\nvar bearing = turf.rhumbBearing(point1, point2);\n\n//addToMap\nvar addToMap = [point1, point2];\npoint1.properties.bearing = bearing;\npoint2.properties.bearing = bearing;',hasMap:!0,npmName:"@turf/rhumb-bearing",returns:[{type:"number",desc:"bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)"}],params:[{Argument:"start",Type:'Coord',Description:"starting Point"},{Argument:"end",Type:'Coord',Description:"ending Point"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"final",Type:"boolean",Default:"false",Description:"calculates the final bearing if true"}],throws:[]},{name:"rhumbDestination",hidden:!1,parent:null,description:'Returns the destination Point having travelled the given distance along a Rhumb line from the\norigin Point with the (varant) given bearing.',snippet:'var pt = turf.point([-75.343, 39.984], {"marker-color": "F00"});\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: \'miles\'};\n\nvar destination = turf.rhumbDestination(pt, distance, bearing, options);\n',example:"var pt = turf.point([-75.343, 39.984], {\"marker-color\": \"F00\"});\nvar distance = 50;\nvar bearing = 90;\nvar options = {units: 'miles'};\n\nvar destination = turf.rhumbDestination(pt, distance, bearing, options);\n\n//addToMap\nvar addToMap = [pt, destination]\ndestination.properties['marker-color'] = '#00F';",hasMap:!0,npmName:"@turf/rhumb-destination",returns:[{type:'Feature <Point>',desc:"Destination point."}],params:[{Argument:"origin",Type:'Coord',Description:"starting point"},{Argument:"distance",Type:"number",Description:"distance from the starting point"},{Argument:"bearing",Type:"number",Description:"varant bearing angle ranging from -180 to 180 degrees from north"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"},{Prop:"properties",Type:"Object",Default:"{}",Description:"translate properties to destination point"}],throws:[]},{name:"rhumbDistance",hidden:!1,parent:null,description:'Calculates the distance along a rhumb line between two points in degrees, radians,\nmiles, or kilometers.',snippet:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.rhumbDistance(from, to, options);\n",example:"var from = turf.point([-75.343, 39.984]);\nvar to = turf.point([-75.534, 39.123]);\nvar options = {units: 'miles'};\n\nvar distance = turf.rhumbDistance(from, to, options);\n\n//addToMap\nvar addToMap = [from, to];\nfrom.properties.distance = distance;\nto.properties.distance = distance;",hasMap:!0,npmName:"@turf/rhumb-distance",returns:[{type:"number",desc:"distance between the two points"}],params:[{Argument:"from",Type:'Coord',Description:"origin point"},{Argument:"to",Type:'Coord',Description:"destination point"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"square",hidden:!1,parent:null,description:"Takes a bounding box and calculates the minimum square bounding box that\nwould contain the input.",snippet:"var bbox = [-20, -20, -15, 0];\nvar squared = turf.square(bbox);\n",example:"var bbox = [-20, -20, -15, 0];\nvar squared = turf.square(bbox);\n\n//addToMap\nvar addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]",hasMap:!0,npmName:"@turf/square",returns:[{type:'BBox',desc:"a square surrounding bbox"}],params:[{Argument:"bbox",Type:'BBox',Description:"extent in west, south, east, north order"}],options:null,throws:[]},{name:"greatCircle",hidden:!1,parent:null,description:'Calculate great circles routes as LineString or MultiLineString.\nIf the start and end points span the antimeridian, the resulting feature will\nbe split into a MultiLineString .',snippet:"var start = turf.point([-122, 48]);\nvar end = turf.point([-77, 39]);\n\nvar greatCircle = turf.greatCircle(start, end, {properties: {name: 'Seattle to DC'}});\n",example:"var start = turf.point([-122, 48]);\nvar end = turf.point([-77, 39]);\n\nvar greatCircle = turf.greatCircle(start, end, {properties: {name: 'Seattle to DC'}});\n\n//addToMap\nvar addToMap = [start, end, greatCircle]",hasMap:!0,npmName:"@turf/great-circle",returns:[{type:'Feature <(LineString|MultiLineString)>',desc:"great circle line feature"}],params:[{Argument:"start",Type:'Coord',Description:"source point feature"},{Argument:"end",Type:'Coord',Description:"destination point feature"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"line feature properties"},{Prop:"npoints",Type:"number",Default:"100",Description:"number of points"},{Prop:"offset",Type:"number",Default:"10",Description:"offset controls the likelyhood that lines will\nbe split which cross the dateline. The higher the number the more likely."}],throws:[]}]},{group:"Coordinate Mutation",modules:[{name:"cleanCoords",hidden:!1,parent:null,description:"Removes redundant coordinates from any GeoJSON Geometry.",snippet:"var line = turf.lineString([[0, 0], [0, 2], [0, 5], [0, 8], [0, 8], [0, 10]]);\nvar multiPoint = turf.multiPoint([[0, 0], [0, 0], [2, 2]]);\n\nturf.cleanCoords(line).geometry.coordinates;\n//= [[0, 0], [0, 10]]\n\nturf.cleanCoords(multiPoint).geometry.coordinates;\n//= [[0, 0], [2, 2]]",example:"var line = turf.lineString([[0, 0], [0, 2], [0, 5], [0, 8], [0, 8], [0, 10]]);\nvar multiPoint = turf.multiPoint([[0, 0], [0, 0], [2, 2]]);\n\nturf.cleanCoords(line).geometry.coordinates;\n//= [[0, 0], [0, 10]]\n\nturf.cleanCoords(multiPoint).geometry.coordinates;\n//= [[0, 0], [2, 2]]",hasMap:!1,npmName:"@turf/clean-coords",returns:[{type:'(Geometry|Feature)',desc:"the cleaned input Feature/Geometry"}],params:[{Argument:"geojson",Type:'(Geometry|Feature)',Description:"Feature or Geometry"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated"}],throws:[]},{name:"flip",hidden:!1,parent:null,description:"Takes input features and flips all of their coordinates from [x, y] to [y, x].",snippet:"var serbia = turf.point([20.566406, 43.421008]);\n\nvar saudiArabia = turf.flip(serbia);\n",example:"var serbia = turf.point([20.566406, 43.421008]);\n\nvar saudiArabia = turf.flip(serbia);\n\n//addToMap\nvar addToMap = [serbia, saudiArabia];",hasMap:!0,npmName:"@turf/flip",returns:[{type:'GeoJSON',desc:"a feature or set of features of the same type as input with flipped coordinates"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input features"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"rewind",hidden:!1,parent:null,description:'Rewind (Multi)LineString or (Multi)Polygon outer ring counterclockwise and inner rings clockwise (Uses Shoelace Formula ).',snippet:"var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);\n\nvar rewind = turf.rewind(polygon);\n",example:"var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);\n\nvar rewind = turf.rewind(polygon);\n\n//addToMap\nvar addToMap = [rewind];",hasMap:!0,npmName:"@turf/rewind",returns:[{type:'GeoJSON',desc:"rewind Polygon"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input GeoJSON Polygon"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"reverse",Type:"boolean",Default:"false",Description:"enable reverse winding"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"round",hidden:!1,parent:"@turf/helpers",description:"Round number to precision",snippet:"turf.round(120.4321)\n//=120\n\nturf.round(120.4321, 2)\n//=120.43",example:"turf.round(120.4321)\n//=120\n\nturf.round(120.4321, 2)\n//=120.43",hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"rounded number"}],params:[{Argument:"num",Type:"number",Description:"Number"},{Argument:"precision",Type:"number",Description:"Precision"}],options:null,throws:[]},{name:"truncate",hidden:!1,parent:null,description:"Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.",snippet:"var point = turf.point([\n 70.46923055566859,\n 58.11088890802906,\n 1508\n]);\nvar options = {precision: 3, coordinates: 2};\nvar truncated = turf.truncate(point, options);\n//=truncated.geometry.coordinates => [70.469, 58.111]\n",example:"var point = turf.point([\n 70.46923055566859,\n 58.11088890802906,\n 1508\n]);\nvar options = {precision: 3, coordinates: 2};\nvar truncated = turf.truncate(point, options);\n//=truncated.geometry.coordinates => [70.469, 58.111]\n\n//addToMap\nvar addToMap = [truncated];",hasMap:!0,npmName:"@turf/truncate",returns:[{type:'GeoJSON',desc:"layer with truncated geometry"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection."},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"precision",Type:"number",Default:"6",Description:"coordinate decimal precision"},{Prop:"coordinates",Type:"number",Default:"3",Description:"maximum number of coordinates (primarly used to remove z coordinates)"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]}]},{group:"Transformation",modules:[{name:"bboxClip",hidden:!1,parent:null,description:'Takes a Feature and a bbox and clips the feature to the bbox using\n lineclip.\nMay result in degenerate edges when clipping Polygons.',snippet:"var bbox = [0, 0, 10, 10];\nvar poly = turf.polygon([[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]);\n\nvar clipped = turf.bboxClip(poly, bbox);\n",example:"var bbox = [0, 0, 10, 10];\nvar poly = turf.polygon([[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]);\n\nvar clipped = turf.bboxClip(poly, bbox);\n\n//addToMap\nvar addToMap = [bbox, poly, clipped]",hasMap:!0,npmName:"@turf/bbox-clip",returns:[{type:'Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>',desc:"clipped Feature"}],params:[{Argument:"feature",Type:'Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>',Description:"feature to clip to the bbox"},{Argument:"bbox",Type:'BBox',Description:"extent in minX, minY, maxX, maxY order"}],options:null,throws:[]},{name:"bezierSpline",hidden:!1,parent:null,description:"Takes a line and returns a curved version\nby applying a Bezier spline \nalgorithm.",snippet:"var line = turf.lineString([\n [-76.091308, 18.427501],\n [-76.695556, 18.729501],\n [-76.552734, 19.40443],\n [-74.61914, 19.134789],\n [-73.652343, 20.07657],\n [-73.157958, 20.210656]\n]);\n\nvar curved = turf.bezierSpline(line);\n",example:"var line = turf.lineString([\n [-76.091308, 18.427501],\n [-76.695556, 18.729501],\n [-76.552734, 19.40443],\n [-74.61914, 19.134789],\n [-73.652343, 20.07657],\n [-73.157958, 20.210656]\n]);\n\nvar curved = turf.bezierSpline(line);\n\n//addToMap\nvar addToMap = [line, curved]\ncurved.properties = { stroke: '#0F0' };",hasMap:!0,npmName:"@turf/bezier-spline",returns:[{type:'Feature <LineString>',desc:"curved line"}],params:[{Argument:"line",Type:'Feature <LineString>',Description:"input LineString"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate properties to output"},{Prop:"resolution",Type:"number",Default:"10000",Description:"time in milliseconds between points"},{Prop:"sharpness",Type:"number",Default:"0.85",Description:"a measure of how curvy the path should be between splines"}],throws:[]},{name:"buffer",hidden:!1,parent:null,description:"Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.",snippet:"var point = turf.point([-90.548630, 14.616599]);\nvar buffered = turf.buffer(point, 500, {units: 'miles'});\n",example:"var point = turf.point([-90.548630, 14.616599]);\nvar buffered = turf.buffer(point, 500, {units: 'miles'});\n\n//addToMap\nvar addToMap = [point, buffered]",hasMap:!0,npmName:"@turf/buffer",returns:[{type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>|undefined)',desc:"buffered features"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Geometry|Feature )',Description:"input to be buffered"},{Argument:"radius",Type:"number",Description:"distance to draw the buffer (negative values are allowed)"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"any of the options supported by turf units"},{Prop:"steps",Type:"number",Default:"8",Description:"number of steps"}],throws:[]},{name:"circle",hidden:!1,parent:null,description:'Takes a Point and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.',snippet:"var center = [-75.343, 39.984];\nvar radius = 5;\nvar options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\nvar circle = turf.circle(center, radius, options);\n",example:"var center = [-75.343, 39.984];\nvar radius = 5;\nvar options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\nvar circle = turf.circle(center, radius, options);\n\n//addToMap\nvar addToMap = [turf.point(center), circle]",hasMap:!0,npmName:"@turf/circle",returns:[{type:'Feature <Polygon>',desc:"circle polygon"}],params:[{Argument:"center",Type:'(Feature <Point>|Array )',Description:"center point"},{Argument:"radius",Type:"number",Description:"radius of the circle"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"},{Prop:"properties",Type:"Object",Default:"{}",Description:"properties"}],throws:[]},{name:"clone",hidden:!1,parent:null,description:"Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.\n~3-5x faster than the common JSON.parse + JSON.stringify combo method.",snippet:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n\nvar lineCloned = turf.clone(line);",example:"var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n\nvar lineCloned = turf.clone(line);",hasMap:!1,npmName:"@turf/clone",returns:[{type:'GeoJSON',desc:"cloned GeoJSON Object"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON Object"}],options:null,throws:[]},{name:"concave",hidden:!1,parent:null,description:'Takes a set of points and returns a concave hull Polygon or MultiPolygon.\nInternally, this uses turf-tin to generate geometries.',snippet:"var points = turf.featureCollection([\n turf.point([-63.601226, 44.642643]),\n turf.point([-63.591442, 44.651436]),\n turf.point([-63.580799, 44.648749]),\n turf.point([-63.573589, 44.641788]),\n turf.point([-63.587665, 44.64533]),\n turf.point([-63.595218, 44.64765])\n]);\nvar options = {units: 'miles', maxEdge: 1};\n\nvar hull = turf.concave(points, options);\n",example:"var points = turf.featureCollection([\n turf.point([-63.601226, 44.642643]),\n turf.point([-63.591442, 44.651436]),\n turf.point([-63.580799, 44.648749]),\n turf.point([-63.573589, 44.641788]),\n turf.point([-63.587665, 44.64533]),\n turf.point([-63.595218, 44.64765])\n]);\nvar options = {units: 'miles', maxEdge: 1};\n\nvar hull = turf.concave(points, options);\n\n//addToMap\nvar addToMap = [points, hull]",hasMap:!0,npmName:"@turf/concave",returns:[{type:'(Feature <(Polygon|MultiPolygon)>|null)',desc:"a concave hull (null value is returned if unable to compute hull)"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"maxEdge",Type:"number",Default:"Infinity",Description:"the length (in 'units') of an edge necessary for part of the\nhull to become concave."},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"convex",hidden:!1,parent:null,description:'Takes a Feature or a FeatureCollection and returns a convex hull Polygon.',snippet:"var points = turf.featureCollection([\n turf.point([10.195312, 43.755225]),\n turf.point([10.404052, 43.8424511]),\n turf.point([10.579833, 43.659924]),\n turf.point([10.360107, 43.516688]),\n turf.point([10.14038, 43.588348]),\n turf.point([10.195312, 43.755225])\n]);\n\nvar hull = turf.convex(points);\n",example:"var points = turf.featureCollection([\n turf.point([10.195312, 43.755225]),\n turf.point([10.404052, 43.8424511]),\n turf.point([10.579833, 43.659924]),\n turf.point([10.360107, 43.516688]),\n turf.point([10.14038, 43.588348]),\n turf.point([10.195312, 43.755225])\n]);\n\nvar hull = turf.convex(points);\n\n//addToMap\nvar addToMap = [points, hull]",hasMap:!0,npmName:"@turf/convex",returns:[{type:'Feature <Polygon>',desc:"a convex hull"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input Feature or FeatureCollection"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"concavity",Type:"number",Default:"Infinity",Description:"1 - thin shape. Infinity - convex hull."},{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate Properties to Feature"}],throws:[]},{name:"difference",hidden:!1,parent:null,description:'Finds the difference between two polygons by clipping the second polygon from the first.',snippet:'var polygon1 = turf.polygon([[\n [128, -26],\n [141, -26],\n [141, -21],\n [128, -21],\n [128, -26]\n]], {\n "fill": "#F00",\n "fill-opacity": 0.1\n});\nvar polygon2 = turf.polygon([[\n [126, -28],\n [140, -28],\n [140, -20],\n [126, -20],\n [126, -28]\n]], {\n "fill": "#00F",\n "fill-opacity": 0.1\n});\n\nvar difference = turf.difference(polygon1, polygon2);\n',example:'var polygon1 = turf.polygon([[\n [128, -26],\n [141, -26],\n [141, -21],\n [128, -21],\n [128, -26]\n]], {\n "fill": "#F00",\n "fill-opacity": 0.1\n});\nvar polygon2 = turf.polygon([[\n [126, -28],\n [140, -28],\n [140, -20],\n [126, -20],\n [126, -28]\n]], {\n "fill": "#00F",\n "fill-opacity": 0.1\n});\n\nvar difference = turf.difference(polygon1, polygon2);\n\n//addToMap\nvar addToMap = [polygon1, polygon2, difference];',hasMap:!0,npmName:"@turf/difference",returns:[{type:'(Feature <(Polygon|MultiPolygon)>|null)',desc:"a Polygon or MultiPolygon feature showing the area of polygon1 excluding the area of polygon2 (if empty returns null )"}],params:[{Argument:"polygon1",Type:'Feature <(Polygon|MultiPolygon)>',Description:"input Polygon feature"},{Argument:"polygon2",Type:'Feature <(Polygon|MultiPolygon)>',Description:"Polygon feature to difference from polygon1"}],options:null,throws:[]},{name:"dissolve",hidden:!1,parent:null,description:'Dissolves a FeatureCollection of polygon features, filtered by an optional property name:value.\nNote that mulitpolygon features within the collection are not supported',snippet:"var features = turf.featureCollection([\n turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {combine: 'yes'}),\n turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {combine: 'yes'}),\n turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {combine: 'no'}),\n]);\n\nvar dissolved = turf.dissolve(features, {propertyName: 'combine'});\n",example:"var features = turf.featureCollection([\n turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {combine: 'yes'}),\n turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {combine: 'yes'}),\n turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {combine: 'no'}),\n]);\n\nvar dissolved = turf.dissolve(features, {propertyName: 'combine'});\n\n//addToMap\nvar addToMap = [features, dissolved]",hasMap:!0,npmName:"@turf/dissolve",returns:[{type:'FeatureCollection <Polygon>',desc:"a FeatureCollection containing the dissolved polygons"}],params:[{Argument:"featureCollection",Type:'FeatureCollection <Polygon>',Description:"input feature collection to be dissolved"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"propertyName",Type:"(string)",Default:null,Description:"features with the same "}],throws:[]},{name:"intersect",hidden:!1,parent:null,description:'Takes two polygon or multi-polygon geometries and\nfinds their polygonal intersection. If they don\'t intersect, returns null.',snippet:"var poly1 = turf.polygon([[\n [-122.801742, 45.48565],\n [-122.801742, 45.60491],\n [-122.584762, 45.60491],\n [-122.584762, 45.48565],\n [-122.801742, 45.48565]\n]]);\n\nvar poly2 = turf.polygon([[\n [-122.520217, 45.535693],\n [-122.64038, 45.553967],\n [-122.720031, 45.526554],\n [-122.669906, 45.507309],\n [-122.723464, 45.446643],\n [-122.532577, 45.408574],\n [-122.487258, 45.477466],\n [-122.520217, 45.535693]\n]]);\n\nvar intersection = turf.intersect(poly1, poly2);\n",example:"var poly1 = turf.polygon([[\n [-122.801742, 45.48565],\n [-122.801742, 45.60491],\n [-122.584762, 45.60491],\n [-122.584762, 45.48565],\n [-122.801742, 45.48565]\n]]);\n\nvar poly2 = turf.polygon([[\n [-122.520217, 45.535693],\n [-122.64038, 45.553967],\n [-122.720031, 45.526554],\n [-122.669906, 45.507309],\n [-122.723464, 45.446643],\n [-122.532577, 45.408574],\n [-122.487258, 45.477466],\n [-122.520217, 45.535693]\n]]);\n\nvar intersection = turf.intersect(poly1, poly2);\n\n//addToMap\nvar addToMap = [poly1, poly2, intersection];",hasMap:!0,npmName:"@turf/intersect",returns:[{type:'(Feature|null)',desc:'returns a feature representing the area they share (either a Polygon or\n MultiPolygon ). If they do not share any area, returns null.'}],params:[{Argument:"poly1",Type:'Feature <(Polygon|MultiPolygon)>',Description:"the first polygon or multipolygon"},{Argument:"poly2",Type:'Feature <(Polygon|MultiPolygon)>',Description:"the second polygon or multipolygon"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate GeoJSON Properties to Feature"}],throws:[]},{name:"lineOffset",hidden:!1,parent:"@turf/line-offset",description:"Takes a line and returns a line at offset by the specified distance.",snippet:'var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { "stroke": "#F00" });\n\nvar offsetLine = turf.lineOffset(line, 2, {units: \'miles\'});\n',example:'var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { "stroke": "#F00" });\n\nvar offsetLine = turf.lineOffset(line, 2, {units: \'miles\'});\n\n//addToMap\nvar addToMap = [offsetLine, line]\noffsetLine.properties.stroke = "#00F"',hasMap:!0,npmName:"@turf/line-offset",returns:[{type:'Feature <(LineString|MultiLineString)>',desc:"Line offset from the input line"}],params:[{Argument:"geojson",Type:'(Geometry|Feature <(LineString|MultiLineString)>)',Description:"input GeoJSON"},{Argument:"distance",Type:"number",Description:"distance to offset the line (can be of negative value)"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, kilometers, inches, yards, meters"}],throws:[]},{name:"polygonSmooth",hidden:!1,parent:null,description:'Smooths a Polygon or MultiPolygon. Based on Chaikin\'s algorithm .\nWarning: may create degenerate polygons.',snippet:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n\nvar smoothed = turf.polygonSmooth(polygon, {iterations: 3})\n",example:"var polygon = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\n\nvar smoothed = turf.polygonSmooth(polygon, {iterations: 3})\n\n//addToMap\nvar addToMap = [smoothed, polygon];",hasMap:!0,npmName:"@turf/polygon-smooth",returns:[{type:'FeatureCollection <Polygon>',desc:"FeatureCollection containing the smoothed polygon/poylgons"}],params:[{Argument:"inputPolys",Type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>)',Description:"(Multi)Polygon(s) to smooth"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"iterations",Type:"string",Default:"1",Description:"THe number of times to smooth the polygon. A higher value means a smoother polygon."}],throws:[]},{name:"simplify",hidden:!1,parent:null,description:'Takes a GeoJSON object and returns a simplified version. Internally uses\n simplify-js to perform simplification using the Ramer-Douglas-Peucker algorithm.',snippet:"var geojson = turf.polygon([[\n [-70.603637, -33.399918],\n [-70.614624, -33.395332],\n [-70.639343, -33.392466],\n [-70.659942, -33.394759],\n [-70.683975, -33.404504],\n [-70.697021, -33.419406],\n [-70.701141, -33.434306],\n [-70.700454, -33.446339],\n [-70.694274, -33.458369],\n [-70.682601, -33.465816],\n [-70.668869, -33.472117],\n [-70.646209, -33.473835],\n [-70.624923, -33.472117],\n [-70.609817, -33.468107],\n [-70.595397, -33.458369],\n [-70.587158, -33.442901],\n [-70.587158, -33.426283],\n [-70.590591, -33.414248],\n [-70.594711, -33.406224],\n [-70.603637, -33.399918]\n]]);\nvar options = {tolerance: 0.01, highQuality: false};\nvar simplified = turf.simplify(geojson, options);\n",example:"var geojson = turf.polygon([[\n [-70.603637, -33.399918],\n [-70.614624, -33.395332],\n [-70.639343, -33.392466],\n [-70.659942, -33.394759],\n [-70.683975, -33.404504],\n [-70.697021, -33.419406],\n [-70.701141, -33.434306],\n [-70.700454, -33.446339],\n [-70.694274, -33.458369],\n [-70.682601, -33.465816],\n [-70.668869, -33.472117],\n [-70.646209, -33.473835],\n [-70.624923, -33.472117],\n [-70.609817, -33.468107],\n [-70.595397, -33.458369],\n [-70.587158, -33.442901],\n [-70.587158, -33.426283],\n [-70.590591, -33.414248],\n [-70.594711, -33.406224],\n [-70.603637, -33.399918]\n]]);\nvar options = {tolerance: 0.01, highQuality: false};\nvar simplified = turf.simplify(geojson, options);\n\n//addToMap\nvar addToMap = [geojson, simplified]",hasMap:!0,npmName:"@turf/simplify",returns:[{type:'GeoJSON',desc:"a simplified GeoJSON"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"object to be simplified"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"tolerance",Type:"number",Default:"1",Description:"simplification tolerance"},{Prop:"highQuality",Type:"boolean",Default:"false",Description:"whether or not to spend more time to create a higher-quality simplification with a different algorithm"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"tesselate",hidden:!1,parent:null,description:"Tesselates a Feature into a FeatureCollection of triangles\nusing earcut.",snippet:"var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar triangles = turf.tesselate(poly);\n",example:"var poly = turf.polygon([[[11, 0], [22, 4], [31, 0], [31, 11], [21, 15], [11, 11], [11, 0]]]);\nvar triangles = turf.tesselate(poly);\n\n//addToMap\nvar addToMap = [poly, triangles]",hasMap:!0,npmName:"@turf/tesselate",returns:[{type:'FeatureCollection <Polygon>',desc:"a geometrycollection feature"}],params:[{Argument:"poly",Type:'Feature <Polygon>',Description:"the polygon to tesselate"}],options:null,throws:[]},{name:"transformRotate",hidden:!1,parent:null,description:"Rotates any geojson Feature or Geometry of a specified angle, around its centroid or a given pivot point.",snippet:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar options = {pivot: [0, 25]};\nvar rotatedPoly = turf.transformRotate(poly, 10, options);\n",example:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar options = {pivot: [0, 25]};\nvar rotatedPoly = turf.transformRotate(poly, 10, options);\n\n//addToMap\nvar addToMap = [poly, rotatedPoly];\nrotatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};",hasMap:!0,npmName:"@turf/transform-rotate",returns:[{type:'GeoJSON',desc:"the rotated GeoJSON feature"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"object to be rotated"},{Argument:"angle",Type:"number",Description:"of rotation in decimal degrees, positive clockwise"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"pivot",Type:'Coord',Default:"'centroid'",Description:"point around which the rotation will be performed"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"transformTranslate",hidden:!1,parent:null,description:"Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\non the provided direction angle.",snippet:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar translatedPoly = turf.transformTranslate(poly, 100, 35);\n",example:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar translatedPoly = turf.transformTranslate(poly, 100, 35);\n\n//addToMap\nvar addToMap = [poly, translatedPoly];\ntranslatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};",hasMap:!0,npmName:"@turf/transform-translate",returns:[{type:'GeoJSON',desc:"the translated GeoJSON object"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"object to be translated"},{Argument:"distance",Type:"number",Description:"length of the motion; negative values determine motion in opposite direction"},{Argument:"direction",Type:"number",Description:"of the motion; angle from North in decimal degrees, positive clockwise"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"in which "},{Prop:"zTranslation",Type:"number",Default:"0",Description:"length of the vertical motion, same unit of distance"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"transformScale",hidden:!1,parent:null,description:"Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).\nIf a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.",snippet:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar scaledPoly = turf.transformScale(poly, 3);\n",example:"var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\nvar scaledPoly = turf.transformScale(poly, 3);\n\n//addToMap\nvar addToMap = [poly, scaledPoly];\nscaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};",hasMap:!0,npmName:"@turf/transform-scale",returns:[{type:'GeoJSON',desc:"scaled GeoJSON"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON to be scaled"},{Argument:"factor",Type:"number",Description:"of scaling, positive or negative values greater than 0"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"origin",Type:'(string|Coord)',Default:"'centroid'",Description:"Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"union",hidden:!1,parent:null,description:'Takes two (Multi)Polygon(s) and returns a combined polygon. If the input polygons are not contiguous, this function returns a MultiPolygon feature.',snippet:'var poly1 = turf.polygon([[\n [-82.574787, 35.594087],\n [-82.574787, 35.615581],\n [-82.545261, 35.615581],\n [-82.545261, 35.594087],\n [-82.574787, 35.594087]\n]], {"fill": "#0f0"});\nvar poly2 = turf.polygon([[\n [-82.560024, 35.585153],\n [-82.560024, 35.602602],\n [-82.52964, 35.602602],\n [-82.52964, 35.585153],\n [-82.560024, 35.585153]\n]], {"fill": "#00f"});\n\nvar union = turf.union(poly1, poly2);\n',example:'var poly1 = turf.polygon([[\n [-82.574787, 35.594087],\n [-82.574787, 35.615581],\n [-82.545261, 35.615581],\n [-82.545261, 35.594087],\n [-82.574787, 35.594087]\n]], {"fill": "#0f0"});\nvar poly2 = turf.polygon([[\n [-82.560024, 35.585153],\n [-82.560024, 35.602602],\n [-82.52964, 35.602602],\n [-82.52964, 35.585153],\n [-82.560024, 35.585153]\n]], {"fill": "#00f"});\n\nvar union = turf.union(poly1, poly2);\n\n//addToMap\nvar addToMap = [poly1, poly2, union];',hasMap:!0,npmName:"@turf/union",returns:[{type:'Feature <(Polygon|MultiPolygon)>',desc:'a combined Polygon or MultiPolygon feature, or null if the inputs are empty'}],params:[{Argument:"polygon1",Type:'Feature <(Polygon|MultiPolygon)>',Description:"input Polygon feature"},{Argument:"polygon2",Type:'Feature <(Polygon|MultiPolygon)>',Description:"Polygon feature to difference from polygon1"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"Translate Properties to output Feature"}],throws:[]},{name:"voronoi",hidden:!1,parent:null,description:"Takes a FeatureCollection of points, and a bounding box, and returns a FeatureCollection\nof Voronoi polygons.",snippet:"var options = {\n bbox: [-70, 40, -60, 60]\n};\nvar points = turf.randomPoint(100, options);\nvar voronoiPolygons = turf.voronoi(points, options);\n",example:"var options = {\n bbox: [-70, 40, -60, 60]\n};\nvar points = turf.randomPoint(100, options);\nvar voronoiPolygons = turf.voronoi(points, options);\n\n//addToMap\nvar addToMap = [voronoiPolygons, points];",hasMap:!0,npmName:"@turf/voronoi",returns:[{type:'FeatureCollection <Polygon>',desc:"a set of polygons, one per input point."}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"to find the Voronoi polygons around."},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-85,180,-85]",Description:"clipping rectangle, in "}],throws:[]}]},{group:"Feature Conversion",modules:[{name:"combine",hidden:!1,parent:null,description:'Combines a FeatureCollection of Point , LineString , or Polygon features\ninto MultiPoint , MultiLineString , or MultiPolygon features.',snippet:"var fc = turf.featureCollection([\n turf.point([19.026432, 47.49134]),\n turf.point([19.074497, 47.509548])\n]);\n\nvar combined = turf.combine(fc);\n",example:"var fc = turf.featureCollection([\n turf.point([19.026432, 47.49134]),\n turf.point([19.074497, 47.509548])\n]);\n\nvar combined = turf.combine(fc);\n\n//addToMap\nvar addToMap = [combined]",hasMap:!0,npmName:"@turf/combine",returns:[{type:'FeatureCollection <(MultiPoint|MultiLineString|MultiPolygon)>',desc:"a FeatureCollection of corresponding type to input"}],params:[{Argument:"fc",Type:'FeatureCollection <(Point|LineString|Polygon)>',Description:"a FeatureCollection of any type"}],options:null,throws:[]},{name:"explode",hidden:!1,parent:null,description:'Takes a feature or set of features and returns all positions as points.',snippet:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar explode = turf.explode(polygon);\n",example:"var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n\nvar explode = turf.explode(polygon);\n\n//addToMap\nvar addToMap = [polygon, explode]",hasMap:!0,npmName:"@turf/explode",returns:[{type:'FeatureCollection <point>',desc:"points representing the exploded input features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"input features"}],options:null,throws:[{type:"Error",desc:"if it encounters an unknown geometry type"}]},{name:"flatten",hidden:!1,parent:null,description:'Flattens any GeoJSON to a FeatureCollection inspired by geojson-flatten.',snippet:"var multiGeometry = turf.multiPolygon([\n [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],\n [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]\n]);\n\nvar flatten = turf.flatten(multiGeometry);\n",example:"var multiGeometry = turf.multiPolygon([\n [[[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]]],\n [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],\n [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]]]\n]);\n\nvar flatten = turf.flatten(multiGeometry);\n\n//addToMap\nvar addToMap = [flatten]",hasMap:!0,npmName:"@turf/flatten",returns:[{type:'FeatureCollection ',desc:"all Multi-Geometries are flattened into single Features"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"any valid GeoJSON Object"}],options:null,throws:[]},{name:"lineToPolygon",hidden:!1,parent:null,description:"Converts (Multi)LineString(s) to Polygon(s).",snippet:"var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n\nvar polygon = turf.lineToPolygon(line);\n",example:"var line = turf.lineString([[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]);\n\nvar polygon = turf.lineToPolygon(line);\n\n//addToMap\nvar addToMap = [polygon];",hasMap:!0,npmName:"@turf/line-to-polygon",returns:[{type:'Feature <(Polygon|MultiPolygon)>',desc:"converted to Polygons"}],params:[{Argument:"lines",Type:'(FeatureCollection|Feature <(LineString|MultiLineString)>)',Description:"Features to convert"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"translates GeoJSON properties to Feature"},{Prop:"autoComplete",Type:"boolean",Default:"true",Description:"auto complete linestrings (matches first & last coordinates)"},{Prop:"orderCoords",Type:"boolean",Default:"true",Description:"sorts linestrings to place outer ring at the first position of the coordinates"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"mutate the original linestring using autoComplete (matches first & last coordinates)"}],throws:[]},{name:"polygonize",hidden:!1,parent:null,description:'Polygonizes (Multi)LineString(s) into Polygons.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/polygonize",returns:[{type:'FeatureCollection <Polygon>',desc:"Polygons created"}],params:[{Argument:"geoJson",Type:'(FeatureCollection|Geometry|Feature <(LineString|MultiLineString)>)',Description:"Lines in order to polygonize"}],options:null,throws:[{type:"Error",desc:"if geoJson is invalid."}]},{name:"polygonToLine",hidden:!1,parent:null,description:'Converts a Polygon to (Multi)LineString or MultiPolygon to a\n FeatureCollection of (Multi)LineString.',snippet:"var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);\n\nvar line = turf.polygonToLine(poly);\n",example:"var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);\n\nvar line = turf.polygonToLine(poly);\n\n//addToMap\nvar addToMap = [line];",hasMap:!0,npmName:"@turf/polygon-to-line",returns:[{type:'(FeatureCollection|Feature <(LineString|MultiLinestring)>)',desc:"converted (Multi)Polygon to (Multi)LineString"}],params:[{Argument:"poly",Type:'Feature <(Polygon|MultiPolygon)>',Description:"Feature to convert"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"properties",Type:"Object",Default:"{}",Description:"translates GeoJSON properties to Feature"}],throws:[]}]},{group:"Misc",modules:[{name:"ellipse",hidden:!1,parent:null,description:'Takes a Point and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision.',snippet:"var center = [-75, 40];\nvar xSemiAxis = 5;\nvar ySemiAxis = 2;\nvar ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);\n",example:"var center = [-75, 40];\nvar xSemiAxis = 5;\nvar ySemiAxis = 2;\nvar ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);\n\n//addToMap\nvar addToMap = [turf.point(center), ellipse]",hasMap:!0,npmName:"@turf/ellipse",returns:[{type:'Feature <Polygon>',desc:"ellipse polygon"}],params:[{Argument:"center",Type:'Coord',Description:"center point"},{Argument:"xSemiAxis",Type:"number",Description:"semi (major) axis of the ellipse along the x-axis"},{Argument:"ySemiAxis",Type:"number",Description:"semi (minor) axis of the ellipse along the y-axis"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"angle",Type:"number",Default:"0",Description:"angle of rotation in decimal degrees, positive clockwise"},{Prop:"pivot",Type:'Coord',Default:"'origin'",Description:"point around which the rotation will be performed"},{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"unit of measurement for axes"},{Prop:"properties",Type:"Object",Default:"{}",Description:"properties"}],throws:[]},{name:"kinks",hidden:!1,parent:null,description:'Takes a linestring , multi-linestring ,\n multi-polygon or polygon and\nreturns points at all self-intersections.',snippet:"var poly = turf.polygon([[\n [-12.034835, 8.901183],\n [-12.060413, 8.899826],\n [-12.03638, 8.873199],\n [-12.059383, 8.871418],\n [-12.034835, 8.901183]\n]]);\n\nvar kinks = turf.kinks(poly);\n",example:"var poly = turf.polygon([[\n [-12.034835, 8.901183],\n [-12.060413, 8.899826],\n [-12.03638, 8.873199],\n [-12.059383, 8.871418],\n [-12.034835, 8.901183]\n]]);\n\nvar kinks = turf.kinks(poly);\n\n//addToMap\nvar addToMap = [poly, kinks]",hasMap:!0,npmName:"@turf/kinks",returns:[{type:'FeatureCollection <Point>',desc:"self-intersections"}],params:[{Argument:"featureIn",Type:'Feature <(LineString|MultiLineString|MultiPolygon|Polygon)>',Description:"input feature"}],options:null,throws:[]},{name:"lineArc",hidden:!1,parent:null,description:"Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2;\n0 bearing is North of center point, positive clockwise.",snippet:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 47;\n\nvar arc = turf.lineArc(center, radius, bearing1, bearing2);\n",example:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 47;\n\nvar arc = turf.lineArc(center, radius, bearing1, bearing2);\n\n//addToMap\nvar addToMap = [center, arc]",hasMap:!0,npmName:"@turf/line-arc",returns:[{type:'Feature <LineString>',desc:"line arc"}],params:[{Argument:"center",Type:'Coord',Description:"center point"},{Argument:"radius",Type:"number",Description:"radius of the circle"},{Argument:"bearing1",Type:"number",Description:"angle, in decimal degrees, of the first radius of the arc"},{Argument:"bearing2",Type:"number",Description:"angle, in decimal degrees, of the second radius of the arc"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"}],throws:[]},{name:"lineChunk",hidden:!1,parent:null,description:'Divides a LineString into chunks of a specified length.\nIf the line is shorter than the segment length then the original line is returned.',snippet:"var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n\nvar chunk = turf.lineChunk(line, 15, {units: 'miles'});\n",example:"var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n\nvar chunk = turf.lineChunk(line, 15, {units: 'miles'});\n\n//addToMap\nvar addToMap = [chunk];",hasMap:!0,npmName:"@turf/line-chunk",returns:[{type:'FeatureCollection <LineString>',desc:"collection of line segments"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Geometry|Feature <(LineString|MultiLineString)>)',Description:"the lines to split"},{Argument:"segmentLength",Type:"number",Description:"how long to make each segment"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"units can be degrees, radians, miles, or kilometers"},{Prop:"reverse",Type:"boolean",Default:"false",Description:"reverses coordinates to start the first chunked segment at the end"}],throws:[]},{name:"lineIntersect",hidden:!1,parent:null,description:"Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).",snippet:"var line1 = turf.lineString([[126, -11], [129, -21]]);\nvar line2 = turf.lineString([[123, -18], [131, -14]]);\nvar intersects = turf.lineIntersect(line1, line2);\n",example:"var line1 = turf.lineString([[126, -11], [129, -21]]);\nvar line2 = turf.lineString([[123, -18], [131, -14]]);\nvar intersects = turf.lineIntersect(line1, line2);\n\n//addToMap\nvar addToMap = [line1, line2, intersects]",hasMap:!0,npmName:"@turf/line-intersect",returns:[{type:'FeatureCollection <Point>',desc:"point(s) that intersect both"}],params:[{Argument:"line1",Type:'GeoJSON',Description:"any LineString or Polygon"},{Argument:"line2",Type:'GeoJSON',Description:"any LineString or Polygon"}],options:null,throws:[]},{name:"lineOverlap",hidden:!1,parent:null,description:"Takes any LineString or Polygon and returns the overlapping lines between both features.",snippet:"var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\nvar line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n\nvar overlapping = turf.lineOverlap(line1, line2);\n",example:"var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\nvar line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n\nvar overlapping = turf.lineOverlap(line1, line2);\n\n//addToMap\nvar addToMap = [line1, line2, overlapping]",hasMap:!0,npmName:"@turf/line-overlap",returns:[{type:'FeatureCollection <LineString>',desc:"lines(s) that are overlapping between both features"}],params:[{Argument:"line1",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"any LineString or Polygon"},{Argument:"line2",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"any LineString or Polygon"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"tolerance",Type:"number",Default:"0",Description:"Tolerance distance to match overlapping line segments (in kilometers)"}],throws:[]},{name:"lineSegment",hidden:!1,parent:null,description:'Creates a FeatureCollection of 2-vertex LineString segments from a\n (Multi)LineString or (Multi)Polygon.',snippet:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\nvar segments = turf.lineSegment(polygon);\n",example:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\nvar segments = turf.lineSegment(polygon);\n\n//addToMap\nvar addToMap = [polygon, segments]",hasMap:!0,npmName:"@turf/line-segment",returns:[{type:'FeatureCollection <LineString>',desc:"2-vertex line segments"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON Polygon or LineString"}],options:null,throws:[]},{name:"lineSlice",hidden:!1,parent:null,description:'Takes a line , a start Point , and a stop point\nand returns a subsection of the line in-between those points.\nThe start & stop points don\'t need to fall exactly on the line.',snippet:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar start = turf.point([-77.029609, 38.881946]);\nvar stop = turf.point([-77.021884, 38.889563]);\n\nvar sliced = turf.lineSlice(start, stop, line);\n",example:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar start = turf.point([-77.029609, 38.881946]);\nvar stop = turf.point([-77.021884, 38.889563]);\n\nvar sliced = turf.lineSlice(start, stop, line);\n\n//addToMap\nvar addToMap = [start, stop, line]",hasMap:!0,npmName:"@turf/line-slice",returns:[{type:'Feature <LineString>',desc:"sliced line"}],params:[{Argument:"startPt",Type:'Coord',Description:"starting point"},{Argument:"stopPt",Type:'Coord',Description:"stopping point"},{Argument:"line",Type:'(Feature <LineString>|LineString)',Description:"line to slice"}],options:null,throws:[]},{name:"lineSliceAlong",hidden:!1,parent:null,description:'Takes a line , a specified distance along the line to a start Point ,\nand a specified distance along the line to a stop point\nand returns a subsection of the line in-between those points.',snippet:"var line = turf.lineString([[7, 45], [9, 45], [14, 40], [14, 41]]);\nvar start = 12.5;\nvar stop = 25;\nvar sliced = turf.lineSliceAlong(line, start, stop, {units: 'miles'});\n",example:"var line = turf.lineString([[7, 45], [9, 45], [14, 40], [14, 41]]);\nvar start = 12.5;\nvar stop = 25;\nvar sliced = turf.lineSliceAlong(line, start, stop, {units: 'miles'});\n\n//addToMap\nvar addToMap = [line, start, stop, sliced]",hasMap:!0,npmName:"@turf/line-slice-along",returns:[{type:'Feature <LineString>',desc:"sliced line"}],params:[{Argument:"line",Type:'(Feature <LineString>|LineString)',Description:"input line"},{Argument:"startDist",Type:"number",Description:"distance along the line to starting point"},{Argument:"stopDist",Type:"number",Description:"distance along the line to ending point"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"lineSplit",hidden:!1,parent:null,description:"Split a LineString by another GeoJSON Feature.",snippet:"var line = turf.lineString([[120, -25], [145, -25]]);\nvar splitter = turf.lineString([[130, -15], [130, -35]]);\n\nvar split = turf.lineSplit(line, splitter);\n",example:"var line = turf.lineString([[120, -25], [145, -25]]);\nvar splitter = turf.lineString([[130, -15], [130, -35]]);\n\nvar split = turf.lineSplit(line, splitter);\n\n//addToMap\nvar addToMap = [line, splitter]",hasMap:!0,npmName:"@turf/line-split",returns:[{type:'FeatureCollection <LineString>',desc:"Split LineStrings"}],params:[{Argument:"line",Type:'Feature <LineString>',Description:"LineString Feature to split"},{Argument:"splitter",Type:'Feature ',Description:"Feature used to split line"}],options:null,throws:[]},{name:"mask",hidden:!1,parent:null,description:'Takes any type of polygon and an optional mask and returns a polygon exterior ring with holes.',snippet:"var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\nvar mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n\nvar masked = turf.mask(polygon, mask);\n",example:"var polygon = turf.polygon([[[112, -21], [116, -36], [146, -39], [153, -24], [133, -10], [112, -21]]]);\nvar mask = turf.polygon([[[90, -55], [170, -55], [170, 10], [90, 10], [90, -55]]]);\n\nvar masked = turf.mask(polygon, mask);\n\n//addToMap\nvar addToMap = [masked]",hasMap:!0,npmName:"@turf/mask",returns:[{type:'Feature <Polygon>',desc:"Masked Polygon (exterior ring with holes)."}],params:[{Argument:"polygon",Type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>)',Description:"GeoJSON Polygon used as interior rings or holes."},{Argument:"mask",Type:'(Feature <Polygon>)',Description:"GeoJSON Polygon used as the exterior ring (if undefined, the world extent is used)"}],options:null,throws:[]},{name:"nearestPointOnLine",hidden:!1,parent:null,description:'Takes a Point and a LineString and calculates the closest Point on the (Multi)LineString.',snippet:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar pt = turf.point([-77.037076, 38.884017]);\n\nvar snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n",example:"var line = turf.lineString([\n [-77.031669, 38.878605],\n [-77.029609, 38.881946],\n [-77.020339, 38.884084],\n [-77.025661, 38.885821],\n [-77.021884, 38.889563],\n [-77.019824, 38.892368]\n]);\nvar pt = turf.point([-77.037076, 38.884017]);\n\nvar snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n\n//addToMap\nvar addToMap = [line, pt, snapped];\nsnapped.properties['marker-color'] = '#00f';",hasMap:!0,npmName:"@turf/nearest-point-on-line",returns:[{type:'Feature <Point>',desc:"closest point on the line to point. The properties object will contain three values: index : closest point was found on nth line part, dist : distance between pt and the closest point, location : distance along the line between start and the closest point."}],params:[{Argument:"lines",Type:'(Geometry|Feature <(LineString|MultiLineString)>)',Description:"lines to snap to"},{Argument:"pt",Type:'(Geometry|Feature <Point>|Array )',Description:"point to snap from"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"can be degrees, radians, miles, or kilometers"}],throws:[]},{name:"sector",hidden:!1,parent:null,description:'Creates a circular sector of a circle of given radius and center Point ,\nbetween (clockwise) bearing1 and bearing2; 0 bearing is North of center point, positive clockwise.',snippet:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 45;\n\nvar sector = turf.sector(center, radius, bearing1, bearing2);\n",example:"var center = turf.point([-75, 40]);\nvar radius = 5;\nvar bearing1 = 25;\nvar bearing2 = 45;\n\nvar sector = turf.sector(center, radius, bearing1, bearing2);\n\n//addToMap\nvar addToMap = [center, sector];",hasMap:!0,npmName:"@turf/sector",returns:[{type:'Feature <Polygon>',desc:"sector polygon"}],params:[{Argument:"center",Type:'Coord',Description:"center point"},{Argument:"radius",Type:"number",Description:"radius of the circle"},{Argument:"bearing1",Type:"number",Description:"angle, in decimal degrees, of the first radius of the sector"},{Argument:"bearing2",Type:"number",Description:"angle, in decimal degrees, of the second radius of the sector"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"miles, kilometers, degrees, or radians"},{Prop:"steps",Type:"number",Default:"64",Description:"number of steps"},{Prop:"properties",Type:"Properties",Default:"{}",Description:"Translate properties to Feature Polygon"}],throws:[]},{name:"shortestPath",hidden:!1,parent:null,description:'Returns the shortest path from start to end without colliding with\nany Feature in obstacles',snippet:"var start = [-5, -6];\nvar end = [9, -6];\nvar options = {\n obstacles: turf.polygon([[[0, -7], [5, -7], [5, -3], [0, -3], [0, -7]]])\n};\n\nvar path = turf.shortestPath(start, end, options);\n",example:"var start = [-5, -6];\nvar end = [9, -6];\nvar options = {\n obstacles: turf.polygon([[[0, -7], [5, -7], [5, -3], [0, -3], [0, -7]]])\n};\n\nvar path = turf.shortestPath(start, end, options);\n\n//addToMap\nvar addToMap = [start, end, options.obstacles, path];",hasMap:!0,npmName:"@turf/shortest-path",returns:[{type:'Feature <LineString>',desc:"shortest path between start and end"}],params:[{Argument:"start",Type:'Coord',Description:"point"},{Argument:"end",Type:'Coord',Description:"point"},{Argument:"options",Type:"Object",Description:"optional parameters"}],options:[{Prop:"obstacles",Type:'((Geometry|Feature|FeatureCollection <Polygon>))',Default:null,Description:"areas which path cannot travel"},{Prop:"minDistance",Type:"(number)",Default:null,Description:"minimum distance between shortest path and obstacles"},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"unit in which resolution & minimum distance will be expressed in; it can be degrees, radians, miles, kilometers, ..."},{Prop:"resolution",Type:"number",Default:"100",Description:"distance between matrix points on which the path will be calculated"}],throws:[]},{name:"unkinkPolygon",hidden:!1,parent:"@turf/unkink-polygon",description:"Takes a kinked polygon and returns a feature collection of polygons that have no kinks.\nUses simplepolygon internally.",snippet:"var poly = turf.polygon([[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]);\n\nvar result = turf.unkinkPolygon(poly);\n",example:"var poly = turf.polygon([[[0, 0], [2, 0], [0, 2], [2, 2], [0, 0]]]);\n\nvar result = turf.unkinkPolygon(poly);\n\n//addToMap\nvar addToMap = [poly, result]",hasMap:!0,npmName:"@turf/unkink-polygon",returns:[{type:'FeatureCollection <Polygon>',desc:"Unkinked polygons"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature <(Polygon|MultiPolygon)>)',Description:"GeoJSON Polygon or MultiPolygon"}],options:null,throws:[]}]},{group:"Helper",modules:[{name:"featureCollection",hidden:!1,parent:"@turf/helpers",description:'Takes one or more Features and creates a FeatureCollection.',snippet:"var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\nvar locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\nvar locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n\nvar collection = turf.featureCollection([\n locationA,\n locationB,\n locationC\n]);\n\n//=collection",example:"var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\nvar locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\nvar locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n\nvar collection = turf.featureCollection([\n locationA,\n locationB,\n locationC\n]);\n\n//=collection",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'FeatureCollection',desc:"FeatureCollection of Features"}],params:[{Argument:"features",Type:'Array <Feature>',Description:"input features"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"feature",hidden:!1,parent:"@turf/helpers",description:'Wraps a GeoJSON Geometry in a GeoJSON Feature.',snippet:'var geometry = {\n "type": "Point",\n "coordinates": [110, 50]\n};\n\nvar feature = turf.feature(geometry);\n\n//=feature',example:'var geometry = {\n "type": "Point",\n "coordinates": [110, 50]\n};\n\nvar feature = turf.feature(geometry);\n\n//=feature',hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature',desc:"a GeoJSON Feature"}],params:[{Argument:"geometry",Type:'Geometry',Description:"input geometry"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"geometryCollection",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:'var pt = turf.geometry("Point", [100, 0]);\nvar line = turf.geometry("LineString", [[101, 0], [102, 1]]);\nvar collection = turf.geometryCollection([pt, line]);\n\n// => collection',example:'var pt = turf.geometry("Point", [100, 0]);\nvar line = turf.geometry("LineString", [[101, 0], [102, 1]]);\nvar collection = turf.geometryCollection([pt, line]);\n\n// => collection',hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <GeometryCollection>',desc:"a GeoJSON GeometryCollection Feature"}],params:[{Argument:"geometries",Type:'Array <Geometry>',Description:"an array of GeoJSON Geometries"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"lineString",hidden:!1,parent:"@turf/helpers",description:'Creates a LineString Feature from an Array of Positions.',snippet:"var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\nvar linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n\n//=linestring1\n//=linestring2",example:"var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\nvar linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n\n//=linestring1\n//=linestring2",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <LineString>',desc:"LineString Feature"}],params:[{Argument:"coordinates",Type:"Array >",Description:"an array of Positions"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"multiLineString",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:"var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n\n//=multiLine",example:"var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n\n//=multiLine",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <MultiLineString>',desc:"a MultiLineString feature"}],params:[{Argument:"coordinates",Type:"Array >>",Description:"an array of LineStrings"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[{type:"Error",desc:"if no coordinates are passed"}]},{name:"multiPoint",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:"var multiPt = turf.multiPoint([[0,0],[10,10]]);\n\n//=multiPt",example:"var multiPt = turf.multiPoint([[0,0],[10,10]]);\n\n//=multiPt",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <MultiPoint>',desc:"a MultiPoint feature"}],params:[{Argument:"coordinates",Type:"Array >",Description:"an array of Positions"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[{type:"Error",desc:"if no coordinates are passed"}]},{name:"multiPolygon",hidden:!1,parent:"@turf/helpers",description:"Creates a Feature based on a\ncoordinate array. Properties can be added optionally.",snippet:"var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n\n//=multiPoly",example:"var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n\n//=multiPoly",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <MultiPolygon>',desc:"a multipolygon feature"}],params:[{Argument:"coordinates",Type:"Array >>>",Description:"an array of Polygons"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[{type:"Error",desc:"if no coordinates are passed"}]},{name:"point",hidden:!1,parent:"@turf/helpers",description:'Creates a Point Feature from a Position.',snippet:"var point = turf.point([-75.343, 39.984]);\n\n//=point",example:"var point = turf.point([-75.343, 39.984]);\n\n//=point",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <Point>',desc:"a Point feature"}],params:[{Argument:"coordinates",Type:"Array ",Description:"longitude, latitude position (each in decimal degrees)"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]},{name:"polygon",hidden:!1,parent:"@turf/helpers",description:'Creates a Polygon Feature from an Array of LinearRings.',snippet:"var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n\n//=polygon",example:"var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n\n//=polygon",hasMap:!1,npmName:"@turf/helpers",returns:[{type:'Feature <Polygon>',desc:"Polygon Feature"}],params:[{Argument:"coordinates",Type:"Array >>",Description:"an array of LinearRings"},{Argument:"properties",Type:"Object",Description:"an Object of key-value pairs to add as properties"},{Argument:"options",Type:"Object",Description:"Optional Parameters"}],options:[{Prop:"bbox",Type:"(Array )",Default:null,Description:"Bounding Box Array "},{Prop:"id",Type:"((string|number))",Default:null,Description:"Identifier associated with the Feature"}],throws:[]}]},{group:"Random",modules:[{name:"randomPosition",hidden:!1,parent:"@turf/random",description:"Returns a random position within a box.",snippet:"var position = turf.randomPosition([-180, -90, 180, 90])\n// => position",example:"var position = turf.randomPosition([-180, -90, 180, 90])\n// => position",hasMap:!1,npmName:"@turf/random",returns:[{type:"Array ",desc:"Position longitude, latitude"}],params:[{Argument:"bbox",Type:"Array ",Description:"a bounding box inside of which positions are placed."}],options:null,throws:[]},{name:"randomPoint",hidden:!1,parent:"@turf/random",description:'Returns a random point.',snippet:"var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n// => points",example:"var points = turf.randomPoint(25, {bbox: [-180, -90, 180, 90]})\n// => points",hasMap:!1,npmName:"@turf/random",returns:[{type:'FeatureCollection <Point>',desc:"GeoJSON FeatureCollection of points"}],params:[{Argument:"count",Type:"number",Description:"how many geometries will be generated"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-90,180,90]",Description:"a bounding box inside of which geometries are placed."}],throws:[]},{name:"randomLineString",hidden:!1,parent:"@turf/random",description:'Returns a random linestring.',snippet:"var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n// => lineStrings",example:"var lineStrings = turf.randomLineString(25, {bbox: [-180, -90, 180, 90]})\n// => lineStrings",hasMap:!1,npmName:"@turf/random",returns:[{type:'FeatureCollection <LineString>',desc:"GeoJSON FeatureCollection of linestrings"}],params:[{Argument:"count",Type:"number",Description:"how many geometries will be generated"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-90,180,90]",Description:"a bounding box inside of which geometries are placed."},{Prop:"num_vertices",Type:"number",Default:"10",Description:"is how many coordinates each LineString will contain."},{Prop:"max_length",Type:"number",Default:"0.0001",Description:"is the maximum number of decimal degrees that a\nvertex can be from its predecessor"},{Prop:"max_rotation",Type:"number",Default:"Math.PI/8",Description:"is the maximum number of radians that a\nline segment can turn from the previous segment."}],throws:[]},{name:"randomPolygon",hidden:!1,parent:"@turf/random",description:'Returns a random polygon.',snippet:"var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n// => polygons",example:"var polygons = turf.randomPolygon(25, {bbox: [-180, -90, 180, 90]})\n// => polygons",hasMap:!1,npmName:"@turf/random",returns:[{type:'FeatureCollection <Polygon>',desc:"GeoJSON FeatureCollection of polygons"}],params:[{Argument:"count",Type:"number",Description:"how many geometries will be generated"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"bbox",Type:"Array ",Default:"[-180,-90,180,90]",Description:"a bounding box inside of which geometries are placed."},{Prop:"num_vertices",Type:"number",Default:"10",Description:"is how many coordinates each LineString will contain."},{Prop:"max_radial_length",Type:"number",Default:"10",Description:"is the maximum number of decimal degrees latitude or longitude that a\nvertex can reach out of the center of the Polygon."}],throws:[]}]},{group:"Data",modules:[{name:"sample",hidden:!1,parent:null,description:'Takes a FeatureCollection and returns a FeatureCollection with given number of features at random.',snippet:"var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});\n\nvar sample = turf.sample(points, 5);\n",example:"var points = turf.randomPoint(100, {bbox: [-80, 30, -60, 60]});\n\nvar sample = turf.sample(points, 5);\n\n//addToMap\nvar addToMap = [points, sample]\nturf.featureEach(sample, function (currentFeature) {\n currentFeature.properties['marker-size'] = 'large';\n currentFeature.properties['marker-color'] = '#000';\n});",hasMap:!0,npmName:"@turf/sample",returns:[{type:'FeatureCollection',desc:"a FeatureCollection with n features"}],params:[{Argument:"featurecollection",Type:'FeatureCollection',Description:"set of input features"},{Argument:"num",Type:"number",Description:"number of features to select"}],options:null,throws:[]}]},{group:"Interpolation",modules:[{name:"interpolate",hidden:!1,parent:null,description:"Takes a set of points and estimates their 'property' values on a grid using the Inverse Distance Weighting (IDW) method.",snippet:"var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point\nturf.featureEach(points, function(point) {\n point.properties.solRad = Math.random() * 50;\n});\nvar options = {gridType: 'points', property: 'solRad', units: 'miles'};\nvar grid = turf.interpolate(points, 100, options);\n",example:"var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point\nturf.featureEach(points, function(point) {\n point.properties.solRad = Math.random() * 50;\n});\nvar options = {gridType: 'points', property: 'solRad', units: 'miles'};\nvar grid = turf.interpolate(points, 100, options);\n\n//addToMap\nvar addToMap = [grid];",hasMap:!0,npmName:"@turf/interpolate",returns:[{type:'FeatureCollection <(Point|Polygon)>',desc:"grid of points or polygons with interpolated 'property'"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"with known value"},{Argument:"cellSize",Type:"number",Description:"the distance across each grid point"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"gridType",Type:"string",Default:"'square'",Description:"defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle')"},{Prop:"property",Type:"string",Default:"'elevation'",Description:"the property name in "},{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSize, can be degrees, radians, miles, or kilometers"},{Prop:"weight",Type:"number",Default:"1",Description:"exponent regulating the distance-decay weighting"}],throws:[]},{name:"isobands",hidden:!1,parent:"@turf/isobands",description:'Takes a square or rectangular grid FeatureCollection of Point features with z-values and an array of\nvalue breaks and generates filled contour isobands.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/isobands",returns:[{type:'FeatureCollection <MultiPolygon>',desc:'a FeatureCollection of MultiPolygon features representing isobands'}],params:[{Argument:"pointGrid",Type:'FeatureCollection <Point>',Description:"input points - must be square or rectangular"},{Argument:"breaks",Type:"Array ",Description:"where to draw contours"},{Argument:"options",Type:"Object",Description:"options on output"}],options:[{Prop:"zProperty",Type:"string",Default:"'elevation'",Description:"the property name in "},{Prop:"commonProperties",Type:"Object",Default:"{}",Description:"GeoJSON properties passed to ALL isobands"},{Prop:"breaksProperties",Type:"Array ",Default:"[]",Description:"GeoJSON properties passed, in order, to the correspondent isoband (order defined by breaks)"}],throws:[]},{name:"isolines",hidden:!1,parent:"@turf/isolines",description:'Takes a grid FeatureCollection of Point features with z-values and an array of\nvalue breaks and generates isolines.',snippet:"// create a grid of points with random z-values in their properties\nvar extent = [0, 30, 20, 50];\nvar cellWidth = 100;\nvar pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});\n\nfor (var i = 0; i < pointGrid.features.length; i++) {\n pointGrid.features[i].properties.temperature = Math.random() * 10;\n}\nvar breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\nvar lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});\n",example:"// create a grid of points with random z-values in their properties\nvar extent = [0, 30, 20, 50];\nvar cellWidth = 100;\nvar pointGrid = turf.pointGrid(extent, cellWidth, {units: 'miles'});\n\nfor (var i = 0; i < pointGrid.features.length; i++) {\n pointGrid.features[i].properties.temperature = Math.random() * 10;\n}\nvar breaks = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n\nvar lines = turf.isolines(pointGrid, breaks, {zProperty: 'temperature'});\n\n//addToMap\nvar addToMap = [lines];",hasMap:!0,npmName:"@turf/isolines",returns:[{type:'FeatureCollection <MultiLineString>',desc:'a FeatureCollection of MultiLineString features representing isolines'}],params:[{Argument:"pointGrid",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"breaks",Type:"Array ",Description:"values of zProperty where to draw isolines"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"zProperty",Type:"string",Default:"'elevation'",Description:"the property name in "},{Prop:"commonProperties",Type:"Object",Default:"{}",Description:"GeoJSON properties passed to ALL isolines"},{Prop:"breaksProperties",Type:"Array ",Default:"[]",Description:"GeoJSON properties passed, in order, to the correspondent isoline;\nthe breaks array will define the order in which the isolines are created"}],throws:[]},{name:"planepoint",hidden:!1,parent:null,description:'Takes a triangular plane as a Polygon \nand a Point within that triangle and returns the z-value\nat that point. The Polygon should have properties a , b , and c \nthat define the values at its three corners. Alternatively, the z-values\nof each triangle point can be provided by their respective 3rd coordinate\nif their values are not provided as properties.',snippet:'var point = turf.point([-75.3221, 39.529]);\n// "a", "b", and "c" values represent the values of the coordinates in order.\nvar triangle = turf.polygon([[\n [-75.1221, 39.57],\n [-75.58, 39.18],\n [-75.97, 39.86],\n [-75.1221, 39.57]\n]], {\n "a": 11,\n "b": 122,\n "c": 44\n});\n\nvar zValue = turf.planepoint(point, triangle);\npoint.properties.zValue = zValue;\n',example:'var point = turf.point([-75.3221, 39.529]);\n// "a", "b", and "c" values represent the values of the coordinates in order.\nvar triangle = turf.polygon([[\n [-75.1221, 39.57],\n [-75.58, 39.18],\n [-75.97, 39.86],\n [-75.1221, 39.57]\n]], {\n "a": 11,\n "b": 122,\n "c": 44\n});\n\nvar zValue = turf.planepoint(point, triangle);\npoint.properties.zValue = zValue;\n\n//addToMap\nvar addToMap = [triangle, point];',hasMap:!0,npmName:"@turf/planepoint",returns:[{type:"number",desc:"the z-value for interpolatedPoint"}],params:[{Argument:"point",Type:'Coord',Description:"the Point for which a z-value will be calculated"},{Argument:"triangle",Type:'Feature <Polygon>',Description:"a Polygon feature with three vertices"}],options:null,throws:[]},{name:"tin",hidden:!1,parent:"@turf/tin",description:'Takes a set of points and creates a\n Triangulated Irregular Network ,\nor a TIN for short, returned as a collection of Polygons. These are often used\nfor developing elevation contour maps or stepped heat visualizations.',snippet:"// generate some random point data\nvar points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point between 0 and 9\nfor (var i = 0; i < points.features.length; i++) {\n points.features[i].properties.z = ~~(Math.random() * 9);\n}\nvar tin = turf.tin(points, 'z');\n",example:"// generate some random point data\nvar points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});\n\n// add a random property to each point between 0 and 9\nfor (var i = 0; i < points.features.length; i++) {\n points.features[i].properties.z = ~~(Math.random() * 9);\n}\nvar tin = turf.tin(points, 'z');\n\n//addToMap\nvar addToMap = [tin, points]\nfor (var i = 0; i < tin.features.length; i++) {\n var properties = tin.features[i].properties;\n properties.fill = '#' + properties.a + properties.b + properties.c;\n}",hasMap:!0,npmName:"@turf/tin",returns:[{type:'FeatureCollection <Polygon>',desc:"TIN output"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"z",Type:"(String)",Description:"name of the property from which to pull z values\nThis is optional: if not given, then there will be no extra data added to the derived triangles."}],options:null,throws:[]}]},{group:"Joins",modules:[{name:"pointsWithinPolygon",hidden:!1,parent:null,description:'Finds Points or MultiPoint coordinate positions that fall within (Multi)Polygon(s).',snippet:"var points = turf.points([\n [-46.6318, -23.5523],\n [-46.6246, -23.5325],\n [-46.6062, -23.5513],\n [-46.663, -23.554],\n [-46.643, -23.557]\n]);\n\nvar searchWithin = turf.polygon([[\n [-46.653,-23.543],\n [-46.634,-23.5346],\n [-46.613,-23.543],\n [-46.614,-23.559],\n [-46.631,-23.567],\n [-46.653,-23.560],\n [-46.653,-23.543]\n]]);\n\nvar ptsWithin = turf.pointsWithinPolygon(points, searchWithin);\n",example:"var points = turf.points([\n [-46.6318, -23.5523],\n [-46.6246, -23.5325],\n [-46.6062, -23.5513],\n [-46.663, -23.554],\n [-46.643, -23.557]\n]);\n\nvar searchWithin = turf.polygon([[\n [-46.653,-23.543],\n [-46.634,-23.5346],\n [-46.613,-23.543],\n [-46.614,-23.559],\n [-46.631,-23.567],\n [-46.653,-23.560],\n [-46.653,-23.543]\n]]);\n\nvar ptsWithin = turf.pointsWithinPolygon(points, searchWithin);\n\n//addToMap\nvar addToMap = [points, searchWithin, ptsWithin]\nturf.featureEach(ptsWithin, function (currentFeature) {\n currentFeature.properties['marker-size'] = 'large';\n currentFeature.properties['marker-color'] = '#000';\n});",hasMap:!0,npmName:"@turf/points-within-polygon",returns:[{type:'FeatureCollection <(Point|MultiPoint)>',desc:"Point(s) or MultiPoint(s) with positions that land within at least one polygon. The geometry type will match what was passsed in"}],params:[{Argument:"points",Type:'(Feature|FeatureCollection <(Point|MultiPoint)>)',Description:"Point(s) or MultiPoint(s) as input search"},{Argument:"polygons",Type:'(FeatureCollection|Geometry|Feature <(Polygon|MultiPolygon)>)',Description:"(Multi)Polygon(s) to check if points are within"}],options:null,throws:[]},{name:"tag",hidden:!1,parent:null,description:'Takes a set of points and a set of polygons and/or multipolygons and performs a spatial join.',snippet:"var pt1 = turf.point([-77, 44]);\nvar pt2 = turf.point([-77, 38]);\nvar poly1 = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]], {pop: 3000});\nvar poly2 = turf.polygon([[\n [-81, 35],\n [-81, 41],\n [-72, 41],\n [-72, 35],\n [-81, 35]\n]], {pop: 1000});\n\nvar points = turf.featureCollection([pt1, pt2]);\nvar polygons = turf.featureCollection([poly1, poly2]);\n\nvar tagged = turf.tag(points, polygons, 'pop', 'population');\n",example:"var pt1 = turf.point([-77, 44]);\nvar pt2 = turf.point([-77, 38]);\nvar poly1 = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]], {pop: 3000});\nvar poly2 = turf.polygon([[\n [-81, 35],\n [-81, 41],\n [-72, 41],\n [-72, 35],\n [-81, 35]\n]], {pop: 1000});\n\nvar points = turf.featureCollection([pt1, pt2]);\nvar polygons = turf.featureCollection([poly1, poly2]);\n\nvar tagged = turf.tag(points, polygons, 'pop', 'population');\n\n//addToMap\nvar addToMap = [tagged, polygons]",hasMap:!0,npmName:"@turf/tag",returns:[{type:'FeatureCollection <Point>',desc:"points with containingPolyId property containing values from polyId"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"input points"},{Argument:"polygons",Type:'FeatureCollection <(Polygon|MultiPolygon)>',Description:"input (multi)polygons"},{Argument:"field",Type:"string",Description:"property in polygons to add to joined { } features"},{Argument:"outField",Type:"string",Description:"property in points in which to store joined property from polygons"}],options:null,throws:[]}]},{group:"Grids",modules:[{name:"hexGrid",hidden:!1,parent:null,description:'Takes a bounding box and the diameter of the cell and returns a FeatureCollection of flat-topped\nhexagons or triangles ( Polygon features) aligned in an "odd-q" vertical grid as\ndescribed in Hexagonal Grids.',snippet:"var bbox = [-96,31,-84,40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar hexgrid = turf.hexGrid(bbox, cellSide, options);\n",example:"var bbox = [-96,31,-84,40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar hexgrid = turf.hexGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [hexgrid];",hasMap:!0,npmName:"@turf/hex-grid",returns:[{type:'FeatureCollection <Polygon>',desc:"a hexagonal grid"}],params:[{Argument:"bbox",Type:'BBox',Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"length of the side of the the hexagons or triangles, in units. It will also coincide with the\nradius of the circumcircle of the hexagons."},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cell size, can be degrees, radians, miles, or kilometers"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each hexagon or triangle of the grid"},{Prop:"mask",Type:'(Feature <Polygon>)',Default:null,Description:"if passed a Polygon or MultiPolygon, the grid Points will be created only inside it"},{Prop:"triangles",Type:"boolean",Default:"false",Description:"whether to return as triangles instead of hexagons"}],throws:[]},{name:"pointGrid",hidden:!1,parent:null,description:'Creates a Point grid from a bounding box, FeatureCollection or Feature.',snippet:"var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\nvar cellSide = 3;\nvar options = {units: 'miles'};\n\nvar grid = turf.pointGrid(extent, cellSide, options);\n",example:"var extent = [-70.823364, -33.553984, -70.473175, -33.302986];\nvar cellSide = 3;\nvar options = {units: 'miles'};\n\nvar grid = turf.pointGrid(extent, cellSide, options);\n\n//addToMap\nvar addToMap = [grid];",hasMap:!0,npmName:"@turf/point-grid",returns:[{type:'FeatureCollection <Point>',desc:"grid of points"}],params:[{Argument:"bbox",Type:"Array ",Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"the distance between points, in units"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSide, can be degrees, radians, miles, or kilometers"},{Prop:"mask",Type:'(Feature <(Polygon|MultiPolygon)>)',Default:null,Description:"if passed a Polygon or MultiPolygon, the grid Points will be created only inside it"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each point of the grid"}],throws:[]},{name:"squareGrid",hidden:!1,parent:null,description:"Creates a square grid from a bounding box.",snippet:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar squareGrid = turf.squareGrid(bbox, cellSide, options);\n",example:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar squareGrid = turf.squareGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [squareGrid]",hasMap:!0,npmName:"@turf/square-grid",returns:[{type:'FeatureCollection <Polygon>',desc:"grid a grid of polygons"}],params:[{Argument:"bbox",Type:"Array ",Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"of each cell, in units"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSide, can be degrees,\nradians, miles, or kilometers"},{Prop:"mask",Type:'(Feature <(Polygon|MultiPolygon)>)',Default:null,Description:"if passed a Polygon or MultiPolygon,\nthe grid Points will be created only inside it"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each point of the grid"}],throws:[]},{name:"triangleGrid",hidden:!1,parent:null,description:'Takes a bounding box and a cell depth and returns a set of triangular polygons in a grid.',snippet:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n",example:"var bbox = [-95, 30 ,-85, 40];\nvar cellSide = 50;\nvar options = {units: 'miles'};\n\nvar triangleGrid = turf.triangleGrid(bbox, cellSide, options);\n\n//addToMap\nvar addToMap = [triangleGrid];",hasMap:!0,npmName:"@turf/triangle-grid",returns:[{type:'FeatureCollection <Polygon>',desc:"grid of polygons"}],params:[{Argument:"bbox",Type:"Array ",Description:"extent in minX, minY, maxX, maxY order"},{Argument:"cellSide",Type:"number",Description:"dimension of each cell"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:"'kilometers'",Description:"used in calculating cellSide, can be degrees, radians, miles, or kilometers"},{Prop:"mask",Type:'(Feature <Polygon>)',Default:null,Description:"if passed a Polygon or MultiPolygon, the grid Points will be created only inside it"},{Prop:"properties",Type:"Object",Default:"{}",Description:"passed to each point of the grid"}],throws:[]}]},{group:"Classification",modules:[{name:"nearestPoint",hidden:!1,parent:null,description:'Takes a reference point and a FeatureCollection of Features\nwith Point geometries and returns the\npoint from the FeatureCollection closest to the reference. This calculation\nis geodesic.',snippet:'var targetPoint = turf.point([28.965797, 41.010086], {"marker-color": "#0F0"});\nvar points = turf.featureCollection([\n turf.point([28.973865, 41.011122]),\n turf.point([28.948459, 41.024204]),\n turf.point([28.938674, 41.013324])\n]);\n\nvar nearest = turf.nearestPoint(targetPoint, points);\n',example:"var targetPoint = turf.point([28.965797, 41.010086], {\"marker-color\": \"#0F0\"});\nvar points = turf.featureCollection([\n turf.point([28.973865, 41.011122]),\n turf.point([28.948459, 41.024204]),\n turf.point([28.938674, 41.013324])\n]);\n\nvar nearest = turf.nearestPoint(targetPoint, points);\n\n//addToMap\nvar addToMap = [targetPoint, points, nearest];\nnearest.properties['marker-color'] = '#F00';",hasMap:!0,npmName:"@turf/nearest-point",returns:[{type:'Feature <Point>',desc:"the closest point in the set to the reference point"}],params:[{Argument:"targetPoint",Type:'Coord',Description:"the reference point"},{Argument:"points",Type:'FeatureCollection <Point>',Description:"against input point set"}],options:null,throws:[]}]},{group:"Aggregation",modules:[{name:"collect",hidden:!1,parent:null,description:"Merges a specified property from a FeatureCollection of points into a\nFeatureCollection of polygons. Given an inProperty on points and an outProperty \nfor polygons, this finds every point that lies within each polygon, collects the\n inProperty values from those points, and adds them as an array to outProperty \non the polygon.",snippet:"var poly1 = turf.polygon([[[0,0],[10,0],[10,10],[0,10],[0,0]]]);\nvar poly2 = turf.polygon([[[10,0],[20,10],[20,20],[20,0],[10,0]]]);\nvar polyFC = turf.featureCollection([poly1, poly2]);\nvar pt1 = turf.point([5,5], {population: 200});\nvar pt2 = turf.point([1,3], {population: 600});\nvar pt3 = turf.point([14,2], {population: 100});\nvar pt4 = turf.point([13,1], {population: 200});\nvar pt5 = turf.point([19,7], {population: 300});\nvar pointFC = turf.featureCollection([pt1, pt2, pt3, pt4, pt5]);\nvar collected = turf.collect(polyFC, pointFC, 'population', 'values');\nvar values = collected.features[0].properties.values\n//=values => [200, 600]\n",example:"var poly1 = turf.polygon([[[0,0],[10,0],[10,10],[0,10],[0,0]]]);\nvar poly2 = turf.polygon([[[10,0],[20,10],[20,20],[20,0],[10,0]]]);\nvar polyFC = turf.featureCollection([poly1, poly2]);\nvar pt1 = turf.point([5,5], {population: 200});\nvar pt2 = turf.point([1,3], {population: 600});\nvar pt3 = turf.point([14,2], {population: 100});\nvar pt4 = turf.point([13,1], {population: 200});\nvar pt5 = turf.point([19,7], {population: 300});\nvar pointFC = turf.featureCollection([pt1, pt2, pt3, pt4, pt5]);\nvar collected = turf.collect(polyFC, pointFC, 'population', 'values');\nvar values = collected.features[0].properties.values\n//=values => [200, 600]\n\n//addToMap\nvar addToMap = [pointFC, collected]",hasMap:!0,npmName:"@turf/collect",returns:[{type:'FeatureCollection <Polygon>',desc:"polygons with properties listed based on outField"}],params:[{Argument:"polygons",Type:'FeatureCollection <Polygon>',Description:"polygons with values on which to aggregate"},{Argument:"points",Type:'FeatureCollection <Point>',Description:"points to be aggregated"},{Argument:"inProperty",Type:"string",Description:"property to be nested from"},{Argument:"outProperty",Type:"string",Description:"property to be nested into"}],options:null,throws:[]},{name:"clustersDbscan",hidden:!1,parent:null,description:'Takes a set of points and partition them into clusters according to https://en.wikipedia.org/wiki/DBSCAN data clustering algorithm.',snippet:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar maxDistance = 100;\nvar clustered = turf.clustersDbscan(points, maxDistance);\n",example:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar maxDistance = 100;\nvar clustered = turf.clustersDbscan(points, maxDistance);\n\n//addToMap\nvar addToMap = [clustered];",hasMap:!0,npmName:"@turf/clusters-dbscan",returns:[{type:'FeatureCollection <Point>',desc:"Clustered Points with an additional two properties associated to each Feature:"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"to be clustered"},{Argument:"maxDistance",Type:"number",Description:"Maximum Distance between any point of the cluster to generate the clusters (kilometers only)"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"units",Type:"string",Default:'"kilometers"',Description:"in which "},{Prop:"mutate",Type:"boolean",Default:"false",Description:"Allows GeoJSON input to be mutated"},{Prop:"minPoints",Type:"number",Default:"3",Description:"Minimum number of points to generate a single cluster,\npoints which do not meet this requirement will be classified as an 'edge' or 'noise'."}],throws:[]},{name:"clustersKmeans",hidden:!1,parent:null,description:'Takes a set of points and partition them into clusters using the k-mean.\nIt uses the k-means algorithm',snippet:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar options = {numberOfClusters: 7};\nvar clustered = turf.clustersKmeans(points, options);\n",example:"// create random points with random z-values in their properties\nvar points = turf.randomPoint(100, {bbox: [0, 30, 20, 50]});\nvar options = {numberOfClusters: 7};\nvar clustered = turf.clustersKmeans(points, options);\n\n//addToMap\nvar addToMap = [clustered];",hasMap:!0,npmName:"@turf/clusters-kmeans",returns:[{type:'FeatureCollection <Point>',desc:"Clustered Points with an additional two properties associated to each Feature:"}],params:[{Argument:"points",Type:'FeatureCollection <Point>',Description:"to be clustered"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"numberOfClusters",Type:"number",Default:"Math.sqrt(numberOfPoints/2)",Description:"numberOfClusters that will be generated"},{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]}]},{group:"Meta",modules:[{name:"coordAll",hidden:!1,parent:"@turf/meta",description:"Get all coordinates from any GeoJSON object.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nvar coords = turf.coordAll(features);\n//= [[26, 37], [36, 53]]",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nvar coords = turf.coordAll(features);\n//= [[26, 37], [36, 53]]",hasMap:!1,npmName:"@turf/meta",returns:[{type:"Array >",desc:"coordinate position array"}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"}],options:null,throws:[]},{name:"coordEach",hidden:!1,parent:"@turf/meta",description:"Iterate over coordinates in any GeoJSON object, similar to Array.forEach()",snippet:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n});',example:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n});',hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)"},{Argument:"excludeWrapCoord",Type:"boolean",Description:"whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration."}],options:null,throws:[]},{name:"coordReduce",hidden:!1,parent:"@turf/meta",description:"Reduce coordinates in any GeoJSON object, similar to Array.reduce()",snippet:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=previousValue\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n return currentCoord;\n});',example:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n //=previousValue\n //=currentCoord\n //=coordIndex\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n return currentCoord;\n});',hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Geometry|Feature)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentCoord, coordIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."},{Argument:"excludeWrapCoord",Type:"boolean",Description:"whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration."}],options:null,throws:[]},{name:"featureEach",hidden:!1,parent:"@turf/meta",description:"Iterate over features in any GeoJSON object, similar to\nArray.forEach.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.featureEach(features, function (currentFeature, featureIndex) {\n //=currentFeature\n //=featureIndex\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.featureEach(features, function (currentFeature, featureIndex) {\n //=currentFeature\n //=featureIndex\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentFeature, featureIndex)"}],options:null,throws:[]},{name:"featureReduce",hidden:!1,parent:"@turf/meta",description:"Reduce features in any GeoJSON object, similar to Array.reduce().",snippet:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n return currentFeature\n});',example:'var features = turf.featureCollection([\n turf.point([26, 37], {"foo": "bar"}),\n turf.point([36, 53], {"hello": "world"})\n]);\n\nturf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n return currentFeature\n});',hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentFeature, featureIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"flattenEach",hidden:!1,parent:"@turf/meta",description:"Iterate over flattened features in any GeoJSON object, similar to\nArray.forEach.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n});",hasMap:!1,npmName:"@turf/meta",returns:[],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentFeature, featureIndex, multiFeatureIndex)"}],options:null,throws:[]},{name:"flattenReduce",hidden:!1,parent:"@turf/meta",description:"Reduce flattened features in any GeoJSON object, similar to Array.reduce().",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n return currentFeature\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n]);\n\nturf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n //=previousValue\n //=currentFeature\n //=featureIndex\n //=multiFeatureIndex\n return currentFeature\n});",hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"getCoord",hidden:!1,parent:"@turf/invariant",description:"Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.",snippet:"var pt = turf.point([10, 10]);\n\nvar coord = turf.getCoord(pt);\n//= [10, 10]",example:"var pt = turf.point([10, 10]);\n\nvar coord = turf.getCoord(pt);\n//= [10, 10]",hasMap:!1,npmName:"@turf/invariant",returns:[{type:"Array ",desc:"coordinates"}],params:[{Argument:"coord",Type:'(Array |Geometry <Point>|Feature <Point>)',Description:"GeoJSON Point or an Array of numbers"}],options:null,throws:[]},{name:"getCoords",hidden:!1,parent:"@turf/invariant",description:"Unwrap coordinates from a Feature, Geometry Object or an Array",snippet:"var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n\nvar coords = turf.getCoords(poly);\n//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]",example:"var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n\nvar coords = turf.getCoords(poly);\n//= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]",hasMap:!1,npmName:"@turf/invariant",returns:[{type:"Array ",desc:"coordinates"}],params:[{Argument:"coords",Type:'(Array |Geometry|Feature)',Description:"Feature, Geometry Object or an Array"}],options:null,throws:[]},{name:"getGeom",hidden:!1,parent:"@turf/invariant",description:"Get Geometry from Feature or Geometry Object",snippet:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getGeom(point)\n//={"type": "Point", "coordinates": [110, 40]}',example:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getGeom(point)\n//={"type": "Point", "coordinates": [110, 40]}',hasMap:!1,npmName:"@turf/invariant",returns:[{type:'(Geometry|null)',desc:"GeoJSON Geometry Object"}],params:[{Argument:"geojson",Type:'(Feature|Geometry)',Description:"GeoJSON Feature or Geometry Object"}],options:null,throws:[{type:"Error",desc:"if geojson is not a Feature or Geometry Object"}]},{name:"getType",hidden:!1,parent:"@turf/invariant",description:"Get GeoJSON object's type, Geometry type is prioritize.",snippet:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getType(point)\n//="Point"',example:'var point = {\n "type": "Feature",\n "properties": {},\n "geometry": {\n "type": "Point",\n "coordinates": [110, 40]\n }\n}\nvar geom = turf.getType(point)\n//="Point"',hasMap:!1,npmName:"@turf/invariant",returns:[{type:"string",desc:"GeoJSON type"}],params:[{Argument:"geojson",Type:'GeoJSON',Description:"GeoJSON object"},{Argument:"name",Type:"string",Description:"name of the variable to display in error message (unused)"}],options:null,throws:[]},{name:"geomEach",hidden:!1,parent:"@turf/meta",description:"Iterate over each geometry in any GeoJSON object, similar to Array.forEach()",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)"}],options:null,throws:[]},{name:"geomReduce",hidden:!1,parent:"@turf/meta",description:"Reduce geometry in any GeoJSON object, similar to Array.reduce().",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=previousValue\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n return currentGeometry\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n //=previousValue\n //=currentGeometry\n //=featureIndex\n //=featureProperties\n //=featureBBox\n //=featureId\n return currentGeometry\n});",hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"propEach",hidden:!1,parent:"@turf/meta",description:"Iterate over properties in any GeoJSON object, similar to Array.forEach()",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propEach(features, function (currentProperties, featureIndex) {\n //=currentProperties\n //=featureIndex\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propEach(features, function (currentProperties, featureIndex) {\n //=currentProperties\n //=featureIndex\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentProperties, featureIndex)"}],options:null,throws:[]},{name:"propReduce",hidden:!1,parent:"@turf/meta",description:"Reduce properties in any GeoJSON object into a single value,\nsimilar to how Array.reduce works. However, in this case we lazily run\nthe reduction, so an array of all properties is unnecessary.",snippet:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n //=previousValue\n //=currentProperties\n //=featureIndex\n return currentProperties\n});",example:"var features = turf.featureCollection([\n turf.point([26, 37], {foo: 'bar'}),\n turf.point([36, 53], {hello: 'world'})\n]);\n\nturf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n //=previousValue\n //=currentProperties\n //=featureIndex\n return currentProperties\n});",hasMap:!1,npmName:"@turf/meta",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature)',Description:"any GeoJSON object"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentProperties, featureIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"segmentEach",hidden:!1,parent:"@turf/meta",description:"Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n(Multi)Point geometries do not contain segments therefore they are ignored during this operation.",snippet:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //=currentSegment\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n //=segmentIndex\n});\n\n// Calculate the total number of segments\nvar total = 0;\nturf.segmentEach(polygon, function () {\n total++;\n});",example:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //=currentSegment\n //=featureIndex\n //=multiFeatureIndex\n //=geometryIndex\n //=segmentIndex\n});\n\n// Calculate the total number of segments\nvar total = 0;\nturf.segmentEach(polygon, function () {\n total++;\n});",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON"},{Argument:"callback",Type:"Function",Description:"a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)"}],options:null,throws:[]},{name:"segmentReduce",hidden:!1,parent:"@turf/meta",description:"Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n(Multi)Point geometries do not contain segments therefore they are ignored during this operation.",snippet:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //= previousSegment\n //= currentSegment\n //= featureIndex\n //= multiFeatureIndex\n //= geometryIndex\n //= segmentIndex\n return currentSegment\n});\n\n// Calculate the total number of segments\nvar initialValue = 0\nvar total = turf.segmentReduce(polygon, function (previousValue) {\n previousValue++;\n return previousValue;\n}, initialValue);",example:"var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n\n// Iterate over GeoJSON by 2-vertex segments\nturf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n //= previousSegment\n //= currentSegment\n //= featureIndex\n //= multiFeatureIndex\n //= geometryIndex\n //= segmentIndex\n return currentSegment\n});\n\n// Calculate the total number of segments\nvar initialValue = 0\nvar total = turf.segmentReduce(polygon, function (previousValue) {\n previousValue++;\n return previousValue;\n}, initialValue);",hasMap:!1,npmName:"@turf/meta",returns:[!1],params:[{Argument:"geojson",Type:'(FeatureCollection|Feature|Geometry)',Description:"any GeoJSON"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, currentSegment, currentIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]},{name:"getCluster",hidden:!1,parent:"@turf/clusters",description:"Get Cluster",snippet:"var geojson = turf.featureCollection([\n turf.point([0, 0], {'marker-symbol': 'circle'}),\n turf.point([2, 4], {'marker-symbol': 'star'}),\n turf.point([3, 6], {'marker-symbol': 'star'}),\n turf.point([5, 1], {'marker-symbol': 'square'}),\n turf.point([4, 2], {'marker-symbol': 'circle'})\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Retrieve first cluster (0)\nvar cluster = turf.getCluster(clustered, {cluster: 0});\n//= cluster\n\n// Retrieve cluster based on custom properties\nturf.getCluster(clustered, {'marker-symbol': 'circle'}).length;\n//= 2\nturf.getCluster(clustered, {'marker-symbol': 'square'}).length;\n//= 1",example:"var geojson = turf.featureCollection([\n turf.point([0, 0], {'marker-symbol': 'circle'}),\n turf.point([2, 4], {'marker-symbol': 'star'}),\n turf.point([3, 6], {'marker-symbol': 'star'}),\n turf.point([5, 1], {'marker-symbol': 'square'}),\n turf.point([4, 2], {'marker-symbol': 'circle'})\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Retrieve first cluster (0)\nvar cluster = turf.getCluster(clustered, {cluster: 0});\n//= cluster\n\n// Retrieve cluster based on custom properties\nturf.getCluster(clustered, {'marker-symbol': 'circle'}).length;\n//= 2\nturf.getCluster(clustered, {'marker-symbol': 'square'}).length;\n//= 1",hasMap:!1,npmName:"@turf/clusters",returns:[{type:'FeatureCollection',desc:"Single Cluster filtered by GeoJSON Properties"}],params:[{Argument:"geojson",Type:'FeatureCollection',Description:"GeoJSON Features"},{Argument:"filter",Type:"*",Description:"Filter used on GeoJSON properties to get Cluster"}],options:null,throws:[]},{name:"clusterEach",hidden:!1,parent:"@turf/clusters",description:"clusterEach",snippet:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue, currentIndex) {\n //= cluster\n //= clusterValue\n //= currentIndex\n})\n\n// Calculate the total number of clusters\nvar total = 0\nturf.clusterEach(clustered, 'cluster', function () {\n total++;\n});\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = []\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue) {\n values.push(clusterValue);\n});",example:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue, currentIndex) {\n //= cluster\n //= clusterValue\n //= currentIndex\n})\n\n// Calculate the total number of clusters\nvar total = 0\nturf.clusterEach(clustered, 'cluster', function () {\n total++;\n});\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = []\nturf.clusterEach(clustered, 'cluster', function (cluster, clusterValue) {\n values.push(clusterValue);\n});",hasMap:!1,npmName:"@turf/clusters",returns:[!1],params:[{Argument:"geojson",Type:'FeatureCollection',Description:"GeoJSON Features"},{Argument:"property",Type:"(string|number)",Description:"GeoJSON property key/value used to create clusters"},{Argument:"callback",Type:"Function",Description:"a method that takes (cluster, clusterValue, currentIndex)"}],options:null,throws:[]},{name:"clusterReduce",hidden:!1,parent:"@turf/clusters",description:"Reduce clusters in GeoJSON Features, similar to Array.reduce()",snippet:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster and perform a calculation\nvar initialValue = 0\nturf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue, currentIndex) {\n //=previousValue\n //=cluster\n //=clusterValue\n //=currentIndex\n return previousValue++;\n}, initialValue);\n\n// Calculate the total number of clusters\nvar total = turf.clusterReduce(clustered, 'cluster', function (previousValue) {\n return previousValue++;\n}, 0);\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = turf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue) {\n return previousValue.concat(clusterValue);\n}, []);",example:"var geojson = turf.featureCollection([\n turf.point([0, 0]),\n turf.point([2, 4]),\n turf.point([3, 6]),\n turf.point([5, 1]),\n turf.point([4, 2])\n]);\n\n// Create a cluster using K-Means (adds `cluster` to GeoJSON properties)\nvar clustered = turf.clustersKmeans(geojson);\n\n// Iterate over each cluster and perform a calculation\nvar initialValue = 0\nturf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue, currentIndex) {\n //=previousValue\n //=cluster\n //=clusterValue\n //=currentIndex\n return previousValue++;\n}, initialValue);\n\n// Calculate the total number of clusters\nvar total = turf.clusterReduce(clustered, 'cluster', function (previousValue) {\n return previousValue++;\n}, 0);\n\n// Create an Array of all the values retrieved from the 'cluster' property\nvar values = turf.clusterReduce(clustered, 'cluster', function (previousValue, cluster, clusterValue) {\n return previousValue.concat(clusterValue);\n}, []);",hasMap:!1,npmName:"@turf/clusters",returns:[{type:"*",desc:"The value that results from the reduction."}],params:[{Argument:"geojson",Type:'FeatureCollection',Description:"GeoJSON Features"},{Argument:"property",Type:"(string|number)",Description:"GeoJSON property key/value used to create clusters"},{Argument:"callback",Type:"Function",Description:"a method that takes (previousValue, cluster, clusterValue, currentIndex)"},{Argument:"initialValue",Type:"(*)",Description:"Value to use as the first argument to the first call of the callback."}],options:null,throws:[]}]},{group:"Assertions",modules:[{name:"collectionOf",hidden:!1,parent:"@turf/invariant",description:'Enforce expectations about types of FeatureCollection inputs for Turf.\nInternally this uses geojsonType to judge geometry types.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[],params:[{Argument:"featureCollection",Type:'FeatureCollection',Description:"a FeatureCollection for which features will be judged"},{Argument:"type",Type:"string",Description:"expected GeoJSON type"},{Argument:"name",Type:"string",Description:"name of calling function"}],options:null,throws:[{type:"Error",desc:"if value is not the expected type."}]},{name:"containsNumber",hidden:!1,parent:"@turf/invariant",description:"Checks if coordinates contains a number",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[{type:"boolean",desc:"true if Array contains a number"}],params:[{Argument:"coordinates",Type:"Array ",Description:"GeoJSON Coordinates"}],options:null,throws:[]},{name:"geojsonType",hidden:!1,parent:"@turf/invariant",description:"Enforce expectations about types of GeoJSON objects for Turf.",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[],params:[{Argument:"value",Type:'GeoJSON',Description:"any GeoJSON object"},{Argument:"type",Type:"string",Description:"expected GeoJSON type"},{Argument:"name",Type:"string",Description:"name of calling function"}],options:null,throws:[{type:"Error",desc:"if value is not the expected type."}]},{name:"featureOf",hidden:!1,parent:"@turf/invariant",description:'Enforce expectations about types of Feature inputs for Turf.\nInternally this uses geojsonType to judge geometry types.',snippet:!1,example:!1,hasMap:!1,npmName:"@turf/invariant",returns:[],params:[{Argument:"feature",Type:'Feature',Description:"a feature with an expected geometry type"},{Argument:"type",Type:"string",Description:"expected GeoJSON type"},{Argument:"name",Type:"string",Description:"name of calling function"}],options:null,throws:[{type:"Error",desc:"error if value is not the expected type."}]}]},{group:"Booleans",modules:[{name:"booleanClockwise",hidden:!1,parent:null,description:"Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.",snippet:"var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\nvar counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n\nturf.booleanClockwise(clockwiseRing)\n//=true\nturf.booleanClockwise(counterClockwiseRing)\n//=false",example:"var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\nvar counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n\nturf.booleanClockwise(clockwiseRing)\n//=true\nturf.booleanClockwise(counterClockwiseRing)\n//=false",hasMap:!1,npmName:"@turf/boolean-clockwise",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"line",Type:'(Feature <LineString>|LineString|Array >)',Description:"to be evaluated"}],options:null,throws:[]},{name:"booleanConcave",hidden:!1,parent:null,description:"Takes a polygon and return true or false as to whether it is concave or not.",snippet:"var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n\nturf.booleanConcave(convexPolygon)\n//=false",example:"var convexPolygon = turf.polygon([[[0,0],[0,1],[1,1],[1,0],[0,0]]]);\n\nturf.booleanConcave(convexPolygon)\n//=false",hasMap:!1,npmName:"@turf/boolean-concave",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"polygon",Type:'Feature <Polygon>',Description:"to be evaluated"}],options:null,throws:[]},{name:"booleanContains",hidden:!1,parent:null,description:"Boolean-contains returns True if the second geometry is completely contained by the first geometry.\nThe interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\nmust not intersect the exterior of the primary (geometry a).\nBoolean-contains returns the exact opposite result of the @turf/boolean-within.",snippet:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanContains(line, point);\n//=true",example:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanContains(line, point);\n//=true",hasMap:!1,npmName:"@turf/boolean-contains",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanCrosses",hidden:!1,parent:null,description:"Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than\nthe maximum dimension of the two source geometries and the intersection set is interior to\nboth source geometries.",snippet:"var line1 = turf.lineString([[-2, 2], [4, 2]]);\nvar line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nvar cross = turf.booleanCrosses(line1, line2);\n//=true",example:"var line1 = turf.lineString([[-2, 2], [4, 2]]);\nvar line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nvar cross = turf.booleanCrosses(line1, line2);\n//=true",hasMap:!1,npmName:"@turf/boolean-crosses",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanDisjoint",hidden:!1,parent:null,description:"Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.",snippet:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanDisjoint(line, point);\n//=true",example:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanDisjoint(line, point);\n//=true",hasMap:!1,npmName:"@turf/boolean-disjoint",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanEqual",hidden:!1,parent:null,description:"Determine whether two geometries of the same type have identical X,Y coordinate values.\nSee http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm",snippet:"var pt1 = turf.point([0, 0]);\nvar pt2 = turf.point([0, 0]);\nvar pt3 = turf.point([1, 1]);\n\nturf.booleanEqual(pt1, pt2);\n//= true\nturf.booleanEqual(pt2, pt3);\n//= false",example:"var pt1 = turf.point([0, 0]);\nvar pt2 = turf.point([0, 0]);\nvar pt3 = turf.point([1, 1]);\n\nturf.booleanEqual(pt1, pt2);\n//= true\nturf.booleanEqual(pt2, pt3);\n//= false",hasMap:!1,npmName:"@turf/boolean-equal",returns:[{type:"boolean",desc:"true if the objects are equal, false otherwise"}],params:[{Argument:"feature1",Type:'(Geometry|Feature)',Description:"GeoJSON input"},{Argument:"feature2",Type:'(Geometry|Feature)',Description:"GeoJSON input"}],options:null,throws:[]},{name:"booleanIntersects",hidden:!1,parent:null,description:"Boolean-intersects returns (TRUE) two geometries intersect.",snippet:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanIntersects(line, point);\n//=true",example:"var point = turf.point([2, 2]);\nvar line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n\nturf.booleanIntersects(line, point);\n//=true",hasMap:!1,npmName:"@turf/boolean-intersects",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanOverlap",hidden:!1,parent:null,description:"Compares two geometries of the same dimension and returns true if their intersection set results in a geometry\ndifferent from both but of the same dimension. It applies to Polygon/Polygon, LineString/LineString,\nMultipoint/Multipoint, MultiLineString/MultiLineString and MultiPolygon/MultiPolygon.\nIn other words, it returns true if the two geometries overlap, provided that neither completely contains the other.",snippet:"var poly1 = turf.polygon([[[0,0],[0,5],[5,5],[5,0],[0,0]]]);\nvar poly2 = turf.polygon([[[1,1],[1,6],[6,6],[6,1],[1,1]]]);\nvar poly3 = turf.polygon([[[10,10],[10,15],[15,15],[15,10],[10,10]]]);\n\nturf.booleanOverlap(poly1, poly2)\n//=true\nturf.booleanOverlap(poly2, poly3)\n//=false",example:"var poly1 = turf.polygon([[[0,0],[0,5],[5,5],[5,0],[0,0]]]);\nvar poly2 = turf.polygon([[[1,1],[1,6],[6,6],[6,1],[1,1]]]);\nvar poly3 = turf.polygon([[[10,10],[10,15],[15,15],[15,10],[10,10]]]);\n\nturf.booleanOverlap(poly1, poly2)\n//=true\nturf.booleanOverlap(poly2, poly3)\n//=false",hasMap:!1,npmName:"@turf/boolean-overlap",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"input"},{Argument:"feature2",Type:'(Geometry|Feature <(LineString|MultiLineString|Polygon|MultiPolygon)>)',Description:"input"}],options:null,throws:[]},{name:"booleanParallel",hidden:!1,parent:null,description:"Boolean-Parallel returns True if each segment of line1 is parallel to the correspondent segment of line2",snippet:"var line1 = turf.lineString([[0, 0], [0, 1]]);\nvar line2 = turf.lineString([[1, 0], [1, 1]]);\n\nturf.booleanParallel(line1, line2);\n//=true",example:"var line1 = turf.lineString([[0, 0], [0, 1]]);\nvar line2 = turf.lineString([[1, 0], [1, 1]]);\n\nturf.booleanParallel(line1, line2);\n//=true",hasMap:!1,npmName:"@turf/boolean-parallel",returns:[{type:"boolean",desc:"true/false if the lines are parallel"}],params:[{Argument:"line1",Type:'(Geometry|Feature <LineString>)',Description:"GeoJSON Feature or Geometry"},{Argument:"line2",Type:'(Geometry|Feature <LineString>)',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]},{name:"booleanPointInPolygon",hidden:!1,parent:null,description:'Takes a Point and a Polygon or MultiPolygon and determines if the point\nresides inside the polygon. The polygon can be convex or concave. The function accounts for holes.',snippet:"var pt = turf.point([-77, 44]);\nvar poly = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]]);\n\nturf.booleanPointInPolygon(pt, poly);\n//= true",example:"var pt = turf.point([-77, 44]);\nvar poly = turf.polygon([[\n [-81, 41],\n [-81, 47],\n [-72, 47],\n [-72, 41],\n [-81, 41]\n]]);\n\nturf.booleanPointInPolygon(pt, poly);\n//= true",hasMap:!1,npmName:"@turf/boolean-point-in-polygon",returns:[{type:"boolean",desc:"true if the Point is inside the Polygon; false if the Point is not inside the Polygon"}],params:[{Argument:"point",Type:'Coord',Description:"input point"},{Argument:"polygon",Type:'Feature <(Polygon|MultiPolygon)>',Description:"input polygon or multipolygon"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"ignoreBoundary",Type:"boolean",Default:"false",Description:"True if polygon boundary should be ignored when determining if\nthe point is inside the polygon otherwise false."}],throws:[]},{name:"booleanPointOnLine",hidden:!1,parent:null,description:"Returns true if a point is on a line. Accepts a optional parameter to ignore the\nstart and end vertices of the linestring.",snippet:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);\nvar isPointOnLine = turf.booleanPointOnLine(pt, line);\n//=true",example:"var pt = turf.point([0, 0]);\nvar line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);\nvar isPointOnLine = turf.booleanPointOnLine(pt, line);\n//=true",hasMap:!1,npmName:"@turf/boolean-point-on-line",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"pt",Type:'Coord',Description:"GeoJSON Point"},{Argument:"line",Type:'Feature <LineString>',Description:"GeoJSON LineString"},{Argument:"options",Type:"Object",Description:"Optional parameters: see below"}],options:[{Prop:"ignoreEndVertices",Type:"boolean",Default:"false",Description:"whether to ignore the start and end vertices."},{Prop:"epsilon",Type:"(number)",Default:null,Description:"Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points"}],throws:[]},{name:"booleanWithin",hidden:!1,parent:null,description:"Boolean-within returns true if the first geometry is completely within the second geometry.\nThe interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)\nmust not intersect the exterior of the secondary (geometry b).\nBoolean-within returns the exact opposite result of the @turf/boolean-contains.",snippet:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanWithin(point, line);\n//=true",example:"var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\nvar point = turf.point([1, 2]);\n\nturf.booleanWithin(point, line);\n//=true",hasMap:!1,npmName:"@turf/boolean-within",returns:[{type:"boolean",desc:"true/false"}],params:[{Argument:"feature1",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"},{Argument:"feature2",Type:'(Geometry|Feature )',Description:"GeoJSON Feature or Geometry"}],options:null,throws:[]}]},{group:"Unit Conversion",modules:[{name:"bearingToAzimuth",hidden:!1,parent:"@turf/helpers",description:"Converts any bearing angle from the north line direction (positive clockwise)\nand returns an angle between 0-360 degrees (positive clockwise), 0 being the north line",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"angle between 0 and 360 degrees"}],params:[{Argument:"bearing",Type:"number",Description:"angle, between -180 and +180 degrees"}],options:null,throws:[]},{name:"convertArea",hidden:!1,parent:"@turf/helpers",description:"Converts a area to the requested unit.\nValid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"the converted area"}],params:[{Argument:"area",Type:"number",Description:"to be converted"},{Argument:"originalUnit",Type:"Units",Description:"of the distance"},{Argument:"finalUnit",Type:"Units",Description:"returned unit"}],options:null,throws:[]},{name:"convertLength",hidden:!1,parent:"@turf/helpers",description:"Converts a length to the requested unit.\nValid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"the converted length"}],params:[{Argument:"length",Type:"number",Description:"to be converted"},{Argument:"originalUnit",Type:"Units",Description:"of the length"},{Argument:"finalUnit",Type:"Units",Description:"returned unit"}],options:null,throws:[]},{name:"degreesToRadians",hidden:!1,parent:"@turf/helpers",description:"Converts an angle in degrees to radians",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"angle in radians"}],params:[{Argument:"degrees",Type:"number",Description:"angle between 0 and 360 degrees"}],options:null,throws:[]},{name:"lengthToRadians",hidden:!1,parent:"@turf/helpers",description:"Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\nValid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"radians"}],params:[{Argument:"distance",Type:"number",Description:"in real units"},{Argument:"units",Type:"string",Description:"can be degrees, radians, miles, inches, yards, metres,\nmeters, kilometres, kilometers."}],options:null,throws:[]},{name:"lengthToDegrees",hidden:!1,parent:"@turf/helpers",description:"Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\nValid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"degrees"}],params:[{Argument:"distance",Type:"number",Description:"in real units"},{Argument:"units",Type:"string",Description:"can be degrees, radians, miles, inches, yards, metres,\nmeters, kilometres, kilometers."}],options:null,throws:[]},{name:"radiansToLength",hidden:!1,parent:"@turf/helpers",description:"Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\nValid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"distance"}],params:[{Argument:"radians",Type:"number",Description:"in radians across the sphere"},{Argument:"units",Type:"string",Description:"can be degrees, radians, miles, inches, yards, metres,\nmeters, kilometres, kilometers."}],options:null,throws:[]},{name:"radiansToDegrees",hidden:!1,parent:"@turf/helpers",description:"Converts an angle in radians to degrees",snippet:!1,example:!1,hasMap:!1,npmName:"@turf/helpers",returns:[{type:"number",desc:"degrees between 0 and 360 degrees"}],params:[{Argument:"radians",Type:"number",Description:"angle in radians"}],options:null,throws:[]},{name:"toMercator",hidden:!1,parent:"@turf/projection",description:"Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection",snippet:"var pt = turf.point([-71,41]);\nvar converted = turf.toMercator(pt);\n",example:"var pt = turf.point([-71,41]);\nvar converted = turf.toMercator(pt);\n\n//addToMap\nvar addToMap = [pt, converted];",hasMap:!0,npmName:"@turf/projection",returns:[{type:'GeoJSON',desc:"Projected GeoJSON"}],params:[{Argument:"geojson",Type:'(GeoJSON|Position)',Description:"WGS84 GeoJSON object"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]},{name:"toWgs84",hidden:!1,parent:"@turf/projection",description:"Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection",snippet:"var pt = turf.point([-7903683.846322424, 5012341.663847514]);\nvar converted = turf.toWgs84(pt);\n",example:"var pt = turf.point([-7903683.846322424, 5012341.663847514]);\nvar converted = turf.toWgs84(pt);\n\n//addToMap\nvar addToMap = [pt, converted];",hasMap:!0,npmName:"@turf/projection",returns:[{type:'GeoJSON',desc:"Projected GeoJSON"}],params:[{Argument:"geojson",Type:'(GeoJSON|Position)',Description:"Mercator GeoJSON object"},{Argument:"options",Type:"(Object)",Description:"Optional parameters: see below"}],options:[{Prop:"mutate",Type:"boolean",Default:"false",Description:"allows GeoJSON input to be mutated (significant performance increase if true)"}],throws:[]}]}]}},"2g4l":function(e,t,n){var r=n("rBBf");"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n("rjj0")("3f05c554",r,!1,{sourceMap:!1})},"3GDu":function(e,t,n){"use strict";var r=n("ZocI"),o=n("xoLX"),a=!1;var i=function(e){a||n("iS0B")},s=n("VU/8")(r.a,o.a,!1,i,null,null);s.options.__file="src/components/Map.vue",t.a=s.exports},"5iXl":function(e,t,n){"use strict";t.a={name:"Module",props:["module"],methods:{visibilityChanged:function(e,t){e&&this.$emit("changeMap",t.target.classList[0])}},data:function(){return{cols:[{title:"Argument",key:"Argument",width:105},{title:"Type",key:"Type",width:200},{title:"Description",key:"Description",width:800}],optionsCols:[{title:"Prop",key:"Prop",width:105},{title:"Type",key:"Type",width:90},{title:"Default",key:"Default",width:110},{title:"Description",key:"Description"}]}}}},"78uf":function(e,t,n){var r=n("E/LC");"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n("rjj0")("1fa3e9be",r,!1,{sourceMap:!1})},CxOa:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("+di1"),o=n("IKnY"),a=!1;var i=function(e){a||n("2g4l")},s=n("VU/8")(r.a,o.a,!1,i,"data-v-b232b182",null);s.options.__file="src/pages/docs.vue",t.default=s.exports},"E/LC":function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,".module{background-color:#f6f6f6;padding:40px;margin-top:60px;margin-bottom:40px;border:2px solid rgba(12,57,82,.1)}h3{font-weight:200;font-size:48px;font-size:3rem;margin-bottom:10px;margin-top:0}table{background-color:#fff;font-size:14.4px;font-size:.9rem;border:1px solid #dddee1;width:100%;border-collapse:collapse}table tr th{background-color:#f8f8f9;text-align:left;padding:8px 10px}table td,table tr th{border-bottom:1px solid #e9eaec}table td{padding:10px}.npmBadge{background-color:rgba(12,57,82,.4);font-size:14.4px;font-size:.9rem;font-weight:600;font-family:Montserrat,sans-serif}.hasParent,.npmBadge{padding:15px;color:#fff;text-align:right;width:100%}.hasParent{background-color:rgba(12,57,82,.7);margin-top:20px;font-size:16px;font-size:1rem}.mapExample{height:325px;background:rgba(12,57,82,.3);margin-top:30px}@media screen and (max-width:900px){.moduleResponsive{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow-y:scroll;margin:20px}.exampleResponsive{margin-left:0;width:100%}.moduleAreaResponsive{width:100%}.tableResponsive{overflow-y:scroll}.titleResponsive{font-size:28px!important}}",""])},IKnY:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"modules"},[n("leaflet-map",{directives:[{name:"dom-portal",rawName:"v-dom-portal",value:e.mapContainer,expression:"mapContainer"}],ref:"turfMap",attrs:{id:"turfMap"}}),e._l(e.modules,function(t){return n("module",{key:t.name,attrs:{module:t},on:{changeMap:e.moveMap}})})],2)};r._withStripped=!0;var o={render:r,staticRenderFns:[]};t.a=o},ZocI:function(module,__webpack_exports__,__webpack_require__){"use strict";var turfMap=null,fg=null,control=null,layerArray=null;__webpack_exports__.a={name:"Map",mounted:function(){L.mapbox.accessToken="pk.eyJ1IjoidHVyZmpzIiwiYSI6ImNrZWp2ODRvNzFqMHoyeHJ6b3Jpc29iczQifQ.YdYb6a6rA5aCtkmDZ5wn_g",(turfMap=L.mapbox.map("turfMap").addLayer(L.mapbox.styleLayer("mapbox://styles/mapbox/streets-v11"))).getContainer().style.height="325px",control=L.control.layers([],[]).addTo(turfMap),fg=L.featureGroup([]).addTo(turfMap)},methods:{moveMapToExample:function moveMapToExample(module){if(module.hasMap){fg.eachLayer(function(e){control.removeLayer(e)}),fg.clearLayers(),layerArray=module.example.split(/\n\/\/addToMap/)[1],layerArray=layerArray.match(/\[.*]/)[0],layerArray=layerArray.replace("[","").replace("]","").split(",");var zoomText=this.getLayersAndZoom();return eval(module.example+zoomText)}},getLayersAndZoom:function(e){return"\n addToMap.forEach(function (geojson, index) {\n var geojsonLayer = L.mapbox.featureLayer(geojson);\n geojsonLayer.eachLayer(function (layer) {\n if (layer.feature.properties){\n if (Object.keys(layer.feature.properties).length > 0){\n layer.bindPopup(JSON.stringify(layer.feature.properties));\n }\n }\n });\n control.addOverlay(geojsonLayer, layerArray[index])\n fg.addLayer(geojsonLayer)\n })\n turfMap.fitBounds(fg.getBounds(), {padding: [30,30]})"}}}},hGMI:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,".leaflet-touch .leaflet-control-fullscreen a{background-position:0 0}.leaflet-touch.leaflet-fullscreen-on .leaflet-control-fullscreen a{background-position:0 -26px}",""])},iS0B:function(e,t,n){var r=n("hGMI");"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n("rjj0")("356fab35",r,!1,{sourceMap:!1})},qjSL:function(e,t,n){"use strict";var r=n("5iXl"),o=n("xFcl"),a=!1;var i=function(e){a||n("78uf")},s=n("VU/8")(r.a,o.a,!1,i,null,null);s.options.__file="src/components/Module.vue",t.a=s.exports},rBBf:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"@media screen and (max-width:900px){.modules[data-v-b232b182]{margin-top:140px}}",""])},xFcl:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("Row",{staticClass:"mainContentArea moduleResponsive"},[n("Col",{staticClass:"moduleAreaResponsive",attrs:{span:"16"}},[n("div",{attrs:{id:e.module.name}}),n("h3",{staticClass:"titleResponsive"},[e._v(e._s(e.module.name))]),n("p",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:e.visibilityChanged,expression:"visibilityChanged"}],class:e.module.name,domProps:{innerHTML:e._s(e.module.description)}}),n("h4",[e._v("Arguments")]),n("div",{staticClass:"tableResponsive"},[n("table",[n("thead",[n("tr",e._l(e.cols,function(t){return n("th",{style:{width:t.width+"px"}},[e._v(e._s(t.title))])}),0)]),n("tbody",e._l(e.module.params,function(t){return n("tr",[n("td",[e._v(e._s(t.Argument))]),n("td",{domProps:{innerHTML:e._s(t.Type)}}),n("td",{domProps:{innerHTML:e._s(t.Description)}})])}),0)])]),null!==e.module.options?n("div",{staticClass:"tableResponsive"},[n("h4",[e._v("Options")]),n("table",[n("thead",[n("tr",e._l(e.optionsCols,function(t){return n("th",{style:{width:t.width+"px"}},[e._v(e._s(t.title))])}),0)]),n("tbody",e._l(e.module.options,function(t){return n("tr",[n("td",[e._v(e._s(t.Prop))]),n("td",{domProps:{innerHTML:e._s(t.Type)}}),n("td",[e._v(e._s(t.Default))]),n("td",[e._v(e._s(t.Description))])])}),0)])]):e._e(),e.module.returns.length>0?n("div",[n("h4",[e._v("Returns")]),n("p",{domProps:{innerHTML:e._s(e.module.returns[0].type+" - "+e.module.returns[0].desc)}})]):e._e(),e.module.throws.length>0?n("div",[n("h4",[e._v("Throws")]),n("p",[e._v(e._s(e.module.throws[0].type)+" - "+e._s(e.module.throws[0].desc))])]):e._e()]),n("Col",{staticClass:"exampleResponsive",attrs:{span:"7",offset:"1"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.module.hasMap,expression:"module.hasMap"}]},[n("div",{staticClass:"mapExample",attrs:{id:"map_"+e.module.name}})]),n("p",{staticClass:"npmBadge"},[e._v("npm install "+e._s(e.module.npmName))]),null!==e.module.parent?n("div",[n("p",{staticClass:"hasParent"},[n("strong",[e._v("Note:")]),e._v(" "+e._s(e.module.name)+" is part of the "+e._s(e.module.npmName)+" module."),n("br"),n("br"),e._v("\n To use it as a stand-alone module will need to import "+e._s(e.module.npmName)+" and call the "+e._s(e.module.name)+" method.\n ")])]):e._e()]),n("Col",{attrs:{span:"24"}},[!1!==e.module.snippet?n("div",[n("h4",[e._v("Example")]),n("pre",{directives:[{name:"highlightjs",rawName:"v-highlightjs"}]},[n("code",{staticClass:"javascript"},[e._v(e._s(e.module.snippet))])])]):e._e()])],1)};r._withStripped=!0;var o={render:r,staticRenderFns:[]};t.a=o},xoLX:function(e,t,n){"use strict";var r=function(){var e=this.$createElement;return(this._self._c||e)("div",{attrs:{id:"turfMap"}})};r._withStripped=!0;var o={render:r,staticRenderFns:[]};t.a=o}}); \ No newline at end of file diff --git a/docs/js/pages/getting-started.c33926039daaa1871200.js b/docs/js/pages/getting-started.c33926039daaa1871200.js new file mode 100644 index 00000000..5817fde2 --- /dev/null +++ b/docs/js/pages/getting-started.c33926039daaa1871200.js @@ -0,0 +1 @@ +webpackJsonp([3],{"+Lvb":function(t,e,i){"use strict";var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Row",{staticClass:"mainContentArea mainContentAreaResponsive"},[i("Col",{staticClass:"contentResponsive",attrs:{span:"17"}},[i("h3",[t._v("Getting started with Turf.js")]),i("p",[t._v("There are a few different ways to get started using Turf, the documentation below will provide a couple of the common scenarios.")]),i("h4",[t._v("Using in Node or with a build tool")]),i("p",[t._v("If you're working in Node or with build tool (such as webpack, browserify or rollup) you can include individual turf modules in your project.")]),i("pre",{directives:[{name:"highlightjs",rawName:"v-highlightjs"}]},[i("code",{staticClass:"js"},[t._v("// Import your module of interest\nvar collect = require('@turf/collect');\n// or in ES6\nimport collect from '@turf/collect';\n// And then use it\ncollect(points, polys, 'population', 'populationValues');\n// Alternatively you can import the whole lot using\nimport * as turf from '@turf/turf'\n")])]),i("h4",[t._v("Using directly in the browser")]),i("p",[t._v("Load the minified file via a script tag, this will expose a global variable named turf.")]),i("pre",{directives:[{name:"highlightjs",rawName:"v-highlightjs"}]},[i("code",{staticClass:"js"},[t._v("