@Override
public CoordinateSequence get(List<Long> ids) {
Preconditions.checkNotNull(ids, "ids is null");
OSMCoordinateSequence cs = CSFAC.create(ids.size());
DatabaseEntry key = new DatabaseEntry();
DatabaseEntry data = new DatabaseEntry();
for (int index = 0; index < ids.size(); index++) {
Long nodeID = ids.get(index);
LongBinding.longToEntry(nodeID.longValue(), key);
OperationStatus status = database.get(null, key, data, LockMode.DEFAULT);
if (!OperationStatus.SUCCESS.equals(status)) {
String msg = String.format("node id %s not found", nodeID);
throw new IllegalArgumentException(msg);
}
int[] c = CoordinateBinding.entryToCoord(data);
cs.setOrdinate(index, 0, c[0]);
cs.setOrdinate(index, 1, c[1]);
}
return cs;
}