| | |
| | | // double rotationX = transform[2]; double rotationY = transform[4] |
| | | double minX = transform[0], pixelWidth = transform[1], maxY = transform[3], pixelHeight = transform[5]; |
| | | |
| | | double[] bounds = new double[6]; |
| | | double[] bounds = new double[4]; |
| | | polyline.GetEnvelope(bounds); |
| | | double startX = bounds[0], endX = bounds[1], startY = bounds[2], endY = bounds[3]; |
| | | |
| | |
| | | double[] transform = ds.GetGeoTransform(); |
| | | // double rotationX = transform[2]; double rotationY = transform[4] |
| | | double minX = transform[0], pixelWidth = transform[1], maxY = transform[3], pixelHeight = transform[5]; |
| | | double[] env = new double[6]; |
| | | double[] env = new double[4]; |
| | | polygon.GetEnvelope(env); |
| | | |
| | | int xMinPixel = (int) Math.floor((env[0] - minX) / pixelWidth); |
| | | int yMinPixel = (int) Math.floor((maxY - env[3]) / Math.abs(pixelHeight)); |
| | | int yMinPixel = (int) Math.floor((maxY - env[2]) / Math.abs(pixelHeight)); |
| | | int xMaxPixel = (int) Math.floor((env[1] - minX) / pixelWidth); |
| | | int yMaxPixel = (int) Math.floor((maxY - env[2]) / Math.abs(pixelHeight)); |
| | | int yMaxPixel = (int) Math.floor((maxY - env[3]) / Math.abs(pixelHeight)); |
| | | |
| | | int bandCount = ds.getRasterCount(); |
| | | int geoWidth = Math.abs(xMaxPixel - xMinPixel); |