Multi-thread analysis of taxi GPS trace to extract taxi contacts.
java --classpath <your-class-dir> fr.insalyon.citi.trace.taxi.LaunchContactTraceGenerator <taxi-trace-source-dir> <contact-trace-dest-file>
Note: for large trace analysis, JVM initial and max memory allocation parameters are strongly recommended to modify (e.g. -Xms1024m -Xmx16384m
)
Extraction of a tiny part of the Shanghai taxi trace
java fr.insalyon.citi.trace.taxi.LaunchContactTraceGenerator ./tests/shanghai-taxi-070218-example ./tests/shanghai-taxi-070218-contacts-example
The contact parameters can can customized in Trace
class
Trace.DISTANCE_RANGE = 250; // meters
Trace.TIME_RANGE = 30; // seconds
Here, a contact exists if two taxis are in 250 meters range within the last 30s.
For long running execution, a progress bar can be displayed in Trace
class.
Trace.VERBOSE = true; //default
The distance between two GPS coordinates can be computed in Coordinate
class
according to three metrics:
public double distance(Coordinate coordinate) {
return distanceHaversine(coordinate);
}
// Accuracy: -, Efficiency: ~, Order magnitude: 1
public double distanceGeometric(Coordinate coordinate);
// Accuracy: +, Efficiency: +, Order magnitude: 0.5
public double distanceHaversine(Coordinate coordinate);
// Accuracy: ++, Efficiency: --, Order magnitude: 2
public double distanceVincenty (Coordinate coordinate);
The contact trace computation can be modified in Trace
class to be mono-thread or multi-thread
public void generate() {
generateMultiThread();
// generateSingleThread();
}
This project is being developed as part of the research activities of the DynaMid group of the CITI Laboratory at INSA-Lyon, in collaboration with the CoopIS Lab & Network Lab, CS Department, SEIEE at SJTU.
Frédéric Le Mouël (@flemouel), Guanghsuo Chen
Copyright 2013-2014 Institut National des Sciences Appliquées de Lyon (INSA-Lyon)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.