Extract PostGIS tables as GeoJSON and TopoJSON
Alternatives To Postgis2geojson
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Countries5,652399772 months ago21April 04, 202043odbl-1.0PHP
World countries in JSON, CSV, XML and Yaml. Any help is welcome!
Mapshaper3,251371815 days ago379August 15, 2022111otherJavaScript
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
14 years agoNovember 02, 2014106bsd-3-clauseJavaScript
A framework for 3D geospatial visualization in the browser
Awesome Geojson1,919
2 months ago2cc0-1.0
GeoJSON utilities that will make your life easier.
Leaflet Omnivore5565542 years ago11November 17, 201623otherJavaScript
universal format parser for Leaflet & Mapbox.js
Leaflet.vectorgrid4784318a year ago8August 28, 2017102JavaScript
Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
Vector Datasource471
16 days ago248otherPython
Tilezen vector tile service - OpenStreetMap data in several formats
3 months ago2
대한민국 행정동 경계 파일
Southkorea Maps323
4 years ago6Python
South Korea administrative divisions in ESRI Shapefile, GeoJSON and TopoJSON formats.
Us Maps305
6 years ago2
GeoJSON and TopoJSON map files
Alternatives To Postgis2geojson
Select To Compare

Alternative Project Comparisons


A simple tool for exporting from a PostGIS table to GeoJSON and TopoJSON. Assumes Python 2.7+, psycopg2, and TopoJSON are already installed and in your PATH.

Adapted from Bryan McBride's excellent PHP implementation.

####Example usage:

To export table boundaries from database gisdata as user user to both GeoJSON and TopoJSON:

python -d gisdata -t boundaries -u user --topojson

or, also specify that the geometry column is the_geom, only fields oid and name should be returned, and the output file should be called boundary_data:

python -d gisdata -t boundaries -u user -p password -g the_geom -f oid name -o boundary_data --topojson


Name Argument Default value Required Description
Help -h Show friendly help message
Database -d Y Database to use
Host -H localhost Host to connect to
User -U postgres Postgres user to use
Password -p Password for Postgres user
Port -P 5432 Database port
Table -t Y Table to query
Fields -f * Database fields to return, separated by a single space
Geometry -g geom Name of geometry column
Where -w Optional WHERE clause to add to the SQL query
File -o data.geojson Name of output file
Topojson --topojson Creates a TopoJSON file in addtion to a GeoJSON
Pretty print --pretty Pretty print the output

A full list of options is also available via python --help.

Popular Topojson Projects
Popular Geojson Projects
Popular Mapping Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.