Revision 5436
org.gvsig.raster.tilecache/trunk/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java | ||
---|---|---|
984 | 984 |
// DO nothing |
985 | 985 |
} |
986 | 986 |
|
987 |
@Override |
|
988 |
public String getFullName() { |
|
989 |
return provider.getFullName(); |
|
990 |
} |
|
991 |
|
|
987 | 992 |
} |
org.gvsig.raster.multifile/trunk/org.gvsig.raster.multifile/org.gvsig.raster.multifile.app.multifileclient/src/main/java/org/gvsig/raster/multifile/app/panel/BandSelectorPanel.java | ||
---|---|---|
52 | 52 |
import org.gvsig.raster.fmap.layers.IRasterLayerActions; |
53 | 53 |
import org.gvsig.raster.mainplugin.properties.RasterPropertiesTocMenuEntry; |
54 | 54 |
import org.gvsig.raster.swing.RasterSwingLibrary; |
55 |
import org.slf4j.Logger; |
|
56 |
import org.slf4j.LoggerFactory; |
|
55 | 57 |
|
56 | 58 |
/** |
57 | 59 |
* Selecciona las bandas visibles en un raster. Contiene una tabla con una fila |
... | ... | |
83 | 85 |
private JPanel buttonsPanel = null; |
84 | 86 |
private JComboBox jComboBox = null; |
85 | 87 |
|
88 |
private static final Logger logger = |
|
89 |
LoggerFactory.getLogger(BandSelectorPanel.class); |
|
86 | 90 |
/** |
87 | 91 |
* Constructor to be instantiated from the properties panels |
88 | 92 |
*/ |
... | ... | |
250 | 254 |
|
251 | 255 |
int nbands = dstore.getBandCount(); |
252 | 256 |
for (int i = 0; i < nbands; i++) { |
253 |
File file = new File(dstore.getURIByBand(i)); |
|
257 |
URI uriByBand = dstore.getURIByBand(i); |
|
258 |
String bandName = ""; |
|
259 |
if("FILE".equalsIgnoreCase(uriByBand.getScheme())){ |
|
260 |
File file = new File(uriByBand); |
|
261 |
bandName = file.getName(); |
|
262 |
} else { |
|
263 |
bandName = dstore.getFullName(); |
|
264 |
} |
|
254 | 265 |
|
255 |
String bandName = file.getName(); |
|
256 |
String bandType = ""; |
|
266 |
String bandType = ""; |
|
257 | 267 |
|
258 |
switch (dstore.getDataType()[0]) {
|
|
259 |
case DataBuffer.TYPE_BYTE:
|
|
260 |
bandType = "8U";
|
|
261 |
break;
|
|
262 |
case DataBuffer.TYPE_INT:
|
|
263 |
bandType = "32";
|
|
264 |
break;
|
|
265 |
case DataBuffer.TYPE_DOUBLE:
|
|
266 |
bandType = "64";
|
|
267 |
break;
|
|
268 |
case DataBuffer.TYPE_FLOAT:
|
|
269 |
bandType = "32";
|
|
270 |
break;
|
|
271 |
case DataBuffer.TYPE_SHORT:
|
|
272 |
bandType = "16";
|
|
273 |
break;
|
|
274 |
case DataBuffer.TYPE_USHORT:
|
|
275 |
bandType = "16U";
|
|
276 |
break;
|
|
277 |
case DataBuffer.TYPE_UNDEFINED:
|
|
278 |
bandType = "??";
|
|
279 |
break;
|
|
280 |
}
|
|
268 |
switch (dstore.getDataType()[0]) {
|
|
269 |
case DataBuffer.TYPE_BYTE:
|
|
270 |
bandType = "8U";
|
|
271 |
break;
|
|
272 |
case DataBuffer.TYPE_INT:
|
|
273 |
bandType = "32";
|
|
274 |
break;
|
|
275 |
case DataBuffer.TYPE_DOUBLE:
|
|
276 |
bandType = "64";
|
|
277 |
break;
|
|
278 |
case DataBuffer.TYPE_FLOAT:
|
|
279 |
bandType = "32";
|
|
280 |
break;
|
|
281 |
case DataBuffer.TYPE_SHORT:
|
|
282 |
bandType = "16";
|
|
283 |
break;
|
|
284 |
case DataBuffer.TYPE_USHORT:
|
|
285 |
bandType = "16U";
|
|
286 |
break;
|
|
287 |
case DataBuffer.TYPE_UNDEFINED:
|
|
288 |
bandType = "??";
|
|
289 |
break;
|
|
290 |
}
|
|
281 | 291 |
|
282 |
addBand((i + 1) + " [" + bandType + "] " + bandName);
|
|
292 |
addBand((i + 1) + " [" + bandType + "] " + bandName);
|
|
283 | 293 |
} |
284 | 294 |
|
285 | 295 |
if(fLayer != null) { |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/roi/ROIManagerTocMenuEntry.java | ||
---|---|---|
168 | 168 |
URI[] uriList = ((FLyrRaster)layer).getDataStore().getURIByProvider(); |
169 | 169 |
if(uriList != null && uriList.length > 0) { |
170 | 170 |
URI uri = uriList[0]; |
171 |
return new File(uri).getParentFile(); |
|
171 |
if("FILE".equalsIgnoreCase(uri.getScheme())){ |
|
172 |
return new File(uri).getParentFile(); |
|
173 |
} |
|
172 | 174 |
} |
173 | 175 |
return null; |
174 | 176 |
} |
org.gvsig.raster.tools/trunk/org.gvsig.raster.tools/org.gvsig.raster.tools.app.basic/src/main/java/org/gvsig/raster/tools/app/basic/tool/properties/panel/InfoPanel.java | ||
---|---|---|
31 | 31 |
import javax.swing.JEditorPane; |
32 | 32 |
import javax.swing.JScrollPane; |
33 | 33 |
|
34 |
import org.apache.commons.io.FilenameUtils; |
|
34 | 35 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
35 | 36 |
import org.gvsig.fmap.dal.coverage.RasterManager; |
36 | 37 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
... | ... | |
290 | 291 |
fileSize = filesSize[selectedDataSet]; |
291 | 292 |
|
292 | 293 |
URI[] names = lyr.getDataStore().getURIByProvider(); |
293 |
propiedades += setHTMLBasicProperty(Messages.getText("archivo"), names[selectedDataSet].getPath()); |
|
294 |
URI uri = names[selectedDataSet]; |
|
295 |
if("FILE".equalsIgnoreCase(uri.getScheme())){ |
|
296 |
propiedades += setHTMLBasicProperty(Messages.getText("archivo"), names[selectedDataSet].getPath()); |
|
297 |
} else { |
|
298 |
propiedades += setHTMLBasicProperty(Messages.getText("uri"), names[selectedDataSet].toString()); |
|
299 |
} |
|
294 | 300 |
|
295 | 301 |
propiedades += setHTMLBasicProperty(Messages.getText("size"), rManager.getFileUtils().formatFileSize(fileSize) + " "); |
296 | 302 |
propiedades += setHTMLBasicProperty(Messages.getText("ancho_alto"), lyr.getDataStore().getWidth() + " X " + lyr.getDataStore().getHeight()); |
... | ... | |
503 | 509 |
|
504 | 510 |
getJComboBox().removeAllItems(); |
505 | 511 |
for (int i = 0; i < uris.length; i++) { |
506 |
nameFile = uris[i].getPath(); |
|
507 |
nameFile = nameFile.substring(nameFile.lastIndexOf(File.separator) + 1); |
|
512 |
URI uri = uris[i]; |
|
513 |
if ("FILE".equalsIgnoreCase(uri.getScheme())){ |
|
514 |
nameFile = uris[i].getPath(); |
|
515 |
nameFile = FilenameUtils.getName(nameFile); |
|
516 |
}else{ |
|
517 |
nameFile = uris[i].toString(); |
|
518 |
} |
|
519 |
|
|
508 | 520 |
getJComboBox().addItem(nameFile); |
509 | 521 |
} |
510 | 522 |
try { |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/provider/AbstractRasterProvider.java | ||
---|---|---|
622 | 622 |
} |
623 | 623 |
return new File(rmfFolder.getAbsolutePath() + File.separator + fileName + tail); |
624 | 624 |
} |
625 |
return null; |
|
625 |
return new File(getRMFFileForRemoteServices(getName())); |
|
626 |
// return null; |
|
626 | 627 |
} |
627 | 628 |
|
628 | 629 |
protected String getRMFFileForRemoteServices(String layerName) { |
629 | 630 |
String md5 = ""; |
630 | 631 |
try { |
631 |
md5 = RasterLocator.getManager().getFileUtils().convertPathToMD5(new File(uri).getAbsolutePath());
|
|
632 |
md5 = RasterLocator.getManager().getFileUtils().convertPathToMD5(uri.toString());
|
|
632 | 633 |
} catch (LocatorException e) { |
633 | 634 |
logger.debug("Error getting the Locator", e); |
634 | 635 |
} catch (NoSuchAlgorithmException e) { |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.impl/src/main/java/org/gvsig/raster/impl/store/DefaultRasterStore.java | ||
---|---|---|
1051 | 1051 |
//Esto solo es por si al cargar un proyecto se ha cambiado el fichero de sitio y el usuario |
1052 | 1052 |
//lo introduce manualmente. En ese caso el bandList debe contener la misma ruta al fichero que el |
1053 | 1053 |
//provider y no la que se grab? inicialmente |
1054 |
for (int i = 0; i < storeBandList.getBandCount(); i++) { |
|
1055 |
storeBandList.getBand(i).setFileName(new File(provider.getURI()).getAbsolutePath()); |
|
1056 |
} |
|
1054 |
try{ |
|
1055 |
for (int i = 0; i < storeBandList.getBandCount(); i++) { |
|
1056 |
storeBandList.getBand(i).setFileName(new File(provider.getURI()).getAbsolutePath()); |
|
1057 |
} |
|
1058 |
}catch (Exception e){ |
|
1059 |
logger.warn("Couldn't get file for "+provider.getURI()+" when creating Band List Store"); |
|
1060 |
} |
|
1057 | 1061 |
} |
1058 | 1062 |
this.metadata = (Metadata)state.get("metadata"); |
1059 | 1063 |
|
Also available in: Unified diff