public Node(System.IO.Stream stream)
{
int id;
double lat,lon;
try{
byte[] array = new byte[sizeof(int) + sizeof(double) * 2];
stream.Read(array, 0, array.Length);
// ByteBuffer buffer = new ByteBuffer(array);
MemoryStream ms = new MemoryStream(array);
BinaryReader buffer = new BinaryReader(ms);
id = buffer.ReadInt32();
lat = buffer.ReadDouble();
lon = buffer.ReadDouble();
// BinaryReader by = new BinaryReader(stream);
//id = by.ReadInt32();
//lat = by.ReadDouble();
//lon = by.ReadDouble();
}
catch(Exception e)
{
id = 0;
lat = 0.0;
lon = 0.0;
}
this.id = id;
this.lat = lat;
this.lon = lon;
}