PGRestAPI (a.k.a. Chubbs Spatial Server)
Overview
Node.js REST API for PostgreSQL Spatial Tables.
A few key uses for PGRestAPI:
- Create Mapbox Vector Tiles on the fly from PostGIS or shapefiles. more...
- Serve pre-created Vector Tiles .mbtiles files
- Serve pre-created PNG .mbtiles files (like TileStream)
- REST API for querying Postgres tables - Supports spatial intersection, tabular queries and aggregation queries
- REST API returns GeoJSON, CSV, Shapefile or esriJSON
- Templates for creating custom web service endpoints - (Execute custom SQL functions, for example)
- Rasters in PostGIS offer basic intersect operations and zonal stats. Find sum of raster values that intersect a polygon, for example.
Utilities:
- WKT Previewer
- Server side proxy - support requests to servers that don't support CORS
Under development:
-
Better caching for different endpoints
-
Raster map services (Drop a .tif into data/rasters)
-
Authentication with passport/MongoDB/Mongoose (Disabled for now)
More To-Dos:
- Update Express and other libraries to current versions
- More tests
- Major refactoring of endpoints folder
- Break up endpoint functionality into modules
- Persistent caching
- Administrative Panel
- Editing
Soon will drop:
- PNG image creation from PostGIS Tables
- CartoCSS to Mapnik XML parser (Carto module) (this actually works, but is not used by our team)
##Installation
Dependencies
- PostgreSQL 9.1 + w/ PostGIS 2.0 +
- Mapnik
##Screenshots
###Dynamic Map Tile Service Endpoint:
###Dynamic Vector Tile Endpoint:
###Utililties - WKT Preview endpoint: