straup / ws-clustr

ws-clustr is a bare-bones web interface, written in PHP, to the command-line Clustr application.

This URL has Read+Write access

straup (author)
Sun Apr 12 08:57:28 -0700 2009
commit  c942627a0c8c888dbd62d1f3b689fef8537a36bc
tree    bfa8cfa8b4cecb58eb6395653e60fea687553c5f
parent  bb795ad6e0f8884a56dcad35c6bc3309883c941e
name age message
file README Sun Apr 12 08:57:28 -0700 2009 moved MFS details in to a separate file [straup]
file index.php Loading commit data...
README
Start here:

  http://code.flickr.com/blog/2009/04/07/the-only-question-left-is/
  http://github.com/straup/py-wsclustr/tree/master

--

ws-clustr

ws-clustr is a bare-bones web interface, written in PHP, to the command-line
Clustr application.

How does it work?

To generate a shapefile using ws-clustr simply send a binary (HTTP) POST
containing the points you want to clustrize. ws-clustr will send back a
compressed shapefile! For example:

$> curl --data-binary '@/path/to/points.txt' http://example.com/ws-clustr/ >
~/path/to/clustr.tar.gz

Details

The file you pass should be formatted as <tag> <lon> <lat> , where tag is any
unique string.

You may also pass the following HTTP headers with your request:

    * x-clustr-alpha.Specify the size of the alpha number to run Clustr
      with. The default value is 0.01

    * x-clustr-name. Specify the name of the output file to create. Valid names
      may only contain the characters a-z (case-insensitive), 0-9 and
      dashes. The default value is clustr-the current process ID

    * x-clustr-cache. Use this header to ask ws-clustr to look for, and use, a
      previously cached version of the points file you want to clustr (rather than
      sending the whole thing to the server again and again). The value should be:
      "clustr-" + the value of md5sum(/path/to/points.txt). If the cache file is not
      found on the server ws-clustr will return an HTTP 404 error. It is left to
      client applications to decide what to do in those circumstances. (It is also
      left to people running a ws-clustr to periodically clean out their system's tmp
      directory where the cache files are stored.)

That's it.

There are no ponies. No.