Btw, I'm eager to (as in, I can do it myself) move this class to GeoTools, and put it along the other standard visitors. Rationale: we can make a version optimized for databases (like the other visitors) that runs something like "select max(att) where att < reference union select min(att) where att >= reference" to get the nearest value without having to read all the values from the database. As you said this should also help in the future to add a "nearest" behavior to the wms dimension calls.