[Gvsig_english] How to get a DataSource reference from DataSourceFactory

Michele Zucali michele.zucali at unimi.it
Mon Dec 11 14:32:16 CET 2006


dear gvSIGers,
	
	I'd like to use some black/white geoTIFF above .shp poligonal  
layers, which are filled by various colors.
In order to see the underling layers I need to have a transparent  
raster.

How to make raster transparent (i.e. make the white transarent) ? I  
did try using the transparent

ciao
Michele

On 11 Dec 2006, at 08:36, Jose Manuel Vivó (Chema) wrote:

Hi, Olivier

El Jueves 07 Diciembre 2006 12:27, Olivier Ertz escribió:
> Dear gvSIG hackers,
> How do I get a DataSource reference from the DataSourceFactory after
> having added a new FileDataSource ?
> Here is a code block to explain what I do :
>
> // load another data source
> String dsName = LayerFactory.getDataSourceFactory()
> 		.addFileDataSource("Bna Alphanumeric
> Driver","D:/tmp/VS-dis_Pop18501990.tab");
>

You can use these two methods:

* Open a new DataSource:

DataSource ds = LayerFactory.getDataSourceFactory()
	.createRandomDataSource(dsName);
ds.start();

* By a Sql instruction:

DataSource ds = LayerFactory.getDataSourceFactory()
	.executeSQL("Select * from " +dsName,  
DataSourceFactory.MANUAL_OPENING);
ds.start();



> Is there a method that can return a reference to the DataSource I've
> just added (I've only a name, so ...) ?
> Thanx for your help.
>
> Olivier.

Best regards
Chema.
-- 
=============
Jose Manuel Vivó (Chema)
Equipo de gvSIG

IVER T.I. S.A.
c/Salamanca 50
46005 Valencia
Spain



_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at runas.cap.gva.es
http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional





More information about the Gvsig_internacional mailing list