src/index.js
function convertCSVGeom (columns, row) {
  const geometry = _.reduce(columns, (tempGeom, colName, i) => {
    if (isLongitudeField(colName)) tempGeom.coordinates[0] = parseFloat(row[i])
    else if (isLatitudeField(colName)) tempGeom.coordinates[1] = parseFloat(row[i])
    return tempGeom
  }, { type: 'Point', coordinates: [null, null] })
  return validGeometry(geometry) ? geometry : null
}
function convertCSVGeom (columns, row) {
  const geometry = _.reduce(columns, (tempGeom, colName, i) => {
    if (isLongitudeField(colName)) tempGeom.coordinates[0] = parseFloat(row[i])
    else if (isLatitudeField(colName)) tempGeom.coordinates[1] = parseFloat(row[i])
    return tempGeom
  }, { type: 'Point', coordinates: [null, null] })
  return validGeometry(geometry) ? geometry : null
}
function convertCSVGeom ( columns , row ) { const geometry = _ . reduce ( columns , ( tempGeom , colName , i ) => { if ( isLongitudeField ( colName ) ) tempGeom . coordinates [ 0 ] = parseFloat ( row [ i ] ) else if ( isLatitudeField ( colName ) ) tempGeom . coordinates [ 1 ] = parseFloat ( row [ i ] ) return tempGeom } , { type : 'Point' , coordinates : [ null , null ] } ) return validGeometry ( geometry ) ? geometry : null }
Convert CSV geom to geojson

@param {array} fieldNames - array of field names
@param {array} feature - individual feature
@returns {object} geometry - geometry object
Convert CSV geom to geojson