Revision 37962 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/io/GdalNative.java

View differences:

GdalNative.java
821 821

  
822 822
		nWidth = (nWidth * currentFullWidth) / width;
823 823
		nHeight = (nHeight * currentFullHeight) / height;
824
		x = (x * currentFullWidth) / width;
825
		y = (y * currentFullHeight) / height;
824
		double auxX = (double) x / width; // Para evitar el overflow (no entra en un entero con ficheros grandes)
825
		double auxY = (double) y / height; // Para evitar el overflow (no entra en un entero con ficheros grandes)
826
		x = (int) (auxX * currentFullWidth); //(x * currentFullWidth) / width;
827
		y = (int) (auxY * currentFullHeight); //(y * currentFullHeight) / height;
826 828

  
827 829
		int[] stpBuffer = new int[]{0, 0 , buf.getWidth(), buf.getHeight()};
828 830
		//Si el buffer no se ajusta al extent entonces calculamos en que posici?n comienza a escribirse dentro del buffer

Also available in: Unified diff