1"use strict";(globalThis.webpackChunkturf_www||=[]).push([[5338],{34096(e,n,t){t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>h,default:()=>m,frontMatter:()=>d,metadata:()=>i,toc:()=>p});const i=JSON.parse('{"id":"api/types/lineReduceCallback","title":"lineReduceCallback","description":"Description","source":"@site/versioned_docs/version-7.3.0/api/types/lineReduceCallback.mdx","sourceDirName":"api/types","slug":"/api/types/lineReduceCallback","permalink":"/docs/7.3.0/api/types/lineReduceCallback","draft":false,"unlisted":false,"editUrl":"https://github.com/Turfjs/turf-www/tree/master/versioned_docs/version-7.3.0/api/types/lineReduceCallback.mdx","tags":[],"version":"7.3.0","frontMatter":{"title":"lineReduceCallback"},"sidebar":"apiSidebar","previous":{"title":"lineEachCallback","permalink":"/docs/7.3.0/api/types/lineEachCallback"},"next":{"title":"propEachCallback","permalink":"/docs/7.3.0/api/types/propEachCallback"}}');var r=t(86070),l=t(67028),o=t(64776),s={};t.r(s),t.d(s,{along:()=>o.Qwm,angle:()=>o.g7h,applyFilter:()=>o.$hf,area:()=>o.Wcw,areaFactors:()=>o.i26,azimuthToBearing:()=>o.Oe8,bbox:()=>o.Qk1,bboxClip:()=>o.ywB,bboxPolygon:()=>o.kJI,bearing:()=>
1o.dcc,bearingToAzimuth:()=>o.u8E,bezierSpline:()=>o.vKl,booleanClockwise:()=>o.D2R,booleanConcave:()=>o.U7O,booleanContains:()=>o.yxm,booleanCrosses:()=>o.hkq,booleanDisjoint:()=>o.t5S,booleanEqual:()=>o.x0k,booleanIntersects:()=>o.lgr,booleanOverlap:()=>o.cYD,booleanParallel:()=>o.Y5$,booleanPointInPolygon:()=>o.mFO,booleanPointOnLine:()=>o.O84,booleanTouches:()=>o.UsQ,booleanValid:()=>o.hxF,booleanWithin:()=>o.Cei,buffer:()=>o.ra8,center:()=>o.gXo,centerMean:()=>o.rb,centerMedian:()=>o.eZr,centerOfMass:()=>o.NAY,centroid:()=>o.vh2,circle:()=>o.n1W,cleanCoords:()=>o.ayX,clone:()=>o.o8B,cloneProperties:()=>o.Rdw,clusterEach:()=>o.UZ0,clusterReduce:()=>o.HYf,clusters:()=>o.qf7,clustersDbscan:()=>o.Zqw,clustersKmeans:()=>o.pPd,collect:()=>o.Fod,collectionOf:()=>o.iww,combine:()=>o.kg7,concave:()=>o.Ms8,containsNumber:()=>o.lOq,convertArea:()=>o.vnt,convertLength:()=>o.I3T,convex:()=>o.y5H,coordAll:()=>o.D3w,coordEach:()=>o.Fh1,coordReduce:()=>o.k7X,createBins:()=>o.f8u,degreesToRadians:()=>o.tRv,destination:()=>o.j_,difference:()=>o.iv2,directionalMean:()=>o.eFb,dissolve:()=>o.a1F,distance:()=>o.IoC,distanceWeight:()=>o.mJ,earthRadius:()=>o.zXD,ellipse:()=>o.pw2,envelope:()=>o.REH,explode:()=>o.Gdr,factors:()=>o.PgN,feature:()=>o.N4z,featureCollection:()=>o.Lrk,featureEach:()=>o.usj,featureOf:()=>o.mo4,featureReduce:()=>o.n4j,filterProperties:()=>o.qV7,findPoint:()=>o.Yd2,findSegment:()=>o.ptW,flatten:()=>o.Bqz,flattenEach:()=>o.iwz,flattenReduce:()=>o.VJK,flip:()=>o.UUz,geojsonRbush:()=>o.sZS,geojsonType:()=>o.e8v,geomEach:()=>o.kX6,geomReduce:()=>o.jEc,geometry:()=>o.lCx,geometryCollection:()=>o.zbs,getCluster:()=>o.dB3,getCoord:()=>o.uGX,getCoords:()=>o.$Rn,getGeom:()=>o.bgk,getType:()=>o.Pwh,greatCircle:()=>o.Glg,helpers:()=>o._$r,hexGrid:()=>o.O9B,interpolate:()=>o.GWP,intersect:()=>o.y$5,invariant:()=>o.V1S,isNumber:()=>o.EtT,isObject:()=>o.Gvm,isobands:()=>o.Mii,isolines:()=>o.LNI,kinks:()=>o.nUT,length:()=>o.Bw9,lengthToDegrees:()=>o.vlv,lengthToRadians:()=>o.GfV,lineArc:()=>o.FsR,lineChunk:()=>o.W26,lineEach:()=>o.Iet,lineIntersect:()=>o.kVe,lineOffset:()=>o.uO7,lineOverlap:()=>o._Jg,lineReduce:()=>o.t0h,lineSegment:()=>o.wdR,lineSlice:()=>o.ne9,lineSliceAlong:()=>o.qMT,lineSplit:()=>o.JQ7,lineString:()=>o.wiw,lineStrings:()=>o.Nls,lineToPolygon:()=>o.gP4,mask:()=>o.dKf,meta:()=>o.mIj,midpoint:()=>o.PVF,moranIndex:()=>o.KFB,multiLineString:()=>o.NUZ,multiPoint:()=>o.kBJ,multiPolygon:()=>o.g52,nearestNeighborAnalysis:()=>o.rBB,nearestPoint:()=>o.xCI,nearestPointOnLine:()=>o.W1F,nearestPointToLine:()=>o.K9N,planepoint:()=>o.xYr,point:()=>o.zx7,pointGrid:()=>o.hq2,pointOnFeature:()=>o.QwJ,pointToLineDistance:()=>o.d4V,pointToPolygonDistance:()=>o.fJX,points:()=>o.WRA,pointsWithinPolygon:()=>o.nj9,polygon:()=>o.n1,polygonSmooth:()=>o.bmV,polygonTangents:()=>o.v4M,polygonToLine:()=>o.CNZ,polygonize:()=>o.Tz9,polygons:()=>o.qFD,projection:()=>o.Qju,propEach:()=>o.nPV,propReduce:()=>o.qBo,propertiesContainsFilter:()=>o.NLl,quadratAnalysis:()=>o.txz,radiansToDegrees:()=>o.nv6,radiansToLength:()=>o.cJD,random:()=>o.yTv,randomLineString:()=>o.lWQ,randomPoint:()=>o._eC,randomPolygon:()=>o.myJ,randomPosition:()=>o.Dxs,rectangleGrid:()=>o.K1I,rewind:()=>o.KrA,rhumbBearing:()=>o.Fc$,rhumbDestination:()=>o.rmV,rhumbDistance:()=>o.EUY,round:()=>o.LIG,sample:()=>o.XM1,sector:()=>o.rkH,segmentEach:()=>o.RPu,segmentReduce:()=>o.OQs,shortestPath:()=>o._6q,simplify:()=>o.CRN,square:()=>o.EwI,squareGrid:()=>o.cS4,standardDeviationalEllipse:()=>o.C0c,tag:()=>o.TcI,tesselate:()=>o.nYW,tin:()=>o.ucs,toMercator:()=>o.FU4,toWgs84:()=>o.zY8,transformRotate:()=>o.qS_,transformScale:()=>o.nIv,transformTranslate:()=>o.tLh,triangleGrid:()=>o.Vwd,truncate:()=>o.xvE,union:()=>o.KCZ,unkinkPolygon:()=>o.BoU,validateBBox:()=>o.O6s,validateId:()=>o.GZo,voronoi:()=>o.B8d});var a=t(35876),c=t(25333);const d={title:"lineReduceCallback"},h=void 0,u={},p=[{value:"Description",id:"description",level:3},{value:"Definition",id:"definition",level:3},{value:"Returns",id:"returns",level:3}];function g(e){const n={a:"a",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h3,{id:"description",children:"Description"}),"\n",(0,r.jsx)(n.p,{children:"Callback for lineReduce"}),"\n",(0,r.jsx)(n.p,{children:"The first time the callback function is called, the values provided as arguments depend\non whether the reduce method has an initialValue argument."}),"\n",(0,r.jsx)(n.p,{children:"If an initialValue is provided to the reduce method:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The previousValue argument is initialValue."}),"\n",(0,r.jsx)(n.li,{children:"The currentValue argument is the value of the first element present in the array."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"If an initialValue is not provided:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"The previousValue argument is the value of the first element present in the array."}),"\n",(0,r.jsx)(n.li,{children:"The currentValue argument is the value of the second element present in the array."}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"definition",children:"Definition"}),"\n",(0,r.jsx)(n.p,{children:"function ("}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"previousValue"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:"Reducer"})}),(0,r.jsx)(n.td,{children:"The accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"currentLine"}),(0,r.jsx)(n.td,{children:(0,r.jsxs)(n.strong,{children:[(0,r.jsx)(n.a,{href:"https://tools.ietf.org/html/rfc7946#section-3.2",children:"Feature"}),"<",(0,r.jsx)(n.a,{href:"https://tools.ietf.org/html/rfc7946#section-3.1.4",children:"LineString"}),">"]})}),(0,r.jsx)(n.td,{children:"The current LineString|LinearRing being processed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"featureIndex"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number",children:"number"})})}),(0,r.jsx)(n.td,{children:"The current index of the Feature being processed"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"multiFeatureIndex"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number",children:"number"})})}),(0,r.jsx)(n.td,{children:"The current index of the Multi-Feature being processed"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"geometryIndex"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.a,{href:"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number",children:"number"})})}),(0,r.jsx)(n.td,{children:"The current index of the Geometry being processed"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:")"}),"\n",(0,r.jsx)(n.h3,{id:"returns",children:"Returns"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Reducer"})}),"\n",(0,r.jsx)(c.A,{children:()=>(0,r.jsx)(a.A,{turf:s})})]})}function m(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.