Querying Moving Objects Detected by Sensor Networks