My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members

STCode is tiny library for spatio-temporal indexing by using string codes. It uses oct-tree and trie-based structure. It is deigned for data streams and for their effective online simplification.

Example:

 double lat  = 50.12;  //latitude
 double lon  = 14.3;   //longitude
 String date = "2001-07-04 12:08:56.23"; //time
 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 Date d = df.parse(date);
 	
 /**  * Date is split to the minutes within two weeks 
  * and start of this two weeks period from first Monday in 1970 
  */		
 STCodeTime sttime = new STCodeTime(d);	  	
 Cube q1 = new Cube(lat, lon, (new STCodeTime(d)).getMinutes());
 	
 /** Print out STCode String */
 System.out.println(q1.getCode());
 		
 /** Construct the Cube from the STCode String */
 Cube q2 = new Cube(q1.getCode());
 

The code look like this: m0Yu:Ws

The default precision (7 characters long String) is about 100m in position and one minute in time. By cutting the last character of the code its precision is decreased four times in each dimension.

Powered by Google Project Hosting