{"id":36466428,"url":"https://github.com/pvernier/csv2geojson","last_synced_at":"2026-01-12T00:04:05.643Z","repository":{"id":45049247,"uuid":"134613013","full_name":"pvernier/csv2geojson","owner":"pvernier","description":"A CLI to convert CSV to GeoJSON","archived":false,"fork":false,"pushed_at":"2022-01-12T16:09:19.000Z","size":52,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T03:16:38.205Z","etag":null,"topics":["cli","csv","geojson","gis","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pvernier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-23T18:54:59.000Z","updated_at":"2022-04-19T14:40:09.000Z","dependencies_parsed_at":"2022-08-19T19:00:40.906Z","dependency_job_id":null,"html_url":"https://github.com/pvernier/csv2geojson","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/pvernier/csv2geojson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvernier%2Fcsv2geojson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvernier%2Fcsv2geojson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvernier%2Fcsv2geojson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvernier%2Fcsv2geojson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvernier","download_url":"https://codeload.github.com/pvernier/csv2geojson/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvernier%2Fcsv2geojson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28328781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","csv","geojson","gis","golang"],"created_at":"2026-01-12T00:04:05.584Z","updated_at":"2026-01-12T00:04:05.636Z","avatar_url":"https://github.com/pvernier.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/pvernier/csv2geojson.svg?branch=master)](https://travis-ci.com/pvernier/csv2geojson)\n\n# csv2geojson\n\nA CLI to convert CSV to GeoJSON from a file, folder or URL.\n\n## Download\n\nGet the binaries (64 bits) for Linux, Windows and macOS [here](https://github.com/pvernier/csv2geojson/releases).\n\n## Usage\n\n```\n$csv2geojson -h\nUsage: csv2geojson [-options] \u003cinput\u003e [output]\n\nOptions:\n  -delimiter: Delimiter character (default \",\")\n  -long:      Name of the column containing the longitude coordinates. If not provided, will try to guess\n  -lat:       Name of the column containing the latitude coordinates. If not provided, will try to guess\n  -keep:      (y/n) If set to \"y\" and the input CSV is an URL, keep the input CSV file on disk (default \"n\")\n  -threads:   Number of threads (used when converting more than one file) (default \"1\")\n  -suffix:    Suffix to add to the name of output GeoJSON file(s)\n\n```\n\n## Examples\n\n### Convert a single file\n\n```\n# Simplest way\n$csv2geojson data.csv\nThe GeoJSON file data.geojson was successfully created.\n```\n\nIn this case csv2geojson will try to guess which fields contain the longitude and latitude coordinates. Also, if **[output]** is omitted, the output GeoJSON file gets the same name as the input CSV file.\n\n```\n# Complete way\n$csv2geojson -delimiter ; -long field4 -lat field3 data_fr.csv pois\nThe GeoJSON file pois.geojson was successfully created.\n```\n\nIf the fields of the input CSV file are not separated by commas, use the *-delimiter* option. If the fields containing the longitude and latitude don't have a explicit name, use the *-long* and *-lat* options. Explicit names are: 'longitude', 'long', 'lon', 'lng' and 'x' for the longitude. 'latitude', 'lat' and 'y' for the latitude (case insensitive).\n\n```\n$csv2geojson -delimiter \\t ..\\coords_tab.txt\nThe GeoJSON file ..\\coords_tab.geojson was successfully created.\n```\n\ncsv2geojson can also convert tab separated text files. Options can be entered in any order. The input CSV file doesn't need to be in the current folder. It can be a relative or absolute path.\n\n### Convert from a URL\n\n```\n$csv2geojson -keep y https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv\nThe GeoJSON file all_month.geojson was successfully created.\n```\n\n*-keep y* saves the downloaded CSV. By default, it is not saved.\n\n### Convert all the CSV files inside a folder\n\n```\n# The folder 'data' contains 5 CSV files: zone_A1, zone_A2, zone_A3, zone_B1 and zone_B2.\n\n$csv2geojson -threads 3 data\nThe GeoJSON file data\\zone_A3.geojson was successfully created.\nThe GeoJSON file data\\zone_A2.geojson was successfully created.\nThe GeoJSON file data\\zone_A1.geojson was successfully created.\nThe GeoJSON file data\\zone_B1.geojson was successfully created.\nThe GeoJSON file data\\zone_B2.geojson was successfully created.\n```\nWhen converting multiple files, using the option *-threads* can make it faster. In this case, the order in which the files are converted is not\nguaranteed to always be the same.\n\n### Convert a subset of CSV files inside a folder\n\n```\n$csv2geojson data\\*B*\nThe GeoJSON file data\\zone_B1.geojson was successfully created.\nThe GeoJSON file data\\zone_B2.geojson was successfully created.\n```\n\n\n## Alternatives\n\n* [csv2geojson](https://github.com/mapbox/csv2geojson) (Javascript)\n* [ogr2ogr2](http://www.gdal.org/ogr2ogr.html)\n\n## Inspiration\n\n * [Ahmad-Magdy/CSV-To-JSON-Converter](https://github.com/Ahmad-Magdy/CSV-To-JSON-Converter)\n * [Golang - Read CSV/JSON from URL](https://gist.github.com/stupidbodo/71f2b164744a18a18e74)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvernier%2Fcsv2geojson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvernier%2Fcsv2geojson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvernier%2Fcsv2geojson/lists"}