scripts/node/calculateIsochrone.js
//helper function to retrieve the villages within maxSpeed*maxTime radius
helper function to retrieve the villages within maxSpeed*maxTime radius
helper function to retrieve the villages within maxSpeed * maxTime radius
function villagesInCircle(center,time,speed) {
    var centerPt = point([center[0],center[1]]);
    var length = (time*1.5/3600)*speed;
    var circle = featurecollection([buffer(centerPt,length,'kilometers')]);
    var result = within(villages,circle);
    return result;
}
function villagesInCircle ( center , time , speed ) { var centerPt = point ( [ center [ 0 ] , center [ 1 ] ] ) ; var length = ( time * 1.5 / 3600 ) * speed ; var circle = featurecollection ( [ buffer ( centerPt , length , 'kilometers' ) ] ) ; var result = within ( villages , circle ) ; return result ; }
helper function to retrieve the villages within maxSpeed*maxTime radius
helper function to retrieve the villages within maxSpeed * maxTime radius