wavded/ogre — pull request #15 by rclark (2013-07-03 05:01:21+00:00)
Title: Allow POST to grab GeoJSON from a remote URL

Allows users to POST to `/convertJson`....

{ "jsonUrl": "http://server.com/path/to/geojson.file" }

The goal here is to be able to use Ogre to provide a simple way to download shapefiles from GeoJSON hosted on Github. You already did all the work!

I just wrote a middleware function that grabs the remote file and passes it in as `req.body.json`. After that it just continues on and does the same things as the already-supported POST request.

I also had to futz with the temporary directories a bit. On my Mac I had to adjust the `/tmp/` to something that existed and I had write permission to. Might be nice to pull that out as some kind of config parameter.