You drop. We chop.
Drop 'n Chop tests the idea that GIS operations can be done in the browser, without a server. This application is currently a proof of concept testing the capabilities of a user uploading files, executing GIS operations, creating new spatial data layers, and downloading the new data. Here's an example of it running a buffer
and union
operation in the same process.
Well now, that's a fantastic question. We're using Turf.js, a javascript library that can run spatial operations on GeoJSON objects and returns new objects for usage.
Sure have! What happens when you drag and drop a file into your browser typically involves a server to handle the files. This project attempts to bypass the need for a server by using the HTML5 File Reader implementation to handle the file and convert into a usable object for Turf.
No! Right now this project is an implementation of some of Turf's geoprocessing functions and doesn't really allow for much user interaction yet. If you're interested in expanding the functionality, let's talk in the issues.
That's good enough for us! You should stay tuned for any developments. Maybe we can make a completely self-contained GIS in the browser using concepts like this.
We're not much of a metaphor group here at CUGOS, but if you're watching the sunset just remember that it's rising somewhere else.
Again, metaphors aren't our thing but we're looking at the following:
- Convert
.shp
files to.json
in the browser, without a server. - Allow the user to specify which Turf functions they'd like to run against their files.
- Discuss the versatility of
<a href="data: ...">
as the main download constructor. - Develop an alpha prototype that allows users to upload multiple files, choose which they'd like to edit, and do some sweet GIS stuff, without downloading a single piece of software or writing any code.
Working on Drop-n-Chop requires a few tools. We are using Grunt for our task running and build process. You can install the Grunt CLI with npm
:
npm install -g grunt-cli
Once that has been installed successfully, you can clone the repository or your own fork and cd
into the directory.
git clone [email protected]:YOUR-GITHUB-USERNAME/drop-n-chop.git
cd drop-n-chop
Install development dependencies with npm
npm install
Install bower components
bower install
And run a simple server with
python -m SimpleHTTPServer
You should now be able to access the application at http://localhost:8000/app