coordinate encoder