geoconvert

May 31, 2026 · View on GitHub

Convert between various spatial formats and CSV/SVG including GeoJSON, SHP, and more.

Table of Contents | Source: src/cmd/geoconvert.rs | 🌎

Description | Usage | Arguments | Geoconvert Options | Common Options

Description ↩

Convert between various spatial formats and CSV/SVG including GeoJSON, SHP, and more.

For example to convert a GeoJSON file into CSV data:

$ qsv geoconvert file.geojson geojson csv

To use stdin as input instead of a file path, use a dash "-":

$ qsv prompt -m "Choose a GeoJSON file" -F geojson | qsv geoconvert - geojson csv

To convert a CSV file into GeoJSON data, specify the WKT geometry column with the --geometry flag:

$ qsv geoconvert file.csv csv geojson --geometry geometry

Alternatively specify the latitude and longitude columns with the --latitude and --longitude flags:

$ qsv geoconvert file.csv csv geojson --latitude lat --longitude lon

See also https://github.com/dathere/qsv/wiki/Geospatial#geoconvert

Usage ↩

qsv geoconvert [options] (<input>) (<input-format>) (<output-format>)
qsv geoconvert --help

Arguments ↩

    Argument     Description
 <input> The spatial file to convert. To use stdin instead, use a dash "-". Note: SHP input must be a path to a .shp file and cannot use stdin.
 <input-format> Valid values are "geojson", "shp", and "csv"
 <output-format> Valid values are:
  • For GeoJSON input: "csv", "svg", and "geojsonl"
  • For SHP input: "csv", "geojson", and "geojsonl"
  • For CSV input: "geojson", "geojsonl", and "svg" ("csv" only with --max-length, for truncation)

Geoconvert Options ↩

     Option     TypeDescriptionDefault
 ‑g,
‑‑geometry 
stringThe name of the column that has WKT geometry. Alternative to --latitude and --longitude.
 ‑y,
‑‑latitude 
stringThe name of the column with northing values.
 ‑x,
‑‑longitude 
stringThe name of the column with easting values.
 ‑l,
‑‑max‑length 
integerThe maximum column length when the output format is CSV. Oftentimes, the geometry column is too long to fit in a CSV file, causing other tools like Python & PostgreSQL to fail. If a column is too long, it will be truncated to the specified length and an ellipsis ("...") will be appended.

Common Options ↩

     Option     TypeDescriptionDefault
 ‑h,
‑‑help 
flagDisplay this message
 ‑o,
‑‑output 
stringWrite output to instead of stdout.

Source: src/cmd/geoconvert.rs | Table of Contents | README