Skip to content

Node.js REST API for PostGres Spatial Entities. AKA: SpatialServer

License

Notifications You must be signed in to change notification settings

meule/PGRestAPI

Repository files navigation

PGRestAPI (a.k.a. Chubbs Spatial Server)

alt text

Overview

Node.js REST API for PostgreSQL Spatial Entities.

Point it at your instance of PostgreSQL and PostGIS, and you'll get a REST API that supports:

  • Dynamic Tiled Map Services for spatial tables using Mapnik (Not for Windows installs, yet)
  • Dynamic Vector Tile Services for spatial tables using Mapnik (Not for Windows installs, yet)
  • RESTful Query endpoint for each table and view - return GeoJSON, esriJSON or Shapefile. Supports spatial and tabular queries and aggregation.
  • Geoprocessing Framework - (You still have to know how to write PostGIS logic, but...), with dynamic tiled maps available as output.
  • Route Caching for .pngs
  • Admin panel (/admin) to show tile generation statistics and cache size
  • Shapefile List (/shapefiles) to display shapefiles being served as map services

Utilities:

  • WKT Previewer

Under development:

  • GeoJSON to .png endpoint
  • Better caching for different endpoints
  • In-memory map services (Loads a Shapefile into memory for faster response times. Drop shapefiles into endpoints/mapnik/data/inmemory-shapefiles)
  • Raster map services (Drop a .tif into endpoints/mapnik/data/rasters)
  • Shapefile map services ((Drop shapefiles into endpoints/mapnik/data/shapefiles)
  • Datablaster - Sort of an ETL to pregenerate .json/.geojson files for use in your applications (similar to how Jeckyll produces HTML/CSS/Javascirpt)
  • Authentication with passport/MongoDB/Mongoose (Disabled for now)
  • Vector Tiles endpoint for serving .tm2 or .mbtiles sources (not working yet)

More To-Dos:

  • CartoCSS to Mapnik XML parser (Carto module)
  • Persistent caching
  • Administrative Panel

Express, Jade and general structure based on: Project is structured based on http://www.bearfruit.org/2013/06/21/start-a-new-node-js-express-app-the-right-way/

##Installation

Dependencies

  • PostgreSQL 9.1 + w/ PostGIS 2.0 +
  • Mapnik

##Screenshots

###Table/View List: alt text

###Table Details: alt text

###Query Endpoint: alt text

###Query Endpoint Results: alt text

###Dynamic Map Tile Service Endpoint: alt text

###Dynamic Vector Tile Endpoint: alt text

###Geoprocessing Operations: alt text

###Geoprocessing Operation: alt text

###Utililties - WKT Preview endpoint: alt text

###Raster Operations List: alt text

###Raster Operations - Zonal Statistics: alt text

###Tile Rendering Stats (/admin): alt text

About

Node.js REST API for PostGres Spatial Entities. AKA: SpatialServer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.6%
  • HTML 5.0%
  • CSS 1.4%