Add to_h method to location