Mercurial > dive4elements > gnv-client
comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/RasterObject.java @ 549:0dcf068fb552
Added method to figure out interpolation method for a given string in raster tiles.
geo-backend/trunk@521 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 09 Jan 2010 16:40:19 +0000 |
parents | ccd976fc0f7b |
children | 84ba7cbff791 |
comparison
equal
deleted
inserted
replaced
548:ccd976fc0f7b | 549:0dcf068fb552 |
---|---|
170 int posX = Math.min(tileWidth-1, (int)Math.round(px)); | 170 int posX = Math.min(tileWidth-1, (int)Math.round(px)); |
171 int posY = Math.min(tileHeight-1, (int)Math.round(py)); | 171 int posY = Math.min(tileHeight-1, (int)Math.round(py)); |
172 | 172 |
173 return get(posX, posY); | 173 return get(posX, posY); |
174 } | 174 } |
175 | |
176 public static final int getInterpolationType(String key) { | |
177 if (key == null || (key = key.trim().toLowerCase()).length() == 0) { | |
178 return NEAREST_NEIGHBOR; | |
179 } | |
180 | |
181 if ("bilinear".equals(key)) { | |
182 return BILINEAR; | |
183 } | |
184 | |
185 return NEAREST_NEIGHBOR; | |
186 } | |
175 } | 187 } |