GithubHelp home page GithubHelp logo

koopjs / koop Goto Github PK

View Code? Open in Web Editor NEW
654.0 654.0 125.0 15.5 MB

Transform, query, and download geospatial data on the web.

Home Page: http://koopjs.github.io

License: Other

JavaScript 99.94% Shell 0.03% Dockerfile 0.04%
api arcgis arcgishub data-management etl feature-service geojson geojson-features geospatial geospatial-data gis hacktoberfest nodejs server spatial

koop's People

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

koop's Issues

research a better way to include custom API providers

Everything cannot be in master or in the same repo. We need to establish a best practice for writing providers and having them included into the code base upon a deployment of koop.

Thoughts:

use npm as a way to install a provider
use configurable grunt tasks
use git submodules?

Build fails due to problem with node-canvas dependency

git clone https://github.com/Esri/koop.git
cd koop
npm i

yields....

npm http GET https://api.github.com/repos/chelm/Terraformer/tarball/master
npm http GET https://registry.npmjs.org/nodetiles-core/0.0.3
npm http 304 https://registry.npmjs.org/nodetiles-core/0.0.3
npm http 200 https://api.github.com/repos/chelm/Terraformer/tarball/master
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/proj4js
npm http GET https://registry.npmjs.org/canvas
npm http GET https://registry.npmjs.org/proj4js-defs
npm http GET https://registry.npmjs.org/carto
npm http GET https://github.com/yuletide/node-shp/tarball/master
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/canvas
npm http 304 https://registry.npmjs.org/proj4js
npm http 304 https://registry.npmjs.org/proj4js-defs
npm http 304 https://registry.npmjs.org/carto
npm http 200 https://github.com/yuletide/node-shp/tarball/master
npm WARN engine [email protected]: wanted: {"node":">=0.6.x","npm":"1.1.x"} (current: {"node":"v0.10.25","npm":"1.3.26"})
npm WARN engine [email protected]: wanted: {"node":">=0.6","npm":"~1.2.0"} (current: {"node":"v0.10.25","npm":"1.3.26"})

> [email protected] install /Users/daniel/dev/ext/koop/node_modules/nodetiles-core/node_modules/canvas
> node-gyp rebuild

Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0.
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/daniel/.nvm/v0.10.25/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Darwin 13.0.0
gyp ERR! command "node" "/Users/daniel/.nvm/v0.10.25/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/daniel/dev/ext/koop/node_modules/nodetiles-core/node_modules/canvas
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/mapnik-reference
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/xml2js
npm http GET https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/xml2js
npm http 304 https://registry.npmjs.org/mapnik-reference
npm http 304 https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/sax
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/sax
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/minimist
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the canvas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls canvas
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/Users/daniel/.nvm/v0.10.25/bin/npm" "i"
npm ERR! cwd /Users/daniel/dev/ext/koop
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.26
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/daniel/dev/ext/koop/npm-debug.log
npm ERR! not ok code 0

Investigate a clean worker structure for heavy data operations

Both #45 and #46 will need to scale cleanly so we need to understand the bet route for queueing tasks for data retrieval and data conversion.

Previoulsy we've used ZeroMQ to handling scaling to many workers. This task will explore that as an option and make sure its a valid solution.

Support data exports into various geo formats

