src/lib/ogr-cmd.js
function create (format, options) {
  const ogrFormat = ogrFormats[format]
  // shapefiles cannot be streamed out of ogr2ogr
  const output = format === 'zip' ? `${options.path || '.'}/${options.name}` : '/vsistdout/'
  const input = options.input || 'layer.vrt'

  let cmd = ['--config', 'SHAPE_ENCODING', 'UTF-8', '-f', ogrFormat, output, input]

  options.geometry = options.geometry && options.geometry.toUpperCase() || 'NONE'
  if (format === 'csv') cmd = csvParams(cmd, options)
  if (format === 'zip') cmd = shapefileParams(cmd, options)
  if (format === 'georss') cmd = georssParams(cmd, options)
  return finishOgrParams(cmd)
}
function create (format, options) {
  const ogrFormat = ogrFormats[format]
  // shapefiles cannot be streamed out of ogr2ogr
  const output = format === 'zip' ? `${options.path || '.'}/${options.name}` : '/vsistdout/'
  const input = options.input || 'layer.vrt'

  let cmd = ['--config', 'SHAPE_ENCODING', 'UTF-8', '-f', ogrFormat, output, input]

  options.geometry = options.geometry && options.geometry.toUpperCase() || 'NONE'
  if (format === 'csv') cmd = csvParams(cmd, options)
  if (format === 'zip') cmd = shapefileParams(cmd, options)
  if (format === 'georss') cmd = georssParams(cmd, options)
  return finishOgrParams(cmd)
}
Gets a set of OGR Parameters for an export

@param {object} options - potentially contains a fields object