lib/Models/GeoJsonCatalogItem.js
function filterArray(pts, func) {
  if (!(pts[0] instanceof Array) || !(pts[0][0] instanceof Array)) {
    pts = func(pts);
    return pts;
  }

  var result = new Array(pts.length);
  for (var i = 0; i < pts.length; i++) {
    result[i] = filterArray(pts[i], func); //at array of arrays of points
  }
  return result;
}
function filterArray(pts, func) {
  if (!(pts[0] instanceof Array) || !(pts[0][0] instanceof Array)) {
    pts = func(pts);
    return pts;
  }

  var result = new Array(pts.length);
  for (var i = 0; i < pts.length; i++) {
    result[i] = filterArray(pts[i], func); //at array of arrays of points
  }
  return result;
}
function filterArray ( pts , func ) { if ( ! ( pts [ 0 ] instanceof Array ) || ! ( pts [ 0 ] [ 0 ] instanceof Array ) ) { pts = func ( pts ) ; return pts ; } var result = new Array ( pts . length ) ; for ( var i = 0 ; i < pts . length ; i ++ ) { result [ i ] = filterArray ( pts [ i ] , func ) ; //at array of arrays of points } return result ; }
Filter a geojson coordinates array structure.
Filter a geojson coordinates array structure .