Friday, January 23rd, 2009

Spatial Query: handling spatial maths with flair

Category: JavaScript, Library

Chris Zelenak has created Spacial Query a very nice library for spatial math. He told us:

I recently wrote up a library to help me with operations on polygons, and ended up adding some stuff for dealing with matrix, vector and latitude longitude primitives as well. The name is taken from the JQuery style chaining in the library, that I added just because, well…I like JQuery, and I like being able to do things like:


  1. $ll([latitude, longitude]).vector().project_onto([wsg84x, wsg84y, wsg84z]).latlng()

It adds a series of $ methods to the global namespace – $p for polygons, $v for vectors, $m for matrices and $ll for latitude/longitude coordinates.

Most vector and matrix operations support calculations to any dimension size.

In cases where they are not supported, one of the two following cases will arise:

  • The function will be named _2d or _3d to indicate what dimension the operated data should be in
  • The function will throw an error stating that the general case solution has not been implemented yet. (Matrix inversion, for example)

Posted by Dion Almaer at 6:23 am
1 Comment

3.1 rating from 20 votes

1 Comment »

Comments feed TrackBack URI

Also that things can be useful for PhoneGap… thank you for the news…
IMoogle developer Team.

Comment by nunziofiore — January 23, 2009

Leave a comment

You must be logged in to post a comment.