Giter Site home page Giter Site logo

pgrestapi's Introduction

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

Join the chat at https://gitter.im/spatialdev/PGRestAPI

alt text

Overview

Node.js REST API for PostgreSQL Spatial Tables.

An introduction to PGRestAPI can be found here

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

###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

pgrestapi's People

Contributors

abenrob avatar apollolm avatar aratcliffe avatar ccabanero avatar dmduarte avatar gitter-badger avatar mattcurrie avatar slindy23 avatar topwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pgrestapi's Issues

Create Dynamic JobIDs for Geoprocessing Services

When GP jobs pop off, there should be a common unique identifier that follows the job throughout its life cycle. This may involve the server writing out assets to disk (maybe a shapefile -> Mapnik -> output image), and status updates for long running jobs.

Allow for preprocessed JSON packages to be created and downloaded

This could be a separate project.
But, rip out a bunch of .json files ahead of time.
If your client side app has a table that aggregates values by district, do it all on the server, then rip out static view files that already are in the correct format to be consumed and immediately displayed by the client.

This might mean ripping out a json file for a particluar district that has pivoted aggregated averages. There might also be a json file for the same district, but it's pre-formatted to be consumed by a d3 grouped bar chart.

It's like tile caching your map ahead of time. But we're kind of caching all of the different ways a client would want to consume a piece of data. Need to work out a way for a user to define the format/logic for this.

Think about it.

Create OSX Installation notes

...there's now new stuff, with a more complex install.
Can we update the docs/OSX_Installation.md file with OSX Install notes?

Request sample is showing wrong host

I'm seeing localhost:3000 instead of services.irras.in.
Oh. It's because node is actually running on port 3000, and IIS is forwarding requests from services.irras.in to it. So it's actually working as desired. But there should be some override in settings to use if you prefer to show a different host/port.

Warn users when SRID is 0

...if this is the case, then some of the operations involving transforms will not function properly.

Validate functions referenced in GP files

If a function is used, check to make sure it exists in the DB. (perhaps) if it doesn't exist, offer to create it for the user. ("Function doesn't exist in this database. Would you like to create it?")

TopoJSON Support

Allow users to create TopoJSON files for entire PostGIS tables.

Update README to include the nuances for deploying to an AWS EC2 server and other!

The Chubbs Spatial Server deployment instructions are now a bit vague. Update it especially to 1) include the nuances for deploying to AWS EC2 machines 2) On Windows, creating a windows service 3) On Linux, creating long-lasting sessions that won't time out ... and more!!! This will help team members adopt this platform for more internal projects.

More TopoJSON support

Let users query their tables like normal from the table_query REST endpoint. After their results come back, offer a button to click to convert their results to TopoJSON. That way, you can still narrow down your features with a where clause AND get TopoJSON.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.