Revision 20871 trunk/libraries/libRaster/src/org/gvsig/raster/grid/GridInterpolated.java
GridInterpolated.java | ||
---|---|---|
44 | 44 |
public static final int INTERPOLATION_BSpline = BufferInterpolation.INTERPOLATION_BSpline; |
45 | 45 |
|
46 | 46 |
double m_dXMin , m_dYMax; //coordinates of the layer, not the window |
47 |
double m_dCellSize; //cellsize of the layer, not the window |
|
47 |
double m_dCellSizeX; //cellsize of the layer, not the window |
|
48 |
double m_dCellSizeY; //cellsize of the layer, not the window |
|
48 | 49 |
int m_iInterpolationMethod = INTERPOLATION_BSpline; |
49 | 50 |
|
50 | 51 |
/** |
... | ... | |
63 | 64 |
m_dXMin = layerExtent.minX(); |
64 | 65 |
m_dYMax = layerExtent.maxY(); |
65 | 66 |
|
66 |
m_dCellSize = layerExtent.getCellSize(); |
|
67 |
m_dCellSizeX = layerExtent.getCellSizeX(); |
|
68 |
m_dCellSizeY = layerExtent.getCellSizeY(); |
|
67 | 69 |
} |
68 | 70 |
|
69 | 71 |
/** |
... | ... | |
89 | 91 |
m_dXMin = bufferFactory.getDataSource().getExtent().minX(); |
90 | 92 |
m_dYMax = bufferFactory.getDataSource().getExtent().maxY(); |
91 | 93 |
|
92 |
m_dCellSize = bufferFactory.getDataSource().getCellSize(); |
|
94 |
m_dCellSizeX = bufferFactory.getDataSource().getAffineTransform().getScaleX(); |
|
95 |
m_dCellSizeY = bufferFactory.getDataSource().getAffineTransform().getScaleY(); |
|
93 | 96 |
|
94 | 97 |
bufferFactory.setDrawableBands(bands); |
95 | 98 |
} |
... | ... | |
167 | 170 |
double dx, dy; |
168 | 171 |
double dValue; |
169 | 172 |
|
170 |
x = (int) Math.floor(xPosition = (xPosition - m_dXMin) / m_dCellSize); |
|
171 |
y = (int)Math.floor(yPosition = ( m_dYMax-yPosition) / m_dCellSize); |
|
173 |
x = (int) Math.floor(xPosition = (xPosition - m_dXMin) / m_dCellSizeX);
|
|
174 |
y = (int)Math.floor(yPosition = ( m_dYMax-yPosition) / m_dCellSizeY);
|
|
172 | 175 |
|
173 | 176 |
dValue = _getCellValueInLayerCoords(x,y); |
174 | 177 |
|
Also available in: Unified diff