Transform, query, & download geospatial data on the web.
Koop is Express middleware for simplifying geographic data consumption across many different providers and in many different formats.
Koop provides a flexible server for dynamically transforming 3rd party data sources (APIs) into Feature Services and standard geographic data formats (GeoJSON, Shapefile, KML, CSV). This project is meant to provide a versatile platform for experimenting and working with various datasets within the global geospatial data ecosystem. Koop aims to allow easier access to any open data API and to make third party data easier to use within the realm of Esri's geospatial web products.
Visit the demo at http://koop.dc.esri.com.
Koop requires Node.js version 0.10.x or greater to run on your server or local machine.
Koop uses a local, in-memory object for caching data by default. If you want persistent and performant data caching, Koop needs access to a spatial database. We use and recommend PostGIS in production, but there is also experimental support for ElasticSearch.
See the Caches section in the documentation for more information.
Koop should be installed as a dependency in a Node.js project like so:
npm install koop --save
Make sure the PYTHON
environmental variable is set:
SET PYTHON = C:\Python27\python\python.exe
Koop works as Express middleware. To use Koop you need a combination of Express, Koop, and Koop providers. Once Koop is in a project, you can add a Koop provider like koop-github
:
npm install koop-github --save
For a complete list of providers, see the documentation.
Once you've installed koop and chosen a provider to work with you need to register the provider with Koop.
// create a config object that tells koop where to write data and what db to use
var config = {
"data_dir": "/usr/local/koop/",
"db": {
"conn": "postgres://localhost/koopdev"
}
};
// pass the config to koop
var koop = require('koop')(config);
// require and register the provider to bind its routes and handlers
var github = require('koop-github');
koop.register(github);
// create an express app
var app = require('express')();
// add koop middleware to the express app
app.use(koop);
// start the express server
app.listen(process.env.PORT || 1337, function () {
console.log('Listening at http://localhost:%d/', this.address().port);
});
Read more about creating a new provider or modifying an existing provider here.
See ROADMAP.md to view the Koop project roadmap.
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.