Revision 10988 branches/v10/libraries/libjni-gdal/src/es/gva/cit/jgdal/GdalDriver.java
GdalDriver.java | ||
---|---|---|
129 | 129 |
|
130 | 130 |
public Gdal createCopy( String file, Gdal src, boolean bstrict )throws GdalException{ |
131 | 131 |
|
132 |
if(cPtr <= 0) |
|
133 |
throw new GdalException("Error en createCopy(). La llamada Open no tuvo exito"); |
|
134 |
|
|
135 | 132 |
long ptr; |
136 | 133 |
if(bstrict) |
137 | 134 |
ptr = createCopyNat(cPtr,file,src.getPtro(),1); |
138 | 135 |
else |
139 | 136 |
ptr = createCopyNat(cPtr,file,src.getPtro(),0); |
140 | 137 |
|
141 |
if (ptr<0) |
|
142 |
throw new GdalException("Error en createCopy(). No se ha podido obtener el dataset."); |
|
143 |
else |
|
144 |
return (new Gdal(ptr)); |
|
138 |
return (new Gdal(ptr)); |
|
145 | 139 |
} |
146 | 140 |
|
147 | 141 |
|
... | ... | |
183 | 177 |
|
184 | 178 |
long papszOptions=-1; |
185 | 179 |
|
186 |
if(cPtr <= 0) |
|
187 |
throw new GdalException("Error en createCopy(). La llamada Open no tuvo exito"); |
|
188 |
|
|
189 | 180 |
long ptr; |
190 | 181 |
if(bstrict) |
191 | 182 |
ptr = createCopyParamsNat(cPtr, file, src.getPtro(), 1, selectOptions(params)); |
192 | 183 |
else |
193 | 184 |
ptr = createCopyParamsNat(cPtr, file, src.getPtro(), 0, selectOptions(params)); |
194 | 185 |
|
195 |
if (ptr<0) |
|
196 |
throw new GdalException("Error en createCopy(). No se ha podido obtener el dataset."); |
|
197 |
else |
|
198 |
return (new Gdal(ptr)); |
|
186 |
return (new Gdal(ptr)); |
|
199 | 187 |
} |
200 | 188 |
|
201 | 189 |
|
... | ... | |
213 | 201 |
public Gdal create(String filename, int nXSize, int nYSize, int nBands, int nType, String[] params)throws GdalException{ |
214 | 202 |
|
215 | 203 |
long papszOptions=-1; |
216 |
|
|
217 |
if(cPtr <= 0) |
|
218 |
throw new GdalException("Error en create. La llamada Open no tuvo exito"); |
|
219 |
|
|
204 |
|
|
220 | 205 |
long ptr = createNat(cPtr, filename, nXSize, nYSize, nBands, nType, selectOptions(params)); |
221 | 206 |
|
222 |
if (ptr<0) |
|
223 |
throw new GdalException("Error en createCopy(). No se ha podido obtener el dataset."); |
|
224 |
else |
|
225 |
return (new Gdal(ptr)); |
|
207 |
return (new Gdal(ptr)); |
|
226 | 208 |
|
227 | 209 |
} |
228 | 210 |
|
Also available in: Unified diff