Revision 4182 org.gvsig.raster.gdal/trunk/org.gvsig.raster.gdal/org.gvsig.raster.gdal.io/src/main/java/org/gvsig/jgdal/GdalDriver.java
GdalDriver.java | ||
---|---|---|
57 | 57 |
* @return Gdal Dataset de la im?gen de salida |
58 | 58 |
* @throws GdalException |
59 | 59 |
*/ |
60 |
public Gdal createCopy(String file, Gdal src, boolean bstrict) throws GdalException {
|
|
60 |
public GdalDataset createCopy(String file, GdalDataset src, boolean bstrict) throws GdalException {
|
|
61 | 61 |
String path = file.substring(0, file.lastIndexOf(File.separator)); |
62 | 62 |
File f = new File(path); |
63 | 63 |
if (!f.canWrite()) |
... | ... | |
76 | 76 |
// if (ptr == 0) |
77 | 77 |
// throw new GdalException("No se ha podido crear la copia"); |
78 | 78 |
|
79 |
return new Gdal(copyDataset); |
|
79 |
return new GdalDataset(copyDataset);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
|
... | ... | |
112 | 112 |
* @return Gdal Dataset de la im?gen de salida |
113 | 113 |
* @throws GdalException |
114 | 114 |
*/ |
115 |
public Gdal createCopy(String file, Gdal src, boolean bstrict, String[] params) throws GdalException {
|
|
115 |
public GdalDataset createCopy(String file, GdalDataset src, boolean bstrict, String[] params) throws GdalException {
|
|
116 | 116 |
String path = file.substring(0, file.lastIndexOf(File.separator)); |
117 | 117 |
File f = new File(path); |
118 | 118 |
if (!f.canWrite()) |
... | ... | |
131 | 131 |
if (copyDataset == null) |
132 | 132 |
throw new GdalException("No se ha podido crear la copia"); |
133 | 133 |
|
134 |
return new Gdal(copyDataset); |
|
134 |
return new GdalDataset(copyDataset);
|
|
135 | 135 |
} |
136 | 136 |
|
137 | 137 |
|
... | ... | |
145 | 145 |
* @param nType Tipo de raster |
146 | 146 |
* @param params lista de par?metros especificos del driver |
147 | 147 |
*/ |
148 |
public Gdal create(String filename, int nXSize, int nYSize, int nBands, int nType, String[] params) throws GdalException { |
|
148 |
public GdalDataset create(String filename, int nXSize, int nYSize, int nBands, int nType, String[] params) throws GdalException {
|
|
149 | 149 |
// if (cPtr == 0) |
150 | 150 |
// throw new GdalException("No se ha podido acceder al archivo."); |
151 | 151 |
|
... | ... | |
153 | 153 |
String value = new String(ptext, Charset.forName("UTF-8")); |
154 | 154 |
Dataset data = this.driver.Create(value, nXSize, nYSize, nBands, nType, StringArrayToVector(params)); |
155 | 155 |
|
156 |
return new Gdal(data); |
|
156 |
return new GdalDataset(data);
|
|
157 | 157 |
} |
158 | 158 |
|
159 | 159 |
private static Vector StringArrayToVector(String[] options) |
Also available in: Unified diff