Monday, 24 March 2008

Time for JSTS?

Like a lot of stuff, spatial functionality is moving out into the browser. Signs of the times:
  • proj4js
  • GeoJSON
  • This comment: "The DOJO client-side libraries provide support for performing some simple spatial operations like ‘intersection’ on the client-side." (Although I haven't been able to find this functionality in a quick browse of Dojo - can anyone confirm this?)
Seems like maybe the time is ripe for a port of JTS to JSTS - the Javascript Topology Suite.

Take it away, someone - I'm too busy!

5 comments:

  1. well, i dont know about dojo, but intersection is available in OpenLayers trunk!

    ReplyDelete
  2. Thanks, Brent. Looks like a nice clean implementation.

    Just a note, that's "intersects" - the spatial predicate. "intersection" is a whole bunch more complex to implement.

    And this implementation is O(n^2) - which is ok as long as the geometries are fairly small (which is probably the usual situation in the browser - or is it?)

    ReplyDelete
  3. No, its definitely not in Dojo itself.

    Dojo does provide some pretty cool tools which make handling and processing data a pile easier (dojo.data and functional constructs are two examples).

    On the geometry-size thing - we routinely handle and edit 4,000 point lines & polygons in-browser. But the browser vector implementations (SVG/VML/etc) still have further to go.

    ReplyDelete
  4. Or, to fit into the new Google App Engine, a port to Python.

    ReplyDelete
  5. Durn it - why can't Google just use Java like the rest of us? 8^)

    I guess a PyTS would make Sean Gillies happy...

    I wonder what the closest project that has been done is... Would be interesting to see someone's take on a Geometry model in Python

    ReplyDelete