Process_ShardData( );
break;
- case @"--scan":
+ case @"--shards":
Scan_ShardData( );
break;
+ case @"--points":
+ Scan_PointsData( );
+ break;
+
default:
Console.WriteLine("Unrecognized Command: {0}", command);
break;
}
+
+ private static void Scan_PointsData( )
+ {
+ try {
+ var eoiFile = new FileInfo(Path.Combine(mapPath, @"eoi_binary"));
+ var poiFile = new FileInfo(Path.Combine(mapPath, @"poi_binary"));
+ uint entities = 0, points = 0;
+
+ if (eoiFile.Exists) {
+ using (var eoiStream = eoiFile.OpenRead( )) {
+
+ EntitiesOfInterest eoiData = Serializer.Deserialize<EntitiesOfInterest>(eoiStream);
+
+ foreach (var entry in eoiData) {
+ Console.WriteLine("#{0}, [{1}], '{2}', {3}",
+ entry.EntityId,
+ entry.Location,
+ entry.Name,
+ entry.Timestamp.ToUniversalTime( )
+ );
+ entities++;
+ }
+ Console.WriteLine("Entities Of Interest: {0}", entities);
+ }
+
+
+ if (poiFile.Exists) {
+ using (var poiStream = poiFile.OpenRead( )) {
+
+ PointsOfInterest poiData = Serializer.Deserialize<PointsOfInterest>(poiStream);
+ foreach (var entry in poiData) {
+ Console.WriteLine("[{0}], {1}, {2}, {3}",
+ entry.Location,
+ entry.Name,
+ entry.Destination,
+ entry.Timestamp.ToUniversalTime( )
+ );
+ points++;
+ }
+ }
+ Console.WriteLine("Points Of Interest: {0}", points);
+ }
+
+ }
+ } catch (Exception uhOh) {
+ Console.WriteLine(uhOh);
+ }
+
+ }
+
private static void Scan_ShardData( )
{
var shardsDir = new DirectoryInfo(Path.Combine(mapPath, _chunkPath));