Koop should be able to access a FeatureService layer, get all its data (#45), and convert it features into the following formats:

  • kml
  • csv
  • geojson
  • shapefile

Doing this involves wrapping calls to ogr2ogr from javascript via a child process. Some thought needs to be put into using a worker / queue system to support many requests at once.

add support for utfgrid tile json

Utfgrid is super slick and has a direct friend in koop's png tile support. Koop should also provide utfgrid endpoint for clients that support utfgrid+tiles

Improve caching

Right now we simple serialize json into an object.

We should be staching data in a persistent store and checking for file updates on github or gists to wipe.

Support for ElasticSearch feature store backend

Users are experimenting with storing large quantity of features (1m+) in ElasticSearch in order to have fast, dynamic, spatial queries.

They would like to use the Esri JS API to visualize these features. So Koop connecting to ElasticSearch would be valuable. These requests should be sub-second with gridded queries.

add async queues

Right now we touch the features arrays a lot, this blocks node and impact performance. We need to be queuing filters and processing them async if possible.

Add Favicon

Currently just using the "Sails" favicon. I would suggest making a simple Koop (or esri) favicon instead.

Add a config option to write files to s3 buckets

This involves a refactor of the filesystem methods in various controllers and models to all call a helper class that can be configured at startup to write to either the filesystem or s3 (or some other place down the road).

ability to register API providers

APIs like ArcGIS online have the aiblity to be deployed in any place. Users of koop should be able register an arcgis online endpoint and reference item ids.

The same goes for any instance of an API that can be deployed to different servers / orgs. This holds true for things like geocommons.

POST to koop..com/ { :type } /register -> { host: 'http://...' }
-> return :ID

Also going to /:type should list registered provider id and hosts

make everything streams

Everything should be operating on node streams, this will improve performance and will allow better chaining of filter processes.

Add support for Tile output

Add support for /z/x/y.png Tile output from a Koop endpoint. By default these would be simple styling - blue dots or blue polygons.

Additionally, it would be useful to reference the URL to a CartoCSS file or other styling that could be dynamically applied for these tiles.

By having this defined at Query time it would permit a user to load data from a third-party but apply their own personal style.

flesh out statistics support

set supportStats to true and return stats on requests with outStatistics defined (also accepts post reqs for stat calls...)

Large FeatureService pagination

We need to support accessing large feature services in Koop. Or rather we need to treat featureservices that exceed the maxRecordCount as single entities so we can support data exports.

This task includes:

  • making id only requests first and checking the size of the data
  • building a series of request tasks for getting pages of features
  • combining the data into a one set of features
  • returning all the data to the request

Replace MongoDB with PostGIS

To support current and future needs for geoprocessing and geometry based selection Koop should be using PostGIS. Mongo is great for simply adding and retrieving data much like a simple json cache, but as soon as Koop needs to rely on subsetting data directly from its DB then mongo really falls short in terms of polygon intersection / bbox selection.

All geospatial filters and selections should pass to the database where koop caches data.

Error when starting "node app.js"

I receive an error when I try to start with "node app.js".
Sails loads successfully and I get the information how to start on port: 1337 but in the end there is something wrong with the Redis connection to 127.0.0.1:6379.
The redis db comes with the project?

I use nodejs 0.10 on win2008 server x64.

Waiting...
verbose: Binding route :: get /gist/:id/FeatureServer/:layer/:method
verbose: Binding route :: get /gist/:id/FeatureServer/:layer
verbose: Binding route :: get /gist/:id/FeatureServer
verbose: Binding route :: get /gist/:id
verbose: Binding route :: get /gist/raw/:id
verbose: Binding route :: get /gist/raw/:id/:layer
verbose: Binding route :: get /gist
verbose: Binding route :: get /gist/:id/preview
verbose: Binding route :: get /github/
verbose: Binding route :: get /github/:user
verbose: Binding route :: get /github/:user/:repo
verbose: Binding route :: get /github/:user/:repo/FeatureServer
verbose: Binding route :: get /github/:user/:repo/FeatureServer/:layer
verbose: Binding route :: get /github/:user/:repo/FeatureServer/:layer/:method
verbose: Binding route :: get /github/:user/:repo/:file
verbose: Binding route :: get /github/:user/:repo/:file/FeatureServer
verbose: Binding route :: get /github/:user/:repo/:file/FeatureServer/:layer
verbose: Binding route :: get /github/:user/:repo/:file/FeatureServer/:layer/:method
verbose: Binding route :: get /github/:user/:repo/:file/preview
verbose: Binding route :: get /sample
debug: Lowering sails...
verbose: Sent kill signal to grunt child process...

events.js:72
throw er; // Unhandled 'error' event
^
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
at RedisClient.on_error (C:\Users\Administrator\Documents\GitHub\koop\node_modules\redis\index.js:163:24)
at Socket. (C:\Users\Administrator\Documents\GitHub\koop\node_modules\redis\index.js:86:14)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickDomainCallback (node.js:459:13)

Use terraformer geostores

This can be used to quickly index and access geometry. Should be able to cache indexes and stores into a db of some sort.

Would be awesome to come up with a postgis or mongo store too.

fix sql parsing

Our current parser doesnt work with the arcgis rest spec's sql

add home page with docs

dont make people have to access to github to see simple docs. makes it accessible out of esri

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.