Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Countries | 5,652 | 399 | 77 | 2 months ago | 21 | April 04, 2020 | 43 | odbl-1.0 | PHP | |
World countries in JSON, CSV, XML and Yaml. Any help is welcome! | ||||||||||
Mapshaper | 3,251 | 37 | 18 | 15 days ago | 379 | August 15, 2022 | 111 | other | JavaScript | |
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files | ||||||||||
Vizicities | 2,686 | 1 | 4 years ago | November 02, 2014 | 106 | bsd-3-clause | JavaScript | |||
A framework for 3D geospatial visualization in the browser | ||||||||||
Awesome Geojson | 1,919 | 2 months ago | 2 | cc0-1.0 | ||||||
GeoJSON utilities that will make your life easier. | ||||||||||
Leaflet Omnivore | 556 | 55 | 4 | 2 years ago | 11 | November 17, 2016 | 23 | other | JavaScript | |
universal format parser for Leaflet & Mapbox.js | ||||||||||
Leaflet.vectorgrid | 478 | 43 | 18 | a year ago | 8 | August 28, 2017 | 102 | JavaScript | ||
Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0 | ||||||||||
Vector Datasource | 471 | 16 days ago | 248 | other | Python | |||||
Tilezen vector tile service - OpenStreetMap data in several formats | ||||||||||
Admdongkor | 345 | 3 months ago | 2 | |||||||
대한민국 행정동 경계 파일 | ||||||||||
Southkorea Maps | 323 | 4 years ago | 6 | Python | ||||||
South Korea administrative divisions in ESRI Shapefile, GeoJSON and TopoJSON formats. | ||||||||||
Us Maps | 305 | 6 years ago | 2 | |||||||
GeoJSON and TopoJSON map files |
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 postgis2geojson.py -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 postgis2geojson.py -d gisdata -t boundaries -u user -p password -g the_geom -f oid name -o boundary_data --topojson
####Arguments:
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 postgis2geojson.py --help
.