Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/package.info
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/package.info	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/package.info	(revision 3305)
@@ -0,0 +1,20 @@
+#
+#Thu Mar 07 10:25:56 CET 2013
+owner=gvSIG Association
+code=org.gvsig.raster.tilecache.io
+java-version=j1_5
+official=true
+type=plugin
+version=2.0.0-0
+state=devel
+operating-system=all
+dependencies=
+sources-url=https\://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.tilecache/tags/2.0.0/org.gvsig.raster.tilecache.io
+web-url=http\://www.gvsig.com
+architecture=all
+model-version=1.0.1
+categories=
+description=cache service for gvSIG
+buildNumber=0
+gvSIG-version=2.0.0
+name=org.gvsig.raster.tilecache.io
Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/TemplateRasterProvider.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/TemplateRasterProvider.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/TemplateRasterProvider.java	(revision 3305)
@@ -0,0 +1,499 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.fmap.dal.coverage.dataset.io.netcdf;
+
+import java.awt.geom.AffineTransform;
+
+import org.gvsig.fmap.dal.DALFileLocator;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.dataset.io.tile.downloader.FileTileServer;
+import org.gvsig.fmap.dal.coverage.datastruct.BandList;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.BandAccessException;
+import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException;
+import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException;
+import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException;
+import org.gvsig.fmap.dal.coverage.exception.ParsingException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.store.RasterFileStoreParameters;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.raster.cache.tile.provider.TileListener;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.datastruct.ExtentImpl;
+import org.gvsig.raster.impl.provider.DefaultRasterProvider;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
+import org.gvsig.raster.impl.store.AbstractRasterDataStore;
+import org.gvsig.raster.impl.store.DefaultStoreFactory;
+import org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation;
+import org.gvsig.raster.impl.store.properties.DataStoreMetadata;
+import org.gvsig.raster.impl.store.properties.DataStoreTransparency;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+/**
+ * Data provider for ...
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFProvider extends DefaultRasterProvider {
+	public static String        NAME                     = "Template Store";
+	public static String        DESCRIPTION              = "Template Raster file";
+	public final String         METADATA_DEFINITION_NAME = "TemplateStore";
+	
+	private static String[]     formatList               = new String[]{"*"};
+
+	private Extent              viewRequest              = null;
+	private TileServer          tileServer               = null;
+	private boolean             open                     = false;
+
+	public static void register() {
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
+			dataman.registerStoreProvider(NAME,
+					NetCDFProvider.class, NetCDFDataParameters.class);
+		}
+		
+		if(DALFileLocator.getFilesystemServerExplorerManager() != null)
+			DALFileLocator.getFilesystemServerExplorerManager().registerProvider(
+					NAME, DESCRIPTION,
+					NetCDFFilesystemServerExplorer.class);
+		
+		dataman.registerStoreFactory(NAME, DefaultStoreFactory.class);
+	}
+	
+	/**
+	 * Returns true if the extension is supported and false if doesn't
+	 * @param ext
+	 * @return
+	 */
+	public static boolean isExtensionSupported(String ext) {
+		for (int i = 0; i < formatList.length; i++) {
+			if(formatList[i].compareTo(ext) == 0)
+				return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * Constructor. Abre el dataset.
+	 * @param proj Proyección
+	 * @param fName Nombre del fichero
+	 * @throws NotSupportedExtensionException
+	 */
+	public NetCDFProvider(String params) throws NotSupportedExtensionException {
+		super(params);
+		if(params instanceof String) {
+			NetCDFDataParameters p = new NetCDFDataParameters();
+			p.setURI((String)params);
+			super.init(p, null, ToolsLocator.getDynObjectManager()
+					.createDynObject(
+							MetadataLocator.getMetadataManager().getDefinition(
+									DataStore.METADATA_DEFINITION_NAME)));
+			init(p, null);
+		}
+	}
+	
+	public NetCDFProvider (NetCDFDataParameters params,
+			AbstractRasterDataStore storeServices) throws NotSupportedExtensionException {
+		super(params, storeServices, ToolsLocator.getDynObjectManager()
+				.createDynObject(
+						MetadataLocator.getMetadataManager().getDefinition(
+								DataStore.METADATA_DEFINITION_NAME)));
+		init(params, storeServices);
+	}
+
+	/**
+	 * Crea las referencias al fichero y carga
+	 * las estructuras con la información y los metadatos.
+	 * @param proj Proyección
+	 * @param param Parametros de carga
+	 * @throws NotSupportedExtensionException
+	 */
+	public void init (AbstractRasterDataParameters params,
+			DataStoreProviderServices storeServices) throws NotSupportedExtensionException {
+		//TODO:
+		
+		if(((RasterFileStoreParameters)params).getFile().exists()) {
+			setParam(params);
+			colorTable = null;
+			noData = 0;
+			wktProjection = null;
+			//CrsWkt crs = new CrsWkt(wktProjection);
+			//IProjection proj = CRSFactory.getCRS("EPSG:23030");
+			noDataEnabled = true;
+			ownTransformation = null;
+			externalTransformation = (AffineTransform)ownTransformation.clone();
+			load();
+		} else
+			setParam(params);
+		bandCount = 0;
+		setDataType(null);
+		super.init();
+
+		try {
+			loadFromRmf(getRmfBlocksManager());
+		} catch (ParsingException e) {
+			//No lee desde rmf
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#load()
+	 */
+	public RasterProvider load() {
+		return this;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#isOpen()
+	 */
+	public boolean isOpen() {
+		return open;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#close()
+	 */
+	public void close() {
+		//TODO:
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#translateFileName(java.lang.String)
+	 */
+	public String translateFileName(String fileName) {
+		return fileName;
+	}
+
+	/**
+	 * Asigna el extent de la vista actual. existe un fichero .rmf debemos hacer una transformación
+	 * de la vista asignada ya que la petición viene en coordenadas del fichero .rmf y la vista (v)
+	 * ha de estar en coordenadas del fichero.
+	 */
+	public void setView(Extent e) {
+		viewRequest = new ExtentImpl(e);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getView()
+	 */
+	public Extent getView() {
+		return viewRequest;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWidth()
+	 */
+	public double getWidth() {
+		//TODO:
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getHeight()
+	 */
+	public double getHeight() {
+		//TODO:
+		return 0;
+	}
+
+	/**
+	 * Read a line from the file
+	 * @param line
+	 * @param band
+	 * @return
+	 * @throws InvalidSetViewException
+	 * @throws FileNotOpenException
+	 * @throws RasterDriverException
+	 * @Deprecated This operation is deprecated because is not useful and in the future
+	 * it will not be maintained. The abstract operation has dissapear
+	 */
+	public Object readCompleteLine(int line, int band)throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		if(line > this.getHeight() || band > this.getBandCount())
+			throw new InvalidSetViewException("Request out of grid");
+
+		//TODO:
+		return null;
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see org.gvsig.raster.dataset.RasterDataset#readBlock(int, int)
+	 */
+	public Object readBlock(int pos, int blockHeight)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException {
+		if(pos < 0)
+			throw new InvalidSetViewException("Request out of grid");
+
+		if((pos + blockHeight) > getHeight())
+			blockHeight = Math.abs(((int)getHeight()) - pos);
+		
+		//TODO:
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getData(int, int, int)
+	 */
+	public Object getData(int x, int y, int band)throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		if(x < 0 || y < 0 || x >= getWidth() || y >= getHeight())
+			throw new InvalidSetViewException("Request out of grid");
+		
+		//TODO
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.raster.cache.tile.provider.TileListener)
+	 */
+	public void getWindow(Extent ex, int bufWidth, int bufHeight, 
+			BandList bandList, TileListener listener) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(org.gvsig.fmap.dal.coverage.datastruct.Extent, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer)
+	 */
+	public Buffer getWindow(Extent ex, BandList bandList, Buffer rasterBuf) 
+		throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer, boolean)
+	 */
+	public Buffer getWindow(double ulx, double uly, double w, double h, 
+			BandList bandList, Buffer rasterBuf, boolean adjustToExtent) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer, boolean)
+	 */
+	public Buffer getWindow(Extent extent, 
+			int bufWidth, int bufHeight, BandList bandList, Buffer rasterBuf, boolean adjustToExtent) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+		
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(int, int, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer)
+	 */
+	public Buffer getWindow(int x, int y, int w, int h, 
+			BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+		
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(int, int, int, int, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer)
+	 */
+	public Buffer getWindow(int x, int y, int w, int h, 
+			int bufWidth, int bufHeight, BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+		
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getBlockSize()
+	 */
+	public int getBlockSize(){
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getMetadata()
+	 */
+	public DataStoreMetadata getMetadata() {
+		//TODO
+		
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getColorInterpretation()
+	 */
+	public DataStoreColorInterpretation getColorInterpretation(){
+		//TODO
+		
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#setColorInterpretation(org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation)
+	 */
+	public void setColorInterpretation(DataStoreColorInterpretation colorInterpretation){
+		//TODO
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getTransparency()
+	 */
+	public DataStoreTransparency getTransparency() {
+		//TODO
+		
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#isGeoreferenced()
+	 */
+	public boolean isGeoreferenced() {
+		//TODO
+		
+		return false;
+	}
+
+	/**
+	 * Informa de si el driver ha supersampleado en el último dibujado. Es el driver el que colocará
+	 * el valor de esta variable cada vez que dibuja.
+	 * @return true si se ha supersampleado y false si no se ha hecho.
+	 */
+	public boolean isSupersampling() {
+		//TODO
+		
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#setAffineTransform(java.awt.geom.AffineTransform)
+	 */
+	public void setAffineTransform(AffineTransform t){
+		super.setAffineTransform(t);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#getOverviewCount(int)
+	 */
+	public int getOverviewCount(int band) throws BandAccessException, RasterDriverException {
+		if(band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getOverviewWidth(int, int)
+	 */
+	public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException {
+		if (band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getOverviewHeight(int, int)
+	 */
+	public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException {
+		if (band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#overviewsSupport()
+	 */
+	public boolean overviewsSupport() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#isReproyectable()
+	 */
+	public boolean isReproyectable() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.dal.spi.DataStoreProvider#getName()
+	 */
+	public String getName() {
+		return NAME;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#setStatus(org.gvsig.raster.impl.provider.RasterProvider)
+	 */
+	public void setStatus(RasterProvider provider) {
+		if(provider instanceof NetCDFProvider) {
+			//Not implemented yet
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#getTileServer()
+	 */
+	public TileServer getTileServer() {
+		if(tileServer == null)
+			tileServer = new FileTileServer(this);
+		return tileServer;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/TemplateRasterProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/README.txt
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/README.txt	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/README.txt	(revision 3305)
@@ -0,0 +1,8 @@
+Put into this folder the resources needed by your test classes.
+
+This folder is added to the Tests classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, in this folder you can find an example of log4j configuration,
+prepared to log messages through the console, so logging works when you
+run your tests classes.
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/log4j.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/log4j.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/log4j.xml	(revision 3305)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- 
+Log4J configuration file for unit tests execution.
+ -->
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+	<!-- Appender configuration to show logging messages through the console -->
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
+		</layout>
+	</appender>
+
+	<!-- 
+	Activate logging messages of DEBUG level of higher only for the
+	org.gvsig.tools packages.
+	You can put full classes names or packages instead, to configure
+	logging for all the classes and subpackages of the package.
+	-->
+	<category name="org.gvsig.tools">
+		<priority value="DEBUG" />
+	</category>
+	<category name="org.gvsig.raster">
+		<priority value="DEBUG" />
+	</category>
+
+	<!-- 
+	By default, show only logging messages of INFO level or higher, 
+	through the previously configured CONSOLE appender. 
+	-->
+	<root>
+		<priority value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/test/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 3305)
@@ -0,0 +1 @@
+org.gvsig.raster.tilecache.io.DefaultCacheIOLibrary
Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatNewRasterStoreParameters.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatNewRasterStoreParameters.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatNewRasterStoreParameters.java	(revision 3305)
@@ -0,0 +1,40 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+package org.gvsig.raster.tilecache.io.tff;
+
+import org.gvsig.raster.impl.store.AbstractNewRasterStoreParameters;
+
+/**
+ * Parameters for creating a <code>TileFileFormat</code> store
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileFileFormatNewRasterStoreParameters extends AbstractNewRasterStoreParameters {
+
+	public String getDataStoreName() {
+		return TileFileFormatProvider.NAME;
+	}
+
+	public String getDescription() {
+		return TileFileFormatProvider.DESCRIPTION;
+	}
+
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatNewRasterStoreParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatFilesystemServerExplorer.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatFilesystemServerExplorer.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatFilesystemServerExplorer.java	(revision 3305)
@@ -0,0 +1,169 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.tilecache.io.tff;
+
+import java.io.File;
+import java.util.List;
+
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.NewDataStoreParameters;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.exception.CreateException;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.exception.RemoveException;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderServices;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
+import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters;
+
+public class TileFileFormatFilesystemServerExplorer extends AbstractFilesystemServerExplorerProvider {
+	
+	public TileFileFormatFilesystemServerExplorer() {
+		
+	}
+	
+	public TileFileFormatFilesystemServerExplorer(
+			TileFileFormatExplorerParameters parameters,
+			DataServerExplorerProviderServices services)
+			throws InitializeException {
+		System.out.println();
+	}
+	
+	public String getDataStoreProviderName() {
+		return TileFileFormatProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return TileFileFormatProvider.DESCRIPTION;
+	}
+	
+	public DataStoreParameters getStoreParameters() {
+		DataManager manager = DALLocator.getDataManager();
+		try {
+			return  manager.createStoreParameters(this.getDataStoreProviderName());
+		} catch (InitializeException e) {
+			e.printStackTrace();
+		} catch (ProviderNotRegisteredException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List getDataStoreProviderNames() {
+		return null;
+	}
+
+	public String getProviderName() {
+		return TileFileFormatProvider.NAME;
+	}
+
+	public DataServerExplorerProviderServices getServerExplorerProviderServices() {
+		return null;
+	}
+
+	public boolean canCreate() {
+		return false;
+	}
+
+	public boolean canCreate(NewDataStoreParameters parameters) {
+		return false;
+	}
+
+	public void create(NewDataStoreParameters parameters, boolean overwrite)
+			throws CreateException {
+		throw new UnsupportedOperationException();
+	}
+
+	public NewDataStoreParameters getCreateParameters() throws DataException {
+		return null;
+	}
+
+	public void initialize(
+			FilesystemServerExplorerProviderServices serverExplorer) {
+	}
+
+	public boolean accept(File pathname) {
+		return RasterLocator.getManager().getProviderServices().isExtensionSupported(
+				pathname.getAbsolutePath(), 
+				TileFileFormatProvider.class);
+	}
+
+	public void remove(DataStoreParameters parameters) throws RemoveException {
+		throw new UnsupportedOperationException();
+	}
+
+	public boolean add(String provider, NewDataStoreParameters parameters,
+			boolean overwrite) throws DataException {
+		return false;
+	}
+
+	public boolean canAdd() {
+		return false;
+	}
+
+	public boolean canAdd(String storeName) throws DataException {
+		return false;
+	}
+
+	public NewDataStoreParameters getAddParameters(String storeName)
+			throws DataException {
+		return null;
+	}
+	
+	public DataStoreParameters getParameters(File file) throws DataException {
+		DataManager manager = DALLocator.getDataManager();
+		AbstractRasterFileDataParameters params = (AbstractRasterFileDataParameters) manager
+				.createStoreParameters(this.getDataStoreProviderName());
+		params.setFile(file);
+		return params;
+	}
+
+	public DataServerExplorerParameters getParameters() {
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List list() throws DataException {
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List list(int mode) throws DataException {
+		return null;
+	}
+
+	public void dispose() {
+	}
+	
+	public int getMode() {
+		return DataServerExplorer.MODE_RASTER;
+	}
+
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatFilesystemServerExplorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatDataParameters.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatDataParameters.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatDataParameters.java	(revision 3305)
@@ -0,0 +1,70 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.tilecache.io.tff;
+
+import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
+import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ * Parameters for the <code>TileFileFormatProvider</code>
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileFileFormatDataParameters extends AbstractRasterFileDataParameters {
+	 
+	public String getDataStoreName() {
+		return TileFileFormatProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return TileFileFormatProvider.DESCRIPTION;
+	}
+	
+	public void loadFromState(PersistentState state)
+			throws PersistenceException {
+		super.loadFromState(state);
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		super.saveToState(state);
+	}	
+	
+	public static void registerPersistence() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("TileFileFormatDataParameters_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					TileFileFormatDataParameters.class,
+					"TileFileFormatDataParameters_Persistent",
+					"TileFileFormatDataParameters Persistent",
+					null, 
+					null
+			);
+			AbstractRasterDataParameters.registerDynClass(definition);
+		}
+	}
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatDataParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatExplorerParameters.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatExplorerParameters.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatExplorerParameters.java	(revision 3305)
@@ -0,0 +1,88 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2009 IVER T.I   {{Task}}
+*/
+
+package org.gvsig.raster.tilecache.io.tff;
+
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.spi.AbstractDataParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObjectManager;
+
+/**
+ * Parameters for the TileFileFormat explorer provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileFileFormatExplorerParameters extends AbstractDataParameters implements DataServerExplorerParameters {
+	public static final String     DYNCLASS_NAME       = "TileFileFormatExplorerParameters";
+	protected static DynClass      DYNCLASS            = null;
+	private DelegatedDynObject     delegatedDynObject  = null;
+	
+	
+	public TileFileFormatExplorerParameters() {
+		super();
+		initialize();
+	}
+
+	protected void initialize() {
+		this.delegatedDynObject = (DelegatedDynObject) ToolsLocator
+				.getDynObjectManager().createDynObject(
+						DYNCLASS);
+	}
+	
+	public static void registerDynClass() {
+		DynObjectManager dynman = ToolsLocator.getDynObjectManager();
+		DynClass dynClass;
+		
+		if(dynman == null)
+			return;
+		
+		if (DYNCLASS == null) {
+			dynClass = dynman.add(DYNCLASS_NAME);
+
+			DYNCLASS = dynClass;
+		}
+
+	}
+	
+	protected DelegatedDynObject getDelegatedDynObject() {
+		return delegatedDynObject;
+	}
+
+	public String getDataStoreName() {
+		return TileFileFormatProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return TileFileFormatProvider.DESCRIPTION;
+	}
+	
+	public String getExplorerName() {
+		return TileFileFormatProvider.NAME;
+	}
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatExplorerParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatProvider.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatProvider.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatProvider.java	(revision 3305)
@@ -0,0 +1,283 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.tilecache.io.tff;
+
+import java.awt.geom.Point2D;
+
+import org.gvsig.fmap.dal.DALFileLocator;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.BandAccessException;
+import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException;
+import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException;
+import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException;
+import org.gvsig.fmap.dal.coverage.exception.ParsingException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.OpenException;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.raster.cache.tile.Tile;
+import org.gvsig.raster.cache.tile.exception.TileGettingException;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.buffer.SpiRasterQuery;
+import org.gvsig.raster.impl.provider.AbstractRasterProvider;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.provider.TiledRasterProvider;
+import org.gvsig.raster.impl.store.DefaultStoreFactory;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provider for <code>TileFileFormat</code>
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileFileFormatProvider extends AbstractRasterProvider implements TiledRasterProvider {
+	public static String                NAME                     = "TileFileFormat Store";
+	public static String                DESCRIPTION              = "Tile file format Source";
+	public static final String          METADATA_DEFINITION_NAME = "TileFileFormatStore";
+	private static final Logger         logger                   = LoggerFactory.getLogger(TileFileFormatProvider.class);
+	protected static String[]           formatList               = null;
+	private boolean                     open                     = false;
+	 
+	public static void register() {		
+		ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
+		registerFormats();
+		
+		ExtensionPoint point = extensionPoints.get("DefaultRasterProvider");
+		point.append("reader", TileFileFormatProvider.NAME, TileFileFormatProvider.class);
+		
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
+			dataman.registerStoreProvider(NAME,
+					TileFileFormatProvider.class, TileFileFormatDataParameters.class);
+		}
+		
+		if(DALFileLocator.getFilesystemServerExplorerManager() != null)
+			DALFileLocator.getFilesystemServerExplorerManager().registerProvider(
+					NAME, DESCRIPTION,
+					TileFileFormatFilesystemServerExplorer.class);
+		
+		dataman.registerStoreFactory(NAME, DefaultStoreFactory.class);
+	}
+	
+	private static void registerFormats() {
+		formatList      = new String[] {"tff"};
+		for (int i = 0; i < formatList.length; i++) 
+			RasterLocator.getManager().getProviderServices().addFormat(formatList[i], TileFileFormatProvider.class);
+	}
+	
+	public String[] getFormatList() {
+		return formatList;
+	}
+	
+	public boolean isExtensionSupported(String ext) {
+		if(ext.indexOf(".") != -1)
+			ext = ext.substring(ext.lastIndexOf(".") + 1, ext.length());
+		for (int i = 0; i < formatList.length; i++) {
+			if(formatList[i].compareTo(ext) == 0)
+				return true;
+		}
+		return false;
+	}
+	
+	public TileFileFormatProvider() throws NotSupportedExtensionException {
+		super();
+	}
+	
+	public TileFileFormatProvider(TileFileFormatDataParameters params,
+			DataStoreProviderServices storeServices) throws InitializeException {
+		super(params, storeServices, ToolsLocator.getDynObjectManager()
+				.createDynObject(
+						MetadataLocator.getMetadataManager().getDefinition(
+								DataStore.METADATA_DEFINITION_NAME)));
+		try {
+			init(params, storeServices);
+		} catch (OpenException e) {
+			throw new InitializeException("Error open the source", e);
+		} catch (NotSupportedExtensionException e) {
+			throw new InitializeException("Not supported extension", e);
+		}
+	}
+	
+	/**
+	 * Build file references
+	 * @param proj Projection
+	 * @param param Load parameters
+	 * @throws NotSupportedExtensionException
+	 */
+	public void init(TileFileFormatDataParameters params,
+			DataStoreProviderServices storeServices) throws NotSupportedExtensionException, OpenException {
+		
+		openFromTff();
+		
+		uri = getParameters().getURI();
+		
+		super.init();
+		
+		try {
+			loadFromRmf(getRmfBlocksManager());
+		} catch (ParsingException e) {
+			logger.debug("Problems reading from RMF", e);
+		}
+
+		open = true;
+	}
+	
+	/**
+	 * Open from a .mff file. 
+	 * This method loads all providers and adds these to the parameters
+	 * @throws OpenException
+	 */
+	private void openFromTff() throws OpenException {
+		
+	}
+	
+	public TileFileFormatDataParameters getParameters() {
+		try {
+			return (TileFileFormatDataParameters)parameters;
+		} catch (ClassCastException e) {
+			return null;
+		}
+	}
+	
+	@Override
+	public int getBlockSize() {
+		return 0;
+	}
+
+	@Override
+	public Object getData(int x, int y, int band)
+			throws InvalidSetViewException, FileNotOpenException,
+			RasterDriverException {
+		return null;
+	}
+
+	@Override
+	public double getHeight() {
+		return 0;
+	}
+
+	@Override
+	public int getOverviewHeight(int band, int overview)
+			throws BandAccessException, RasterDriverException {
+		return 0;
+	}
+
+	@Override
+	public int getOverviewWidth(int band, int overview)
+			throws BandAccessException, RasterDriverException {
+		return 0;
+	}
+
+	@Override
+	public Extent getView() {
+		return null;
+	}
+
+	@Override
+	public double getWidth() {
+		return 0;
+	}
+
+	@Override
+	public boolean isOverviewsSupported() {
+		return false;
+	}
+
+	@Override
+	public RasterProvider load() {
+		return null;
+	}
+
+	@Override
+	public void setView(Extent e) {
+		
+	}
+
+	public Extent getCoordsInLevel(Point2D viewCenter, int level, int w, int h) {
+		return null;
+	}
+
+	public Extent getCoordsInTheNearestLevel(Extent extent, int w, int h) {
+		return null;
+	}
+
+	public RasterProvider getInternalProvider() {
+		return null;
+	}
+
+	public int getNearestLevel(double pixelSize) {
+		return 0;
+	}
+
+	public Tile getTile(SpiRasterQuery q) throws TileGettingException {
+		return null;
+	}
+
+	public int getZoomLevels() {
+		return 0;
+	}
+
+	public int getOverviewCount(int band) throws BandAccessException,
+			RasterDriverException {
+		return 0;
+	}
+
+	public TileServer getTileServer() {
+		return null;
+	}
+
+	public boolean isOpen() {
+		return open;
+	}
+
+	public Object readBlock(int pos, int blockHeight, double scale)
+			throws InvalidSetViewException, FileNotOpenException,
+			RasterDriverException, ProcessInterruptedException {
+		return null;
+	}
+
+	public void setStatus(RasterProvider provider) {
+		
+	}
+
+	public String getProviderName() {
+		return NAME;
+	}
+
+	@Override
+	public void loadBuffer(SpiRasterQuery query)
+			throws ProcessInterruptedException, RasterDriverException {
+		// TODO Auto-generated method stub
+		
+	}
+	
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/tff/TileFileFormatProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/DefaultCacheIOLibrary.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/DefaultCacheIOLibrary.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/DefaultCacheIOLibrary.java	(revision 3305)
@@ -0,0 +1,48 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.raster.tilecache.io;
+
+import org.gvsig.raster.cache.tile.impl.TileCacheDefaultImplLibrary;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class DefaultCacheIOLibrary extends AbstractLibrary {	
+
+	public DefaultCacheIOLibrary() {
+		registerAsServiceOf(TileCacheDefaultImplLibrary.class);
+	}
+	
+	@Override
+	protected void doInitialize() throws LibraryException {
+		//RasterLibrary.wakeUp();
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		TileDataParametersImpl.registerDynClass();
+		TileProvider.register();
+	}
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/DefaultCacheIOLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorer.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorer.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorer.java	(revision 3305)
@@ -0,0 +1,201 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2009 IVER T.I   {{Task}}
+*/
+
+package org.gvsig.raster.tilecache.io;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.List;
+
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.NewDataStoreParameters;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.exception.CreateException;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.RemoveException;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderServices;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProvider;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
+import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters;
+
+public class TileServerExplorer extends AbstractFilesystemServerExplorerProvider implements DataServerExplorerProvider {
+	public static final String               NAME                     = "TileServerExplorer";
+	
+	public TileServerExplorer() {
+		
+	}
+	
+	public TileServerExplorer(
+			TileServerExplorerParameters parameters,
+			DataServerExplorerProviderServices services)
+			throws InitializeException {
+	}
+	
+	public boolean canCreate() {
+		return false;
+	}
+
+	public boolean canCreate(NewDataStoreParameters parameters) {
+		return false;
+	}
+
+	public void create(NewDataStoreParameters parameters, boolean overwrite)
+			throws CreateException {
+		throw new UnsupportedOperationException();
+	}
+
+	public NewDataStoreParameters getCreateParameters() throws DataException {
+		return null;
+	}
+
+	public void initialize(
+			FilesystemServerExplorerProviderServices serverExplorer) {
+	}
+	
+	public void remove(DataStoreParameters parameters) throws RemoveException {
+		throw new UnsupportedOperationException();
+	}
+
+	public String getDataStoreProviderName() {
+		return TileProvider.NAME;
+	}
+
+	/**
+	 * When the source is a file then this method will check if exists a 
+	 * provider that can manage it
+	 */
+	public boolean accept(File pathname) {
+		if (pathname.getParentFile() != null && 
+				pathname.getParentFile().getName().equals("cellhd")) {
+			if (pathname.getName().endsWith(".rmf")
+					|| pathname.getName().endsWith(".rmf~")) {
+				return false;
+			}
+			return true;
+		}
+
+		// Comprobamos que no sea un rmf propio, osea, que contenga xml
+		if (pathname.getName().toLowerCase().endsWith(".rmf")) {
+			FileInputStream reader = null;
+			try {
+				reader = new FileInputStream(pathname);
+				String xml = "";
+				for (int i = 0; i < 6; i++) {
+					xml += (char) reader.read();
+				}
+				if (xml.equals("<?xml ")) {
+					return false;
+				}
+			} catch (Exception e) {
+			} finally {
+				try {
+					reader.close();
+				} catch (Exception e) {
+				}
+			}
+		}
+
+		//The formats will be registered if it hasn't been done yet
+		RasterLocator.getManager().getProviderServices().registerTileProviderFormats(TileProvider.class);
+		
+		return RasterLocator.getManager().getProviderServices().isExtensionSupported(
+				pathname.getName(), 
+				TileProvider.class);
+	}
+
+	public String getDescription() {
+		return TileProvider.DESCRIPTION;
+	}
+
+	public DataStoreParameters getParameters(File file) throws DataException {
+		DataManager manager = DALLocator.getDataManager();
+		AbstractRasterFileDataParameters params = (AbstractRasterFileDataParameters) manager
+				.createStoreParameters(this.getDataStoreProviderName());
+		params.setFile(file);
+		return params;
+	}
+	
+	public DataServerExplorerParameters getParameters() {
+		return null;
+	}
+	
+	public int getMode() {
+		return DataServerExplorer.MODE_RASTER;
+	}
+
+	public DataServerExplorerProviderServices getServerExplorerProviderServices() {
+		return null;
+	}
+
+	public boolean add(String provider, NewDataStoreParameters parameters,
+			boolean overwrite) throws DataException {
+		return false;
+	}
+
+	public boolean canAdd() {
+		return false;
+	}
+
+	public boolean canAdd(String storeName) throws DataException {
+		return false;
+	}
+
+	public NewDataStoreParameters getAddParameters(String storeName)
+			throws DataException {
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List getDataStoreProviderNames() {
+		return null;
+	}
+
+	public String getProviderName() {
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List list() throws DataException {
+		return null;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List list(int mode) throws DataException {
+		return null;
+	}
+
+	public void dispose() {
+		
+	}
+
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java	(revision 3305)
@@ -0,0 +1,966 @@
+package org.gvsig.raster.tilecache.io;
+
+import java.awt.Image;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.NoninvertibleTransformException;
+import java.awt.geom.Point2D;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.gvsig.compat.net.ICancellable;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.RasterLibrary;
+import org.gvsig.fmap.dal.coverage.RasterLocator;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.datastruct.BandList;
+import org.gvsig.fmap.dal.coverage.datastruct.DatasetBand;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.BandAccessException;
+import org.gvsig.fmap.dal.coverage.exception.BandNotFoundInListException;
+import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException;
+import org.gvsig.fmap.dal.coverage.exception.FileNotSupportedException;
+import org.gvsig.fmap.dal.coverage.exception.InfoByPointException;
+import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException;
+import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException;
+import org.gvsig.fmap.dal.coverage.exception.ParsingException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.QueryException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.exception.RmfSerializerException;
+import org.gvsig.fmap.dal.coverage.store.RasterQuery;
+import org.gvsig.fmap.dal.coverage.store.parameter.MultiDimensionalStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.RemoteStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.TileDataParameters;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+import org.gvsig.fmap.dal.coverage.store.props.ColorTable;
+import org.gvsig.fmap.dal.coverage.util.MathUtils;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.dal.spi.DataStoreProvider;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.raster.cache.tile.Tile;
+import org.gvsig.raster.cache.tile.TileCache;
+import org.gvsig.raster.cache.tile.TileCacheLibrary;
+import org.gvsig.raster.cache.tile.TileCacheLocator;
+import org.gvsig.raster.cache.tile.TileCacheManager;
+import org.gvsig.raster.cache.tile.exception.TileBuildException;
+import org.gvsig.raster.cache.tile.exception.TileGettingException;
+import org.gvsig.raster.cache.tile.layer.TiledLayer;
+import org.gvsig.raster.cache.tile.provider.CacheStruct;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.buffer.SpiRasterQuery;
+import org.gvsig.raster.impl.datastruct.BandListImpl;
+import org.gvsig.raster.impl.datastruct.DatasetBandImpl;
+import org.gvsig.raster.impl.datastruct.ExtentImpl;
+import org.gvsig.raster.impl.provider.AbstractRasterProvider;
+import org.gvsig.raster.impl.provider.MemoryTileMatrixBuffer;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.provider.RemoteRasterProvider;
+import org.gvsig.raster.impl.provider.TiledRasterProvider;
+import org.gvsig.raster.impl.store.DefaultRasterStore;
+import org.gvsig.raster.impl.store.DefaultStoreFactory;
+import org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation;
+import org.gvsig.raster.impl.store.properties.DataStoreTransparency;
+import org.gvsig.raster.impl.store.properties.RemoteDataStoreStatistics;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.locator.LocatorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provider for WMTS service
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileProvider extends AbstractRasterProvider implements TiledRasterProvider {
+	public static String                NAME                     = "Tile Store";
+	public static String                DESCRIPTION              = "Raster Tiled Source";
+	public static final String          METADATA_DEFINITION_NAME = "TileStore";
+	private static final Logger         logger                   = LoggerFactory.getLogger(TileProvider.class);
+	private RasterProvider              provider                 = null;
+	private boolean                     open                     = false;
+	private Extent                      viewRequest              = null;
+	private TiledLayer                  tiledLayer               = null;
+	private MathUtils                   math                     = RasterLocator.getManager().getMathUtils();
+	private TileServer                  secondLevelTileServer    = null;
+	 
+	public static void register() {		
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
+			dataman.registerStoreProvider(NAME,
+					TileProvider.class, TileDataParametersImpl.class);
+		}
+
+		/*if(DALFileLocator.getFilesystemServerExplorerManager() != null)
+			DALFileLocator.getFilesystemServerExplorerManager().registerProvider(
+					NAME, DESCRIPTION,
+					TileServerExplorer.class);*/
+		
+		if (!dataman.getExplorerProviders().contains(TileServerExplorer.NAME)) {
+			dataman.registerExplorerProvider(TileServerExplorer.NAME, TileServerExplorer.class, TileServerExplorerParameters.class);
+		}
+		dataman.registerStoreFactory(NAME, DefaultStoreFactory.class);
+	}
+	
+	/**
+	 * Loads the specific provider to download data
+	 * @param file
+	 * @return
+	 * @throws NotSupportedExtensionException
+	 * @throws FileNotSupportedException 
+	 */
+	@SuppressWarnings("unchecked")
+	private RasterProvider loadProvider(TileDataParametersImpl params, DataStoreProviderServices storeServices) throws ProviderNotRegisteredException, InitializeException {
+		Object obj = params.getDataParameters();
+		DataManagerProviderServices dataManager = (DataManagerProviderServices)DALLocator.getDataManager();
+		DataStoreProvider prov = null;
+		
+		if(obj != null && obj instanceof DataStoreParameters) //Remote 
+			prov = dataManager.createProvider(storeServices, (DataStoreParameters)obj);
+		else { //File
+			if(params.getFile() != null) {
+				//We have to locate a provider's name which manages the selected file
+				//A FilesystemServerExplorer will give a getProviderNames service
+				FilesystemServerExplorerParameters paramsExplorer = (FilesystemServerExplorerParameters)dataManager.createServerExplorerParameters(FilesystemServerExplorer.NAME);
+				FilesystemServerExplorer serverExplorer = null;
+				try {
+					paramsExplorer.setRoot(File.separator);
+					serverExplorer = (FilesystemServerExplorer)dataManager.openServerExplorer(FilesystemServerExplorer.NAME, paramsExplorer);
+				} catch (ValidateDataParametersException e) {
+					throw new InitializeException(e);
+				}
+				
+				//Gets the list of provider's name to manage the file
+				List<String> provName = serverExplorer.getProviderNameList(params.getFile());
+				if(provName.size() > 0) {
+					for (int i = 0; i < provName.size(); i++) {
+						//Gets the first provider what is not a TileProvider
+						if(provName.get(i).compareTo(NAME) != 0) {
+							DataStoreParameters newparams = dataManager.createStoreParameters(provName.get(i));
+							((FilesystemStoreParameters)newparams).setFile(params.getFile()); 
+							prov = dataManager.createProvider(storeServices, newparams);
+						}
+					}
+				}
+			}
+		}
+		
+		if(prov != null && prov instanceof RasterProvider) {
+			if(((RasterProvider)prov).isRotated())
+				throw new InitializeException("Rotation not supported tiling files", new Throwable());
+
+			return (RasterProvider)prov;
+		}
+		
+		return null;
+	}
+	
+	/**
+	 * Gets the internal provider used to feed the TileProvider
+	 * @return
+	 */
+	public RasterProvider getInternalProvider() {
+		return provider;
+	}
+	
+	public Image getImageLegend() {
+		return provider.getImageLegend();
+	}
+	
+	public ColorInterpretation getColorInterpretation() {
+		return provider.getColorInterpretation();
+	}
+	
+	public String getFileSuffix() {
+		try {
+			return provider instanceof RemoteRasterProvider ? provider.getFileSuffix() : "tif";
+		} catch(Throwable e) {
+			//if wmts doesn't exists in the classpath
+			return "tif";
+		}
+	}
+	
+	public String getRMFFile() {
+		TileCacheManager  manager = TileCacheLocator.getManager();
+		TileCache tileCache = manager.getTileCache(RasterLibrary.pathTileCache);
+		
+		String metadataDir = tiledLayer.getBaseLayerDirectory().substring(0, tiledLayer.getBaseLayerDirectory().lastIndexOf(File.separator) + 1) + 
+				  			tileCache.getConfigurationDirectory();
+		
+		File metadaDirFile = new File(metadataDir);
+		if(!metadaDirFile.exists())
+			metadaDirFile.mkdir();
+		
+		String path = metadataDir + File.separator + tiledLayer.getID() + ".rmf";
+		
+		try {
+			if(!new File(path).exists() && 
+				provider != null && 
+				provider.getRMFFile() != null &&
+				new File(provider.getRMFFile()).exists()) 
+				RasterLocator.getManager().getFileUtils().copyFile(provider.getRMFFile(), path);
+			
+			if(provider != null && provider.getColorTable() != null) {	
+				ColorTable colorTable = provider.getColorTable();
+				RasterLocator.getManager().getProviderServices().saveObjectToRmfFile(path, ColorTable.class, colorTable);
+			}
+		} catch (LocatorException e) {
+			logger.info("No se ha podido copiar el fichero RMF a la capa tileada", e);
+		} catch (FileNotFoundException e) {
+			logger.info("No se ha podido copiar el fichero RMF a la capa tileada", e);
+		} catch (IOException e) {
+			logger.info("No se ha podido copiar el fichero RMF a la capa tileada", e);
+		} catch (RmfSerializerException e) {
+			logger.info("No se ha podido copiar la tabla de color a la capa tileada", e);
+		}
+		return path;
+	}
+	
+	public TileProvider() throws NotSupportedExtensionException {
+		super();
+	}
+	
+	public void registerTileProviderFormats(Class<RasterProvider> c) {
+		
+	}
+	
+	/**
+	 * Assigns the provider associated to this tile server
+	 * @param prov
+	 * @throws NotSupportedExtensionException 
+	 */
+	public void setProvider(RasterProvider prov) throws InitializeException  {
+		this.provider = prov;
+		init(getDataStoreParameters(), getStoreServices());
+	}
+	
+	public TileProvider(TileDataParametersImpl params,
+			DataStoreProviderServices storeServices) throws InitializeException {
+		super(params, storeServices, ToolsLocator.getDynObjectManager()
+				.createDynObject(
+						MetadataLocator.getMetadataManager().getDefinition(
+								DataStore.METADATA_DEFINITION_NAME)));
+		if(!params.isSecondLevelCache()) {
+			try {
+				provider = loadProvider(params, storeServices);
+			} catch (ProviderNotRegisteredException e) {
+				throw new InitializeException("Provider not registered", e);
+			}
+			init(params, storeServices);
+			if(provider.getFileSizeByProvider() != null && provider.getFileSizeByProvider().length > 0)
+				fileSize = provider.getFileSizeByProvider()[0];
+		}
+	}
+	
+	/**
+	 * Creates the second level cache if the client has set a <code>TileServer</code> and the
+	 * <code>CacheStruct</code> is different that the old one. 
+	 * <UL>
+	 * <LI>First level cache without TileServer from the client: do nothing</LI>
+	 * <LI>First level cache with TileServer from the client and the structure is 
+	 * different to the old one: Builds a second level TileProvider</LI>
+	 * <LI>First level cache with TileServer from the client and the structure is 
+	 * equal to the old one: do nothing</LI>
+	 * <LI>Second level cache: sets the TileServer</LI>
+	 * </UL>
+	 * @param params
+	 * @param storeServices
+	 * @throws NotSupportedExtensionException
+	 */
+	/*private void createsSecondLevelCache(TileDataParametersImpl params) throws NotSupportedExtensionException {
+		//Se obtiene el TileServer que haya pasado el cliente en los parámetros si ha pasado alguno.
+		TileServer tileServer = params.getTileServer();
+		//Se obtiene el CacheStruct y se compara con el del provider
+		CacheStruct cacheStruct = null;
+		if(tileServer != null)
+			cacheStruct = tileServer.getStruct();
+		
+		if(params.isSecondLevelCache()) { //Cache de segundo nivel
+			this.secondLevelTileServer = tileServer;
+		} else if(cacheStruct != null && !provider.getTileServer().getStruct().compare(cacheStruct)) { //Cache de primer nivel
+			//Si son distintos habrá que crear una caché de segundo nivel por lo que creamos un nuevo TileProvider
+			//que tenga como parámetro el provider viejo
+			TileDataParametersImpl par = new TileDataParametersImpl();
+			par.setDataParameters(provider.getDataParameters());
+			par.setTileServer(tileServer);
+			par.setSecondLevelCache(true);
+			TileProvider newProvider = new TileProvider(par, null);
+			newProvider.setProvider(this.provider);
+			//Al TileProvider actual se le asigna como provider el TileProvider creado
+			this.provider = newProvider;
+		}
+	}*/
+	
+	/**
+	 * Crea las referencias al fichero y carga
+	 * las estructuras con la información y los metadatos.
+	 * @param proj Proyección
+	 * @param param Parametros de carga
+	 * @throws NotSupportedExtensionException
+	 */
+	public void init (DataStoreParameters params,
+			DataStoreProviderServices storeServices) throws InitializeException  {
+		setParam(storeServices, params);
+		open = true;
+		calculateDataType();
+		calculateBandCount();
+		calculateColorInterpretation();
+		calculateTransparency();
+		setColorTable(provider.getColorTable());
+		noData = provider.getNoDataValue();
+		setFName(provider.getURIOfFirstProvider());
+		proj = provider.getProjection();
+		ownTransformation = provider.getAffineTransform();
+		externalTransformation = (AffineTransform)ownTransformation.clone();
+		
+		createTiledLayer();
+		
+		//Force to deletes the layer if the flag is to true
+		if(tiledLayer != null) {
+			if(param instanceof TileDataParameters) {
+				if(((TileDataParameters)param).isDeletingCache()) {
+					TileCacheManager  manager = TileCacheLocator.getManager();
+					TileCache tileCache = manager.getTileCache(RasterLibrary.pathTileCache);
+					tileCache.removeLayer(tiledLayer);
+					((TileDataParameters)param).deleteCache(false);
+				}
+			}
+		}
+		
+		if(provider instanceof RemoteRasterProvider)
+			stats = new RemoteDataStoreStatistics(provider);
+	}
+
+	/**
+	 * Calculates the data type of this provider
+	 * @return 
+	 */
+	public void calculateDataType() {
+		int[] datatype = null;
+		if(provider.getDataType()[0] == Buffer.TYPE_BYTE && provider.getBandCount() == 3)
+			datatype = new int[provider.getBandCount() + 1];
+		else
+			datatype = new int[provider.getBandCount()];
+		for (int i = 0; i < provider.getDataType().length; i++) {
+			datatype[i] = provider.getDataType()[i];
+		}
+		if(provider.getDataType()[0] == Buffer.TYPE_BYTE && provider.getBandCount() == 3)
+			datatype[datatype.length - 1] = Buffer.TYPE_BYTE;
+		setDataType(datatype);
+	}
+	
+	/**
+	 * Calculates the number of bands
+	 */
+	public void calculateBandCount() {
+		bandCount = provider.getBandCount();
+		if(provider.getDataType()[0] == Buffer.TYPE_BYTE && provider.getBandCount() == 3)
+			bandCount ++;
+	}
+
+	/**
+	 * Calculates the color interpretation
+	 */
+	public void calculateColorInterpretation() {
+		ColorInterpretation ci = provider.getColorInterpretation();
+		if(ci != null) {
+			if(ci.isRGB() || ci.isBGR()) {
+				ci = DataStoreColorInterpretation.createRGBAInterpretation();
+			} else
+				ci = ci.cloneColorInterpretation();
+		} else {
+			if(provider.getDataType()[0] == Buffer.TYPE_BYTE) {
+				if(provider.getBandCount() == 3)
+					ci = DataStoreColorInterpretation.createRGBAInterpretation();
+				else
+					ci = DataStoreColorInterpretation.createDefaultInterpretation(getBandCount());
+			} else {
+				if(getBandCount() == 1)
+					ci = DataStoreColorInterpretation.createGrayInterpretation();
+				else 
+					ci = DataStoreColorInterpretation.createDefaultInterpretation(getBandCount());
+			}
+		}
+
+		super.setColorInterpretation(ci);
+	}
+	
+	
+	public void calculateTransparency() {
+		if(provider.getTransparency() != null)
+			transparency = provider.getTransparency().cloneTransparency();
+		else 
+			transparency = new DataStoreTransparency(getColorInterpretation());
+		if(getColorInterpretation() != null) {
+			transparency.setColorInterpretation(getColorInterpretation());
+			transparency.setTransparencyBand(getColorInterpretation().getAlphaBand());
+			transparency.activeTransparency();
+		}
+	}
+	
+	/**
+	 * Creates a new tiled layer if this hasn't been created yet or the ID has changed. 
+	 * An ID could changed because the file type has changed when the user uses WMTS properties.
+	 */
+	private void createTiledLayer() {
+		TileCacheManager  manager = TileCacheLocator.getManager();
+		TileCache tileCache = manager.getTileCache(RasterLibrary.pathTileCache);
+		TiledLayer newLayer = tileCache.createLayer(provider.getTileServer(), TileCacheLibrary.DEFAULT_STRUCTURE);
+		if(tiledLayer == null || newLayer.getID().compareTo(tiledLayer.getID()) != 0)
+			tiledLayer = newLayer;
+	}
+	
+	public void reload() {
+		try {
+			loadFromRmf(getRmfBlocksManager());
+			calculateColorInterpretation();
+			calculateTransparency();
+		} catch (ParsingException e) {
+			logger.debug("No se ha podido leer el RMF", e);
+		}
+	}
+	
+	public int getZoomLevels() {
+		if(provider.getTileServer() != null)
+			return provider.getTileServer().getStruct().getNumberOfLevels();
+		return 0;
+	}
+	
+	public int getNearestLevel(double pixelSize) {
+		double[] pixelSizes = getPixelSizeByLevel();
+		for (int i = 0; i < pixelSizes.length - 1; i++) {
+			if(pixelSize <= pixelSizes[i] && pixelSize > pixelSizes[i + 1]) {
+				return i;
+			}
+		}
+		if(pixelSize < pixelSizes[getZoomLevels() - 1])
+			return getZoomLevels() - 1;
+		return 0;
+	}
+	
+	/**
+	 * Returns a list of pixel sizes by level
+	 * @return
+	 */
+	public double[] getPixelSizeByLevel() {
+		double[] list = new double[getZoomLevels()];
+		CacheStruct struct = provider.getTileServer().getStruct();
+		for (int i = 0; i < struct.getNumberOfLevels(); i++) {
+			list[i] = math.adjustDouble(struct.getPixelSizeByLevel(i));
+		}
+		return list;
+	}
+	
+	public Extent getCoordsInTheNearestLevel(Extent extent, int w, int h) {
+		double[] pixelSizes = getPixelSizeByLevel();
+		double currentPixelSize = extent.width() / (double)w;
+		
+		int level = 0;
+		for (int i = 0; i < (pixelSizes.length - 1); i++) {
+			if(currentPixelSize < pixelSizes[i] && currentPixelSize >= pixelSizes[i + 1]) {
+				level = i + 1;
+				break;
+			}
+		}
+		
+		return getZoomLevelCoordinates(level, extent, w, h);
+	}
+	
+	public Extent getCoordsInLevel(Point2D viewCenter, int level, int w, int h) {
+		level = adjustLevel(level);
+		double pixelSize = provider.getTileServer().getStruct().getPixelSizeByLevel(level);
+		
+		/*Rectangle2D worldExtent = provider.getTileServer().getStruct().getWorldExtent();
+		int nTiles = provider.getTileServer().getStruct().getLayerWidthOfTileMatrixByLevel(level);
+		int[] nPixelsByTile = provider.getTileServer().getStruct().getTileSizeByLevel(level);
+		
+		double sizeWCByTile = worldExtent.getWidth() / (double)nTiles;
+		double pixelSize = sizeWCByTile / (double)nPixelsByTile[0];*/
+		
+		double ulx = viewCenter.getX() - ((w / 2) * pixelSize);
+		double uly = viewCenter.getY() - ((h / 2) * pixelSize);
+		double lrx = ulx + (w * pixelSize);
+		double lry = uly + (h * pixelSize);
+		return new ExtentImpl(ulx, uly, lrx, lry);
+	}
+	
+	/**
+	 * Adjust de level to the range
+	 * @param level
+	 * @return
+	 */
+	private int adjustLevel(int level) {
+		if(level < 0)
+			level = 0;
+		if(level > getZoomLevels())
+			level = getZoomLevels();
+		return level;
+	}
+	
+	public AffineTransform getAffineTransform() {
+		return provider.getAffineTransform();
+	}
+	
+	/**
+	 * Gets the bounding box in world coordinates. If the layer has grid subsets (TileMatrixLimits) then
+	 * this will have a only extent but if the layer doesn't have grid subsets then this will have a different
+	 * extent in each level resolution. In this case we need to know the extent for each level.
+	 * @return Extent
+	 */
+	public Extent getExtent() {
+		return provider.getExtent();
+	}
+
+	public RasterProvider load() {
+		return this;
+	}
+	
+	public boolean isOpen() {
+		return open;
+	}
+
+	public boolean isTiled() {
+		return true;
+	}
+	
+	public void close() {
+		open = false;
+		if(provider != null)
+			provider.close();
+	}
+	
+	public String translateFileName(String fileName) {
+		return fileName;
+	}
+
+	public void setView(Extent e) {
+		viewRequest = e;
+	}
+
+	public Extent getView() {
+		return viewRequest;
+	}
+
+	public double getWidth() {
+		return provider.getWidth();
+	}
+
+	public double getHeight() {
+		return provider.getHeight();
+	}
+
+	public Object readCompleteLine(int line, int band)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		return null;
+	}
+	
+	public File getFileLayer() throws RasterDriverException {
+		return null;
+	}
+
+	@SuppressWarnings("deprecation")
+	public Object readBlock(int pos, int blockHeight, double scale) 
+	throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException {
+		//TODO: temporal hasta que haya un generador de estadísticas parciales para realce.
+		//Pongo este método deprecated porque el objetivo es eliminarlo de los proveedores.
+		if(provider.getBandCount() < getBandCount()) {
+			switch (getDataType()[0]) {
+			case Buffer.TYPE_BYTE:
+				byte[][][] buf1 = (byte[][][])provider.readBlock(pos, blockHeight, scale);
+				byte[][][] b1 = new byte[buf1.length + 1][][];
+				for (int i = 0; i < buf1.length; i++) {
+					b1[i] = buf1[i];
+				}
+				b1[b1.length - 1] = new byte[buf1[0].length][buf1[0][0].length];
+				return b1;
+			case Buffer.TYPE_SHORT:
+				short[][][] buf2 = (short[][][])provider.readBlock(pos, blockHeight, scale);
+				short[][][] b2 = new short[buf2.length + 1][][];
+				for (int i = 0; i < buf2.length; i++) {
+					b2[i] = buf2[i];
+				}
+				b2[b2.length - 1] = new short[buf2[0].length][buf2[0][0].length];
+				return b2;
+			case Buffer.TYPE_FLOAT:
+				float[][][] buf3 = (float[][][])provider.readBlock(pos, blockHeight, scale);
+				float[][][] b3 = new float[buf3.length + 1][][];
+				for (int i = 0; i < buf3.length; i++) {
+					b3[i] = buf3[i];
+				}
+				b3[b3.length - 1] = new float[buf3[0].length][buf3[0][0].length];
+				return b3;
+			case Buffer.TYPE_DOUBLE: 
+				double[][][] buf4 = (double[][][])provider.readBlock(pos, blockHeight, scale);
+				double[][][] b4 = new double[buf4.length + 1][][];
+				for (int i = 0; i < buf4.length; i++) {
+					b4[i] = buf4[i];
+				}
+				b4[b4.length - 1] = new double[buf4[0].length][buf4[0][0].length];
+				return b4;
+			case Buffer.TYPE_INT:
+				int[][][] buf5 = (int[][][])provider.readBlock(pos, blockHeight, scale);
+				int[][][] b5 = new int[buf5.length + 1][][];
+				for (int i = 0; i < buf5.length; i++) {
+					b5[i] = buf5[i];
+				}
+				b5[b5.length - 1] = new int[buf5[0].length][buf5[0][0].length];
+				return b5;
+			}
+			
+		}
+		return provider.readBlock(pos, blockHeight, scale);
+	}
+
+	public Object getData(int x, int y, int band)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		return provider.getData(x, y, band);
+	}
+	
+	/**
+	 * Assigns the list of bands RGB and read a window of data
+	 * @param rasterBuf
+	 * @param bandList
+	 * @param lastFile
+	 * @param ulx
+	 * @param uly
+	 * @param lrx
+	 * @param lry
+	 * @return
+	 * @throws RasterDriverException
+	 * @throws ProcessInterruptedException
+	 */
+	public Buffer getBuffer(Buffer rasterBuf, BandList bandList, File lastFile, 
+			double ulx, double uly, double lrx, double lry) throws RasterDriverException, ProcessInterruptedException {
+		return null;
+	}
+	
+	/**
+	 * Calculates the extent of a zoom level using other extent as a reference. The new extent is 
+	 * calculated with the same coordinate at the center. 
+	 * @param level
+	 * @param extent
+	 * @param w
+	 * @param h
+	 * @return
+	 */
+	public Extent getZoomLevelCoordinates(int level, Extent extent, int w, int h) {
+		double centerX = extent.getCenterX();
+		double centerY = extent.getCenterY();
+		return getCoordsInLevel(new Point2D.Double(centerX, centerY), level, w, h);
+	}
+	
+	public boolean isRasterEnclosed() {
+		if(provider != null)
+			return provider.isRasterEnclosed();
+		return super.isRasterEnclosed();
+	}
+	
+	/**
+	 * Gets the tile list in a selected extent
+	 * @param ex
+	 * @param bandList
+	 * @param bufWidth
+	 * @param bufHeight
+	 * @return
+	 * @throws TileBuildException 
+	 */
+	private List<Tile> getTileList(SpiRasterQuery q) throws TileBuildException {
+		TileServer tileServer = provider.getTileServer();
+		CacheStruct struct = tileServer.getStruct();
+		tileServer.setFileSuffix(getFileSuffix());
+		
+		createTiledLayer(); //Creates a new layer when the file type changes
+		
+		double pixelSizeRequest = q.getRequestBoundingBox().width() / q.getBufWidth();
+		
+		List<Tile> tileList = struct.getTileList(
+					q.getAdjustedRequestBoundingBox().getUL(), 
+					q.getAdjustedRequestBoundingBox().getLR(), 
+					pixelSizeRequest);
+
+		for (int i = 0; i < tileList.size(); i++) {
+			loadTileTimeParameters(tileList.get(i));
+		}
+		
+		for (int i = 0; i < tileList.size(); i++) {
+			tileList.get(i).setDownloaderParams("BandList", q.getBandList().clone());
+		}
+		return tileList;
+	}
+	
+	/**
+	 * Loads the multidimensional parameters in a tile 
+	 * @param tile
+	 */
+	private void loadTileTimeParameters(Tile tile) {
+		if(provider.getDataParameters() instanceof MultiDimensionalStoreParameters) {
+			MultiDimensionalStoreParameters par = (MultiDimensionalStoreParameters)provider.getDataParameters();
+			tile.setVariable(par.getStringVariable());
+			tile.setZ(par.getStringLevel());
+			tile.setTimeInstant(par.getStringTime());
+		}
+	}
+	
+	public boolean needEnhanced() {
+		return provider.needEnhanced();
+	}
+	
+	public Tile getTile(SpiRasterQuery q) throws TileGettingException {
+		if(q.getCacheStruct() == null)
+			q.setCacheStruct(provider.getTileServer().getStruct());
+		else
+			provider.getTileServer().setStruct(q.getCacheStruct());
+		
+		Tile tile = null;
+		try {
+			tile = q.getCacheStruct().getTileStructure(
+					q.getResolutionLevel(), q.getTileCol(), q.getTileRow(), 
+					q.getAdjustedRequestBoundingBox().getUL(), 
+					q.getAdjustedRequestBoundingBox().getLR());
+		} catch (TileBuildException e1) {
+			throw new TileGettingException(e1);
+		}
+		
+		loadTileTimeParameters(tile);
+		
+		//Creamos un BandList con todas las bandas del fichero
+		BandList bandList = new BandListImpl();
+		for(int i = 0; i < provider.getBandCount(); i++) {
+			try {
+				DatasetBand band = new DatasetBandImpl(provider.getURIOfFirstProvider(), i, provider.getDataType()[i], provider.getBandCount());
+				bandList.addBand(band);
+			} catch(BandNotFoundInListException e) {
+				//No añadimos la banda
+			}
+		}
+		bandList.setDrawableBands(new int[]{0, 1, 2});
+		
+		tile.setDownloaderParams("BandList", bandList);
+		createTiledLayer();
+		return tiledLayer.getTile(tile);
+	}
+	
+	@Override
+	public void loadBuffer(SpiRasterQuery q) 
+			throws ProcessInterruptedException, RasterDriverException {
+		try {
+			
+			if(q.requestIsTiled()) {
+				List<Tile> tileList = getTileList(q);
+				tiledLayer.getTiles(tileList, q.getTileListener(), q.getTaskStatus());
+			} else {
+				if(provider.isTiled()) {
+					queryToInternalTiledProvider(q);
+				} else {
+					queryToInternalProvider(q);
+				}
+			}
+			
+		} catch (TileGettingException e) {
+			throw new RasterDriverException("Error getting the tile list", e);
+		} catch (TileBuildException e) {
+			throw new RasterDriverException("Error building the tile list", e);
+		} catch (QueryException e) {
+			throw new RasterDriverException("Error querying to the internal provider", e);
+		}
+		
+	}
+	
+	private void queryToInternalTiledProvider(SpiRasterQuery parentQuery) throws TileGettingException, TileBuildException {
+		List<Tile> tileList = getTileList(parentQuery);
+		for (int i = 0; i < tileList.size(); i++) {
+			tiledLayer.getTile(tileList.get(i));
+		}
+		MemoryTileMatrixBuffer matrixBuffer = new MemoryTileMatrixBuffer(tileList);
+		Buffer buf = matrixBuffer.getWindow(parentQuery.getAdjustedRequestBoundingBox(), parentQuery.getBufWidth(), parentQuery.getBufHeight(), parentQuery.getBandList().getDrawableBandsCount());
+		parentQuery.setBufferResult(buf);
+	}
+	
+	private void queryToInternalProvider(SpiRasterQuery parentQuery) throws ProcessInterruptedException, QueryException {
+		DefaultRasterStore store = new DefaultRasterStore();
+		store.setProvider(provider);
+		
+		RasterQuery query = RasterLocator.getManager().createQuery();
+		query.setAreaOfInterest(parentQuery.getAdjustedRequestBoundingBox(), parentQuery.getBufWidth(), parentQuery.getBufHeight());
+		int[] dBands = null;
+		if(parentQuery.getDrawableBands() != null) {
+			dBands = parentQuery.getDrawableBands().clone();
+			if(!((AbstractRasterProvider)provider).getTransparency().existAlphaBand() && getTransparency().existAlphaBand()) {
+				dBands[getTransparency().getAlphaBandNumber()] = -1; 
+			}
+		}
+		query.setReadOnly(((RasterQuery)parentQuery).isReadOnly());
+		if(((RasterQuery)parentQuery).isforcingARGBRequest())
+			query.forceARGBRequest();
+		if(((RasterQuery)parentQuery).isforcingRGBRequest())
+			query.forceRGBRequest();
+		if(dBands == null)
+			query.setAllDrawableBands();
+		else
+			query.setDrawableBands(dBands);
+		query.setAdjustToExtent(true);
+		store.query(query);
+		parentQuery.setBufferResult(((SpiRasterQuery)query).getBufferForProviders());
+	}
+
+	public int getBlockSize() {
+		return 0;
+	}
+
+	public void setAffineTransform(AffineTransform t){
+		
+	}
+
+	public int getOverviewCount(int band) throws BandAccessException, RasterDriverException {
+		return getZoomLevels();
+	}
+
+	public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException {
+		return provider.getTileServer().getStruct().getLayerWidthOfTileMatrixByLevel(overview) * 
+				provider.getTileServer().getStruct().getTileSizeByLevel(overview)[0];
+	}
+
+	public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException {
+		return provider.getTileServer().getStruct().getLayerHeightOfTileMatrixByLevel(overview) * 
+				provider.getTileServer().getStruct().getTileSizeByLevel(overview)[0];
+	}
+
+	public boolean isOverviewsSupported() {
+		return false;
+	}
+
+	public String getProviderName() {
+		return NAME;
+	}
+	
+	/**
+	 * Convierte un punto desde coordenadas pixel a coordenadas del mundo.
+	 * @param pt Punto a transformar
+	 * @return punto transformado en coordenadas del mundo
+	 */
+	public Point2D rasterToWorld(Point2D pt) {
+		Point2D p = new Point2D.Double();
+		getAffineTransform().transform(pt, p);
+		return p;
+	}
+
+	/**
+	 * Convierte un punto desde del mundo a coordenadas pixel.
+	 * @param pt Punto a transformar
+	 * @return punto transformado en coordenadas pixel
+	 */
+	public Point2D worldToRaster(Point2D pt) {
+		Point2D p = new Point2D.Double();
+		try {
+			getAffineTransform().inverseTransform(pt, p);
+		} catch (NoninvertibleTransformException e) {
+			return pt;
+		}
+		return p;
+	}
+	
+	public void setStatus(RasterProvider provider) {
+		if(provider instanceof TileProvider) {
+		}
+	}
+	
+	/**
+	 * ASigna el parámetro de inicialización del driver.
+	 */
+	@Override
+	public void setParam(DataStoreProviderServices storeServices, DataStoreParameters param) {
+		if(param instanceof RemoteStoreParameters)
+			this.uri = ((RasterDataParameters)param).getURI();
+		this.param = param;
+		this.storeServices = storeServices;
+	}
+	
+	public String getInfoByPoint(double x, double y, ICancellable cancellable) throws InfoByPointException {
+		if(provider != null)
+			return provider.getInfoByPoint(x, y, cancellable);
+		return "Not implemented";
+	}
+	
+	public String getInfoByPoint(int x, int y, Extent bbox, int w, int h, ICancellable cancellable) throws InfoByPointException {
+		if(provider != null)
+			return provider.getInfoByPoint(x, y, bbox, w, h, cancellable);
+		return "Not implemented";
+	}
+	
+	public int[] getTileSize(int level) {
+		return provider.getTileServer().getStruct().getTileSizeByLevel(level);
+	}
+	
+	public void deleteLayerFromCache() {
+		TileCacheManager  manager = TileCacheLocator.getManager();
+		TileCache tileCache = manager.getTileCache(RasterLibrary.pathTileCache);
+		if(tiledLayer != null)
+			tileCache.removeLayer(tiledLayer);
+	}
+	
+	public TileServer getTileServer() {
+		return secondLevelTileServer;
+	}
+	
+	public void setSecondLevelTileServer(TileServer tileServer) {
+		this.secondLevelTileServer = tileServer;
+	}
+	
+	public void setTileServer(Class<?> tileServer) throws InitializeException {
+		//TODO:Manejar excepciones
+		//Crear parámetros
+		TileDataParametersImpl par = new TileDataParametersImpl();
+		par.setDataParameters(getDataParameters());
+		par.setSecondLevelCache(true); //No crea un nuevo provider
+		
+		//Crea el proveedor de tiles de segundo nivel
+		TileProvider newProvider = null;
+		newProvider = new TileProvider(par, null);
+		newProvider.setProvider(this.provider);
+
+		//Instancia el TileServer pasado por el cliente con el TileProvider de segundo nivel
+		Constructor<?> constructor;
+		TileServer tServer = null;
+		try {
+			constructor = tileServer.getConstructor(new Class<?>[]{AbstractRasterProvider.class});
+			Object [] args2 = {newProvider};
+			tServer = (TileServer)constructor.newInstance(args2);
+		} catch (SecurityException e) {
+			e.printStackTrace();
+		} catch (NoSuchMethodException e) {
+			e.printStackTrace();
+		} catch (IllegalArgumentException e) {
+			e.printStackTrace();
+		} catch (InstantiationException e) {
+			e.printStackTrace();
+		} catch (IllegalAccessException e) {
+			e.printStackTrace();
+		} catch (InvocationTargetException e) {
+			e.printStackTrace();
+		}
+		
+		//Asigna el TileServer al nuevo provider de segundo nivel
+		newProvider.setSecondLevelTileServer(tServer);
+		
+		//Asigna al provider de tiles de primer nivel el de segundo. 
+		//Solo si las estructuras de caché son diferentes
+		if(!provider.getTileServer().getStruct().compare(tServer.getStruct())) {
+			this.setProvider(newProvider);
+			tiledLayer = null;
+		}
+	}
+	
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorerParameters.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorerParameters.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorerParameters.java	(revision 3305)
@@ -0,0 +1,124 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+/*
+* AUTHORS (In addition to CIT):
+* 2009 IVER T.I   {{Task}}
+*/
+
+package org.gvsig.raster.tilecache.io;
+
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException;
+import org.gvsig.tools.dynobject.exception.DynMethodException;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+
+/**
+ * Parameters for the WMTS provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileServerExplorerParameters implements DataServerExplorerParameters {
+	public static final String     DYNCLASS_NAME    = "TileExplorerParameters";
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.dal.DataServerExplorerParameters#getExplorerName()
+	 */
+	public String getExplorerName() {
+		return TileServerExplorer.NAME;
+	}
+
+	public void clear() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public DataParameters getCopy() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void validate() throws ValidateDataParametersException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void loadFromState(PersistentState state)
+			throws PersistenceException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void saveToState(PersistentState state) throws PersistenceException {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public void delegate(DynObject dynObject) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public DynClass getDynClass() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Object getDynValue(String name) throws DynFieldNotFoundException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public boolean hasDynValue(String name) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public void implement(DynClass dynClass) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public Object invokeDynMethod(String name, DynObject context)
+			throws DynMethodException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Object invokeDynMethod(int code, DynObject context)
+			throws DynMethodException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public void setDynValue(String name, Object value)
+			throws DynFieldNotFoundException {
+		// TODO Auto-generated method stub
+		
+	}
+
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileServerExplorerParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileDataParametersImpl.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileDataParametersImpl.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileDataParametersImpl.java	(revision 3305)
@@ -0,0 +1,218 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA  02110-1301, USA.
+*
+*/
+
+package org.gvsig.raster.tilecache.io;
+
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.RemoteStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.TileDataParameters;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
+import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+import org.gvsig.tools.dynobject.DynStruct;
+import org.gvsig.tools.persistence.PersistenceManager;
+
+/**
+ * Parameters for the <code>TileProvider</code>
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileDataParametersImpl extends AbstractRasterFileDataParameters implements TileDataParameters {
+	public static final String       FIELD_PARAMETERS      = "parameters";
+	public static final String       FIELD_SECONDLEVEL     = "secondlevel";
+	public static final String       FIELD_NAME            = "name";
+	private static final String      FIELD_DELETECACHE     = "deletecache";
+	
+	private DelegatedDynObject       delegatedDynObject    = null;
+	private TileServer               tileServer            = null;
+	
+	public TileDataParametersImpl() {
+		super();
+		initialize();
+	}
+	
+	protected void initialize() {
+		this.delegatedDynObject = (DelegatedDynObject) ToolsLocator
+				.getDynObjectManager().createDynObject(
+						registerDynClass());
+	}
+	
+	public static DynStruct registerDynClass() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("TileDataParameters_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					TileDataParametersImpl.class,
+					"TileDataParameters_Persistent",
+					"TileDataParameters Persistency",
+					null, 
+					null
+					);
+		}
+
+		AbstractRasterDataParameters.registerDynClass(definition);
+
+		definition.addDynFieldObject(FIELD_PARAMETERS)
+		.setDescription("Provider")
+		.setClassOfValue(RasterDataParameters.class)
+		.setMandatory(true);
+
+		definition.addDynFieldBoolean(FIELD_SECONDLEVEL)
+		.setDescription("SecondLevelProvider")
+		.setMandatory(false);
+
+		definition.addDynFieldString(FIELD_NAME)
+		.setDescription("Name")
+		.setMandatory(false);
+
+		definition.addDynFieldBoolean(FIELD_DELETECACHE)
+		.setDescription("Flag to delete cache the next request")
+		.setMandatory(false);
+		return definition;
+	}
+
+	/**
+	 * Sets the <code>DataParameters</code>
+	 * @param params
+	 */
+	public void setDataParameters(DataParameters params) {
+		this.setDynValue(FIELD_PARAMETERS, params);
+	}
+	
+	public DataParameters getDataParameters() {
+		return (DataParameters) this.getDynValue(FIELD_PARAMETERS);
+	}
+
+	/**
+	 * Sets the <code>TileServer</code>
+	 * @param tileServer
+	 */
+	public void setTileServer(TileServer tileServer) {
+		this.tileServer = tileServer;
+	}
+
+	/**
+	 * Gets the <code>TileServer</code>
+	 * @return
+	 */
+	public TileServer getTileServer() {
+		return tileServer;
+	}
+	
+	/**
+	 * Returns true if this provider is for the second level of caché
+	 * @return
+	 */
+	public boolean isSecondLevelCache() {
+		Object obj = this.getDynValue(FIELD_SECONDLEVEL);
+		if(obj != null && obj instanceof Boolean)
+			return ((Boolean)obj).booleanValue();
+		return false;
+	}
+	
+	/** 
+	 * Sets the flag to inform to the provider that is a second level provider
+	 * @param secondLevel
+	 */
+	public void setSecondLevelCache(boolean secondLevel) {
+		this.setDynValue(FIELD_SECONDLEVEL, new Boolean(secondLevel));
+	}
+	
+	/**
+	 * Gets the name
+	 * @return
+	 */
+	public String getName() {
+		DataParameters p = getDataParameters();
+		if(p != null) {
+			if(p instanceof RemoteStoreParameters)
+				return ((RasterDataParameters)p).getURI();
+			if(p instanceof FilesystemStoreParameters)
+				return ((FilesystemStoreParameters)p).getFile().getAbsolutePath();
+		}
+		return null;
+	}
+	
+	@Override
+	public String getURI() {
+		if(this.getDynValue(FIELD_URI) == null) {
+			DataParameters p = getDataParameters();
+			if(p != null) {
+				if(p instanceof RemoteStoreParameters)
+					return ((RasterDataParameters)p).getURI();
+				if(p instanceof FilesystemStoreParameters)
+					return ((FilesystemStoreParameters)p).getFile().getAbsolutePath();
+			}
+		}
+		return (String) this.getDynValue(FIELD_URI);
+	}
+
+
+	//**********************************************
+	
+	public String getDataStoreName() {
+		return TileProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return TileProvider.DESCRIPTION;
+	}
+
+	public String getExplorerName() {
+		return TileServerExplorer.NAME;
+	}
+	
+	public boolean isValid() {
+		return (this.getDataParameters() != null);
+	}
+	
+	protected DelegatedDynObject getDelegatedDynObject() {
+		return delegatedDynObject;
+	}
+	
+	/**
+	 * Sets the flag to delete the cache 
+	 * @param deleteCache
+	 */
+	public void deleteCache(boolean deleteCache) {
+		this.setDynValue(FIELD_DELETECACHE, new Boolean(deleteCache));
+	}
+	
+	/**
+	 * Returns true if the cache is going to be deleted
+	 * @return
+	 */
+	public boolean isDeletingCache() {
+		Boolean b = (Boolean)getDynValue(FIELD_DELETECACHE);
+		if(b != null)
+			return ((Boolean)getDynValue(FIELD_DELETECACHE)).booleanValue();
+		else 
+			return false;
+	}
+	
+	public boolean isSourceTiled() {
+		return true;
+	}
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/src/main/java/org/gvsig/raster/tilecache/io/TileDataParametersImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/pom.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/pom.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/pom.xml	(revision 3305)
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.tilecache.io</artifactId>
+	<packaging>jar</packaging>
+	<version>2.2.4</version>
+	<name>org.gvsig.raster.tilecache.io</name>
+	<parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.raster.tilecache</artifactId>
+        <version>2.2.4</version>
+    </parent>
+	<dependencies>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.cache.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.cache.lib.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.geometry.operation</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+	</dependencies>
+</project>

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/README.txt
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/README.txt	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/README.txt	(revision 3305)
@@ -0,0 +1,8 @@
+Put into this folder the resources needed by your test classes.
+
+This folder is added to the Tests classpath, so you can load any resources 
+through the ClassLoader.
+
+By default, in this folder you can find an example of log4j configuration,
+prepared to log messages through the console, so logging works when you
+run your tests classes.
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/README.txt
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/log4j.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/log4j.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/log4j.xml	(revision 3305)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- 
+Log4J configuration file for unit tests execution.
+ -->
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+	<!-- Appender configuration to show logging messages through the console -->
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
+		</layout>
+	</appender>
+
+	<!-- 
+	Activate logging messages of DEBUG level of higher only for the
+	org.gvsig.tools packages.
+	You can put full classes names or packages instead, to configure
+	logging for all the classes and subpackages of the package.
+	-->
+	<category name="org.gvsig.tools">
+		<priority value="DEBUG" />
+	</category>
+	<category name="org.gvsig.raster">
+		<priority value="DEBUG" />
+	</category>
+
+	<!-- 
+	By default, show only logging messages of INFO level or higher, 
+	through the previously configured CONSOLE appender. 
+	-->
+	<root>
+		<priority value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/log4j.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 3305)
@@ -0,0 +1 @@
+org.gvsig.raster.cache.io.DefaultCacheIOLibrary
Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/TemplateRasterProvider.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/TemplateRasterProvider.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/TemplateRasterProvider.java	(revision 3305)
@@ -0,0 +1,500 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+package org.gvsig.fmap.dal.coverage.dataset.io.netcdf;
+
+import java.awt.geom.AffineTransform;
+
+import org.gvsig.fmap.dal.DALFileLocator;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.coverage.dataset.Buffer;
+import org.gvsig.fmap.dal.coverage.dataset.io.tile.downloader.FileTileServer;
+import org.gvsig.fmap.dal.coverage.datastruct.BandList;
+import org.gvsig.fmap.dal.coverage.datastruct.Extent;
+import org.gvsig.fmap.dal.coverage.exception.BandAccessException;
+import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException;
+import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException;
+import org.gvsig.fmap.dal.coverage.exception.NotSupportedExtensionException;
+import org.gvsig.fmap.dal.coverage.exception.ParsingException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.fmap.dal.coverage.store.RasterFileStoreParameters;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.raster.cache.tile.provider.TileListener;
+import org.gvsig.raster.cache.tile.provider.TileServer;
+import org.gvsig.raster.impl.datastruct.ExtentImpl;
+import org.gvsig.raster.impl.provider.DefaultRasterProvider;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.store.AbstractRasterDataParameters;
+import org.gvsig.raster.impl.store.AbstractRasterDataStore;
+import org.gvsig.raster.impl.store.DefaultStoreFactory;
+import org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation;
+import org.gvsig.raster.impl.store.properties.DataStoreMetadata;
+import org.gvsig.raster.impl.store.properties.DataStoreTransparency;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+/**
+ * Data provider for ...
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFProvider extends DefaultRasterProvider {
+	public static String        NAME                     = "Template Store";
+	public static String        DESCRIPTION              = "Template Raster file";
+	public final String         METADATA_DEFINITION_NAME = "TemplateStore";
+	
+	private static String[]     formatList               = new String[]{"*"};
+
+	private Extent              viewRequest              = null;
+	private TileServer          tileServer               = null;
+	private boolean             open                     = false;
+
+	public static void register() {
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
+			dataman.registerStoreProvider(NAME,
+					NetCDFProvider.class, NetCDFDataParameters.class);
+		}
+		
+		if(DALFileLocator.getFilesystemServerExplorerManager() != null)
+			DALFileLocator.getFilesystemServerExplorerManager().registerProvider(
+					NAME, DESCRIPTION,
+					NetCDFFilesystemServerExplorer.class);
+		
+		dataman.registerStoreFactory(NAME, DefaultStoreFactory.class);
+	}
+	
+	
+	/**
+	 * Returns true if the extension is supported and false if doesn't
+	 * @param ext
+	 * @return
+	 */
+	public static boolean isExtensionSupported(String ext) {
+		for (int i = 0; i < formatList.length; i++) {
+			if(formatList[i].compareTo(ext) == 0)
+				return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * Constructor. Abre el dataset.
+	 * @param proj Proyección
+	 * @param fName Nombre del fichero
+	 * @throws NotSupportedExtensionException
+	 */
+	public NetCDFProvider(String params) throws NotSupportedExtensionException {
+		super(params);
+		if(params instanceof String) {
+			NetCDFDataParameters p = new NetCDFDataParameters();
+			p.setURI((String)params);
+			super.init(p, null, ToolsLocator.getDynObjectManager()
+					.createDynObject(
+							MetadataLocator.getMetadataManager().getDefinition(
+									DataStore.METADATA_DEFINITION_NAME)));
+			init(p, null);
+		}
+	}
+	
+	public NetCDFProvider (NetCDFDataParameters params,
+			AbstractRasterDataStore storeServices) throws NotSupportedExtensionException {
+		super(params, storeServices, ToolsLocator.getDynObjectManager()
+				.createDynObject(
+						MetadataLocator.getMetadataManager().getDefinition(
+								DataStore.METADATA_DEFINITION_NAME)));
+		init(params, storeServices);
+	}
+
+	/**
+	 * Crea las referencias al fichero y carga
+	 * las estructuras con la información y los metadatos.
+	 * @param proj Proyección
+	 * @param param Parametros de carga
+	 * @throws NotSupportedExtensionException
+	 */
+	public void init (AbstractRasterDataParameters params,
+			DataStoreProviderServices storeServices) throws NotSupportedExtensionException {
+		//TODO:
+		
+		if(((RasterFileStoreParameters)params).getFile().exists()) {
+			setParam(params);
+			colorTable = null;
+			noData = 0;
+			wktProjection = null;
+			//CrsWkt crs = new CrsWkt(wktProjection);
+			//IProjection proj = CRSFactory.getCRS("EPSG:23030");
+			noDataEnabled = true;
+			ownTransformation = null;
+			externalTransformation = (AffineTransform)ownTransformation.clone();
+			load();
+		} else
+			setParam(params);
+		bandCount = 0;
+		setDataType(null);
+		super.init();
+
+		try {
+			loadFromRmf(getRmfBlocksManager());
+		} catch (ParsingException e) {
+			//No lee desde rmf
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#load()
+	 */
+	public RasterProvider load() {
+		return this;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#isOpen()
+	 */
+	public boolean isOpen() {
+		return open;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#close()
+	 */
+	public void close() {
+		//TODO:
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#translateFileName(java.lang.String)
+	 */
+	public String translateFileName(String fileName) {
+		return fileName;
+	}
+
+	/**
+	 * Asigna el extent de la vista actual. existe un fichero .rmf debemos hacer una transformación
+	 * de la vista asignada ya que la petición viene en coordenadas del fichero .rmf y la vista (v)
+	 * ha de estar en coordenadas del fichero.
+	 */
+	public void setView(Extent e) {
+		viewRequest = new ExtentImpl(e);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getView()
+	 */
+	public Extent getView() {
+		return viewRequest;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWidth()
+	 */
+	public double getWidth() {
+		//TODO:
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getHeight()
+	 */
+	public double getHeight() {
+		//TODO:
+		return 0;
+	}
+
+	/**
+	 * Read a line from the file
+	 * @param line
+	 * @param band
+	 * @return
+	 * @throws InvalidSetViewException
+	 * @throws FileNotOpenException
+	 * @throws RasterDriverException
+	 * @Deprecated This operation is deprecated because is not useful and in the future
+	 * it will not be maintained. The abstract operation has dissapear
+	 */
+	public Object readCompleteLine(int line, int band)throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		if(line > this.getHeight() || band > this.getBandCount())
+			throw new InvalidSetViewException("Request out of grid");
+
+		//TODO:
+		return null;
+	}
+
+	/*
+	 *  (non-Javadoc)
+	 * @see org.gvsig.raster.dataset.RasterDataset#readBlock(int, int)
+	 */
+	public Object readBlock(int pos, int blockHeight)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException {
+		if(pos < 0)
+			throw new InvalidSetViewException("Request out of grid");
+
+		if((pos + blockHeight) > getHeight())
+			blockHeight = Math.abs(((int)getHeight()) - pos);
+		
+		//TODO:
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getData(int, int, int)
+	 */
+	public Object getData(int x, int y, int band)throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		if(x < 0 || y < 0 || x >= getWidth() || y >= getHeight())
+			throw new InvalidSetViewException("Request out of grid");
+		
+		//TODO
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.raster.cache.tile.provider.TileListener)
+	 */
+	public void getWindow(Extent ex, int bufWidth, int bufHeight, 
+			BandList bandList, TileListener listener) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(org.gvsig.fmap.dal.coverage.datastruct.Extent, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer)
+	 */
+	public Buffer getWindow(Extent ex, BandList bandList, Buffer rasterBuf) 
+		throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer, boolean)
+	 */
+	public Buffer getWindow(double ulx, double uly, double w, double h, 
+			BandList bandList, Buffer rasterBuf, boolean adjustToExtent) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer, boolean)
+	 */
+	public Buffer getWindow(Extent extent, 
+			int bufWidth, int bufHeight, BandList bandList, Buffer rasterBuf, boolean adjustToExtent) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+		
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(int, int, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer)
+	 */
+	public Buffer getWindow(int x, int y, int w, int h, 
+			BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+		
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(int, int, int, int, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer)
+	 */
+	public Buffer getWindow(int x, int y, int w, int h, 
+			int bufWidth, int bufHeight, BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException {
+		//TODO
+		
+		return rasterBuf;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getBlockSize()
+	 */
+	public int getBlockSize(){
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getMetadata()
+	 */
+	public DataStoreMetadata getMetadata() {
+		//TODO
+		
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getColorInterpretation()
+	 */
+	public DataStoreColorInterpretation getColorInterpretation(){
+		//TODO
+		
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#setColorInterpretation(org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation)
+	 */
+	public void setColorInterpretation(DataStoreColorInterpretation colorInterpretation){
+		//TODO
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getTransparency()
+	 */
+	public DataStoreTransparency getTransparency() {
+		//TODO
+		
+		return null;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#isGeoreferenced()
+	 */
+	public boolean isGeoreferenced() {
+		//TODO
+		
+		return false;
+	}
+
+	/**
+	 * Informa de si el driver ha supersampleado en el último dibujado. Es el driver el que colocará
+	 * el valor de esta variable cada vez que dibuja.
+	 * @return true si se ha supersampleado y false si no se ha hecho.
+	 */
+	public boolean isSupersampling() {
+		//TODO
+		
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#setAffineTransform(java.awt.geom.AffineTransform)
+	 */
+	public void setAffineTransform(AffineTransform t){
+		super.setAffineTransform(t);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#getOverviewCount(int)
+	 */
+	public int getOverviewCount(int band) throws BandAccessException, RasterDriverException {
+		if(band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getOverviewWidth(int, int)
+	 */
+	public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException {
+		if (band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getOverviewHeight(int, int)
+	 */
+	public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException {
+		if (band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		//TODO
+		
+		return 0;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#overviewsSupport()
+	 */
+	public boolean overviewsSupport() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.DefaultRasterProvider#isReproyectable()
+	 */
+	public boolean isReproyectable() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.dal.spi.DataStoreProvider#getName()
+	 */
+	public String getName() {
+		return NAME;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#setStatus(org.gvsig.raster.impl.provider.RasterProvider)
+	 */
+	public void setStatus(RasterProvider provider) {
+		if(provider instanceof NetCDFProvider) {
+			//Not implemented yet
+		}
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.raster.impl.provider.RasterProvider#getTileServer()
+	 */
+	public TileServer getTileServer() {
+		if(tileServer == null)
+			tileServer = new FileTileServer(this);
+		return tileServer;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io/resources/TemplateRasterProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.io
___________________________________________________________________
Added: svn:ignore
   + target

.classpath

.settings

.project


Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/pom.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/pom.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/pom.xml	(revision 3305)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.tilecache</artifactId>
+	<packaging>pom</packaging>
+	<groupId>org.gvsig</groupId>
+	<version>2.2.4</version>
+	<name>${project.artifactId}</name>
+	<description>cache service for gvSIG</description>
+	<inceptionYear>2011</inceptionYear>
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.90</version>
+  </parent>
+
+        <properties>
+            <!-- El plugin versions:use-latest-versions falla con scope import -->
+            <!-- asi que toca usar el versions:update-properties que si que funciona -->
+            <org.gvsig.raster.version>2.2.11</org.gvsig.raster.version>
+        </properties>
+     
+     <repositories>
+      <repository>
+        <id>gvsig-public-http-repository</id>
+        <name>gvSIG maven public HTTP repository</name>
+        <url>http://devel.gvsig.org/m2repo/j2se</url>
+        <releases>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </snapshots>
+      </repository>
+    </repositories>
+    
+     <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4</url>
+    </scm>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-release-plugin</artifactId>
+                <configuration>
+                    <tagBase>https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tilecache/tags/</tagBase>
+                    <goals>deploy</goals>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+  <dependencyManagement>
+  	<dependencies>
+                        <dependency>
+                                <groupId>org.gvsig</groupId>
+                                <artifactId>org.gvsig.raster</artifactId>
+                                <version>${org.gvsig.raster.version}</version>
+                                <type>pom</type>
+                                <scope>import</scope>
+                        </dependency>
+
+    	<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.tilecache.io</artifactId>
+				<version>2.2.4</version>
+			</dependency>
+    	<dependency>
+				<groupId>org.gvsig</groupId>
+				<artifactId>org.gvsig.raster.tilecache.app</artifactId>
+				<version>2.2.4</version>
+			</dependency>
+
+    	</dependencies>
+    </dependencyManagement>
+	<modules>
+		<module>org.gvsig.raster.tilecache.io</module>
+		<module>org.gvsig.raster.tilecache.app</module>
+	</modules>
+</project>

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/assembly/gvsig-plugin-package.xml	(revision 3305)
@@ -0,0 +1,37 @@
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    	<file>
+      		<source>target/${project.artifactId}-${project.version}.jar</source>
+      		<outputDirectory>lib</outputDirectory>
+    	</file>
+    	<file>
+      		<source>target/package.info</source>
+    	</file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+	  <useTransitiveDependencies>true</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes> 
+		<include>org.gvsig:org.gvsig.raster.tilecache.app:jar</include>
+		<include>org.gvsig:org.gvsig.raster.tilecache.io:jar</include>
+	  </includes>
+	</dependencySet>
+  </dependencySets>
+</assembly>

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/assembly/gvsig-plugin-package.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/CacheExtension.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/CacheExtension.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/CacheExtension.java	(revision 3305)
@@ -0,0 +1,241 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.awt.Component;
+import java.util.prefs.Preferences;
+
+import javax.swing.JOptionPane;
+
+import org.gvsig.about.AboutManager;
+import org.gvsig.about.AboutParticipant;
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.app.project.documents.view.toc.ITocItem;
+import org.gvsig.fmap.dal.coverage.RasterLibrary;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.raster.cache.tile.TileCache;
+import org.gvsig.raster.cache.tile.TileCacheLibrary;
+import org.gvsig.raster.cache.tile.TileCacheLocator;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+
+
+/**
+ * Tile cache extension for gvSIG
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class CacheExtension extends Extension implements ConfigurationListener {
+
+	public void execute(String actionCommand) {
+		
+	}
+
+	private void addAboutInfo() {
+        ApplicationManager application = ApplicationLocator.getManager();
+        
+        AboutManager about = application.getAbout();
+        about.addDeveloper("PRODEVELOP", getClass().getClassLoader()
+            .getResource("about/tilecache-about.html"), 2);
+
+        AboutParticipant participant = about.getDeveloper("PRODEVELOP");
+        participant.addContribution(
+            "Caché de teselas",
+            "Caché de teselas para fuentes de datos ráster y remotas", 
+            2011,1,1, 
+            2011,1,30
+        );      
+    }
+
+	public void initialize() {
+		IconThemeHelper.registerIcon(null, "pref-tilecache-icon", this);
+		
+		Configuration.addValueChangedListener(this);
+		Preferences prefs = Preferences.userRoot().node("gvsig.foldering");
+		prefs.put("DataFolder", System.getProperty("user.home"));
+		
+		ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
+		ExtensionPoint point = extensionPoints.add("AplicationPreferences");
+		point.append("TileCachePreferences", "", TileCachePreferences.class);
+		
+		TileCacheLibrary.DEFAULT_TILEWIDTH = Configuration.getValue("tilesize", Integer.valueOf(TileCacheLibrary.DEFAULT_TILEWIDTH));
+		TileCacheLibrary.DEFAULT_TILEHEIGHT = TileCacheLibrary.DEFAULT_TILEWIDTH;
+		
+		TileCacheLibrary.ALTERNATIVE_TILESIZE = Configuration.getValue("tilesizewms", Integer.valueOf(TileCacheLibrary.ALTERNATIVE_TILESIZE));
+		
+		ApplicationManager appGvSigMan = ApplicationLocator.getManager();
+		appGvSigMan.registerPrepareOpenLayer(new PrepareLayerAskUsingTiles());
+		appGvSigMan.registerPrepareOpenDataStoreParameters(new PrepareLayerAskUsingTiles());
+	}
+	
+	public boolean isEnabled() {
+		return false;
+	}
+
+	public boolean isVisible() {
+		return false;
+	}
+
+	public void actionConfigurationChanged(ConfigurationEvent e) {
+
+		if (e.getKey().equals("path_tilecache")) {
+			if(e.getValue() instanceof String) {
+				String value = (String)e.getValue();
+				if(value != null && value.compareTo("") != 0) {
+					RasterLibrary.pathTileCache =  (String)e.getValue();
+					TileCache tc = TileCacheLocator.getManager().getTileCache(RasterLibrary.pathTileCache);
+					tc.updateBaseDirectory(RasterLibrary.pathTileCache);
+				}
+			}
+			return;
+		}
+		
+		if (e.getKey().equals("tile_levels")) {
+			if(e.getValue() instanceof String)
+				try {
+					TileCacheLibrary.DEFAULT_LEVELS = new Integer((String) e
+							.getValue()).intValue();
+				} catch (NumberFormatException exc) {
+					//Valor por defecto en la cache
+				}
+			if(e.getValue() instanceof Integer)
+				TileCacheLibrary.DEFAULT_LEVELS = ((Integer) e.getValue()).intValue();
+			return;
+		}
+		
+		if (e.getKey().equals("tilesize")) {
+			if(e.getValue() instanceof String) {
+				try {
+					String text = (String) e.getValue();
+					text = text.replaceAll("\\.", "");
+					text = text.replaceAll(",", "\\.");
+					TileCacheLibrary.DEFAULT_TILEWIDTH = new Integer(text).intValue();
+					TileCacheLibrary.DEFAULT_TILEHEIGHT = TileCacheLibrary.DEFAULT_TILEWIDTH;
+				} catch (NumberFormatException exc) {
+					//Valor por defecto en la cache
+				}
+			}
+			if(e.getValue() instanceof Integer) {
+				TileCacheLibrary.DEFAULT_TILEWIDTH = ((Integer) e.getValue()).intValue();
+				TileCacheLibrary.DEFAULT_TILEHEIGHT = TileCacheLibrary.DEFAULT_TILEWIDTH;
+			}
+			return;
+		}
+		
+		if (e.getKey().equals("tilesizewms")) {
+			if(e.getValue() instanceof String) {
+				try {
+					String text = (String) e.getValue();
+					text = text.replaceAll("\\.", "");
+					text = text.replaceAll(",", "\\.");
+					TileCacheLibrary.ALTERNATIVE_TILESIZE = new Integer(text).intValue();
+				} catch (NumberFormatException exc) {
+					//Valor por defecto en la cache
+				}
+			}
+			if(e.getValue() instanceof Integer) {
+				TileCacheLibrary.ALTERNATIVE_TILESIZE = ((Integer) e.getValue()).intValue();
+			}
+			return;
+		}
+		
+		if (e.getKey().equals("tilecache_size")) {
+			if(e.getValue() instanceof String)
+				try {
+					String text = (String) e.getValue();
+					text = text.replaceAll("\\.", "");
+					text = text.replaceAll(",", "\\.");
+					TileCacheLibrary.MAX_CACHE_SIZE = new Integer((String) e
+							.getValue()).intValue();
+				} catch (NumberFormatException exc) {
+					//Valor por defecto en la cache
+				}
+			if(e.getValue() instanceof Integer)
+				TileCacheLibrary.MAX_CACHE_SIZE = ((Integer) e.getValue()).intValue();
+			return;
+		}
+		
+		if (e.getKey().equals("cache_struct")) {
+			if(e.getValue() instanceof String)
+				TileCacheLibrary.DEFAULT_STRUCTURE = (String)e.getValue();
+			return;
+		}
+	}
+
+	public void execute(ITocItem item, FLayer[] selectedItems) {
+
+	}
+
+	public void postInitialize() {
+		super.postInitialize();
+	//		storeLibrary.postInitialize();
+		addAboutInfo();
+	}
+	
+	/**
+	 * Shows an error dialog with a text and a accept button 
+	 * @param msg Message to show in the dialog
+	 * @param parentWindow Parent window
+	 */
+	public static void messageBoxError(String msg, Object parentWindow){
+		String string = PluginServices.getText(parentWindow, "accept");
+		Object[] options = {string};
+		JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
+					"<html>" + PluginServices.getText(parentWindow, msg).replaceAll("\n", "<br>") + "</html>",
+					PluginServices.getText(parentWindow, "confirmacion"),
+					JOptionPane.OK_OPTION,
+					JOptionPane.ERROR_MESSAGE,
+					null,
+					options,
+					string);
+	}
+	
+	/**
+	 * Shows an error dialog with a text and a YesOrNot button 
+	 * @param msg Message to show in the dialog.
+	 * @param parentWindow Parent window
+	 * @return Selected button by the button. Returns true if the user has selected Yes
+	 * and false if he has selected No. 
+	 */
+	public static boolean messageBoxYesOrNot(String msg, Object parentWindow){
+		String string1 = PluginServices.getText(parentWindow, "yes");
+		String string2 = PluginServices.getText(parentWindow, "no");
+		Object[] options = {string1, string2};
+		int n = JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
+					"<html>" + PluginServices.getText(parentWindow, msg).replaceAll("\n", "<br>") + "</html>",
+					PluginServices.getText(parentWindow, "confirmacion"),
+					JOptionPane.YES_NO_OPTION,
+					JOptionPane.QUESTION_MESSAGE,
+					null,
+					options,
+					string1);
+		if (n == JOptionPane.YES_OPTION)
+			return true;
+		else
+			return false;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/CacheExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/PrepareLayerAskUsingTiles.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/PrepareLayerAskUsingTiles.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/PrepareLayerAskUsingTiles.java	(revision 3305)
@@ -0,0 +1,180 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.awt.Component;
+import java.util.Map;
+
+import javax.swing.JOptionPane;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.prepareAction.PrepareContext;
+import org.gvsig.app.prepareAction.PrepareContextView;
+import org.gvsig.app.prepareAction.PrepareDataStoreParameters;
+import org.gvsig.app.prepareAction.PrepareLayer;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.RasterDataParameters;
+import org.gvsig.fmap.dal.coverage.store.parameter.TileDataParameters;
+import org.gvsig.fmap.dal.exception.CloseException;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.fmap.layers.DefaultFLyrRaster;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.impl.store.AbstractRasterFileDataParameters;
+import org.gvsig.tools.exception.BaseException;
+
+public class PrepareLayerAskUsingTiles implements PrepareDataStoreParameters, PrepareLayer {
+	private boolean askMe    = true;
+	private boolean answer   = false;
+	
+	public DataStoreParameters prepare(DataStoreParameters storeParameters,
+			PrepareContext context) throws BaseException {
+		if(!(storeParameters instanceof RasterDataParameters))
+			return storeParameters;
+		if(askMe) {
+			String file = null;
+			if(storeParameters instanceof AbstractRasterFileDataParameters) {
+				file = ((AbstractRasterFileDataParameters)storeParameters).getFile().getName();
+			}
+			messageBoxYesOrNot("tiled_layer2", file);
+		}
+		
+		if(answer) {
+			DataManager manager = DALLocator.getDataManager();
+			TileDataParameters tileParams = null;
+			tileParams = (TileDataParameters) manager.createStoreParameters("Tile Store");
+			((FilesystemStoreParameters) tileParams).setFile(((FilesystemStoreParameters)storeParameters).getFile());
+			tileParams.setDataParameters(storeParameters);
+			return tileParams;
+		}
+		
+		return storeParameters;
+	}
+	
+	public void post(DataStoreParameters storeParameters, PrepareContext context) {
+		askMe = true;
+	}
+	
+	public void pre(DataStoreParameters storeParameters, PrepareContext context) {
+	}
+	
+	public boolean askMe() {
+		return askMe;
+	}
+	
+	public void setAskMe(boolean askMe) {
+		this.askMe = askMe;
+	}
+	
+	public FLayer prepare(FLayer layer, PrepareContextView context) {
+		if(layer instanceof FLyrRaster) {
+			FLyrRaster lyrRaster = (FLyrRaster)layer;
+			//Raster without georeferencing are not tiled
+			if(lyrRaster.getDataStore().getParameters() instanceof TileDataParameters) {
+				if(	lyrRaster.getFullEnvelope().getMinimum(0) == 0 &&
+						lyrRaster.getFullEnvelope().getMinimum(1) == 0 &&
+						lyrRaster.getFullEnvelope().getMaximum(0) == lyrRaster.getDataStore().getWidth() &&
+						lyrRaster.getFullEnvelope().getMaximum(1) == lyrRaster.getDataStore().getHeight()) {
+					MapContextManager mcm = MapContextLocator.getMapContextManager();
+					try {
+						FLyrRaster newLayer = (DefaultFLyrRaster) mcm.createLayer(lyrRaster.getName(), 
+								(DataStoreParameters)((TileDataParameters)lyrRaster.getDataStore().getParameters()).getDataParameters());
+						lyrRaster.getDataStore().close();
+						return newLayer;
+					} catch (LoadLayerException e) {
+						return lyrRaster;
+					} catch (CloseException e) {
+					}
+				}
+			}
+		}
+		return layer;
+	}
+	
+	
+
+	public void end(Object param) {
+		
+	}
+
+	public String getDescription() {
+		return "Prepare Tiles for Raster Layer";
+	}
+
+	public String getName() {
+		return "PrepareRasterLayerAskUsingTiles";
+	}
+
+	public Object create() {
+		return this;
+	}
+
+	public Object create(Object[] args) {
+		return this;
+	}
+
+	@SuppressWarnings("rawtypes")
+	public Object create(Map args) {
+		return this;
+	}
+
+	public void interrupted() {
+	}
+	
+	/**
+	 * Muestra un dialogo con un texto y un botón Si o No.
+	 * @param msg Mensaje a mostrar en el dialogo.
+	 * @param parentWindow Ventana desde la que se lanza el dialogo
+	 * @return El botón seleccionado por el usuario. true si ha seleccionado "si"
+	 *         y false si ha seleccionado "no"
+	 */
+	public void messageBoxYesOrNot(String msg, String file){
+		String string1 = Messages.getText("tiled");
+		String string2 = Messages.getText("normally");
+		String string3 = Messages.getText("all_tiled");
+		String string4 = Messages.getText("all_normally");
+		Object[] options = {string1, string2, string3, string4};
+		int n = JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
+					"<html>" + Messages.getText(msg).replaceAll("\n", "<br>") + "<br><br>" + Messages.getText("file") + ": " + file + "</html>",
+					Messages.getText("confirmacion"),
+					JOptionPane.YES_NO_OPTION,
+					JOptionPane.QUESTION_MESSAGE,
+					null,
+					options,
+					string1);
+		answer = false;
+		if (n == 0) 
+			answer = true;
+		if (n == 2) {
+			askMe = false;
+			answer = true;
+		}
+		if (n == 3) 
+			askMe = false;
+	}
+}

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/PrepareLayerAskUsingTiles.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferences.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferences.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferences.java	(revision 3305)
@@ -0,0 +1,179 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.awt.BorderLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.ImageIcon;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.border.EmptyBorder;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.preferences.AbstractPreferencePage;
+import org.gvsig.andami.preferences.StoreException;
+
+/**
+ * Preferences for tile cache
+ * @author Nacho Brodin (nachobrodin@gmail.com
+ */
+public class TileCachePreferences extends AbstractPreferencePage {
+	private static final long         serialVersionUID = -1689657253810393874L;
+
+	protected static String           id        = TileCachePreferences.class.getName();
+	private ImageIcon                 icon;
+
+	private TileCachePreferencesPanel tilecache = null;
+
+	/**
+	 * Constructor de la clase RasterPreferences
+	 */
+	public TileCachePreferences() {
+		super();
+		icon = IconThemeHelper.getImageIcon("pref-tilecache-icon");
+		initialize();
+	}
+
+	/**
+	 * Inicializacion del panel de preferencias.
+	 */
+	private void initialize() {
+		setTitle("Frame");
+
+		GridBagConstraints gridBagConstraints;
+
+		JScrollPane scrollPane = new JScrollPane();
+
+		scrollPane.getVerticalScrollBar().setUnitIncrement(20);
+
+		JPanel panel = new JPanel();
+
+		panel.setLayout(new GridBagLayout());
+
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 0;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		panel.add(getPreferenceTileCache(), gridBagConstraints);
+
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 7;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.weighty = 1.0;
+		panel.add(new JPanel(), gridBagConstraints);
+
+		panel.setBorder(new EmptyBorder(5, 5, 5, 5));
+
+		scrollPane.setViewportView(panel);
+
+		setLayout(new BorderLayout());
+		add(scrollPane, BorderLayout.CENTER);
+	}
+
+	/**
+	 * Gets a tile cache configuration panel
+	 * @return
+	 */
+	private TileCachePreferencesPanel getPreferenceTileCache() {
+		if (tilecache == null) {
+			tilecache = new TileCachePreferencesPanel();
+		}
+		return tilecache;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#initializeValues()
+	 */
+	public void initializeValues() {
+		getPreferenceTileCache().initializeValues();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.AbstractPreferencePage#storeValues()
+	 */
+	public void storeValues() throws StoreException {
+		getPreferenceTileCache().storeValues();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#initializeDefaults()
+	 */
+	public void initializeDefaults() {
+		getPreferenceTileCache().initializeDefaults();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.AbstractPreferencePage#isResizeable()
+	 */
+	public boolean isResizeable() {
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#getID()
+	 */
+	public String getID() {
+		return id;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#getIcon()
+	 */
+	public ImageIcon getIcon() {
+		return icon;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#getPanel()
+	 */
+	public JPanel getPanel() {
+		return this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#getTitle()
+	 */
+	public String getTitle() {
+		return "Tile Cache";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.andami.preferences.IPreference#isValueChanged()
+	 */
+	public boolean isValueChanged() {
+		return true;
+	}
+
+	public void setChangesApplied() {}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferences.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferencesPanel.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferencesPanel.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferencesPanel.java	(revision 3305)
@@ -0,0 +1,440 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.text.NumberFormat;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFormattedTextField;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+import javax.swing.text.DefaultFormatterFactory;
+import javax.swing.text.NumberFormatter;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.preferences.DlgPreferences;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.fmap.dal.coverage.RasterLibrary;
+import org.gvsig.i18n.Messages;
+import org.gvsig.raster.cache.tile.TileCacheLibrary;
+import org.gvsig.raster.util.BasePanel;
+/**
+ * This class provides a panel for tile cache configuration
+ * 
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class TileCachePreferencesPanel extends BasePanel implements ActionListener {
+	protected static final long serialVersionUID      = 1L;
+	private static int          TILE_SIZE_WMS         = 1024;              
+	private JLabel              labelWarning          = null;
+	private JLabel              labelCacheSize        = null;
+	private JLabel              labelLevels           = null;
+	private JLabel              labelStruct           = null;
+	private JLabel              labelTileSize         = null;
+	private JLabel              labelWMSTileSize      = null;
+	private JLabel              labelPath             = null;
+	private JFormattedTextField textFieldCacheSize    = null;
+	private JFormattedTextField textFieldLevels       = null;
+	private JFormattedTextField textFieldTileSize     = null;
+	private JFormattedTextField textFieldWMSTileSize  = null;
+	private JTextField          textFieldPath         = null;
+	private JComboBox           comboBoxStruct        = null;
+	private JButton             buttonRemove          = null;
+
+	/**
+	 *Inicializa componentes gráficos y traduce
+	 */
+	public TileCachePreferencesPanel() {
+		init();
+		translate();
+	}
+
+	/**
+	 * Define todas las traducciones de PreferenceCache
+	 */
+	protected void translate() {
+		setBorder(BorderFactory.createTitledBorder(getText(this, "tilecache")));
+		getLabelWarning().setText(getText(this, "preference_cache_warning"));
+		getLabelCacheSize().setText(getText(this, "tamanyo_max_tilecache") + ":");
+		getLabelLevels().setText(getText(this, "res_levels") + ":");
+		getLabelTileSize().setText(getText(this, "tilesize") + ":");
+		getLabelWMSTileSize().setText("WMS/WCS " + getText(this, "tilesize") + ":");
+		getLabelStruct().setText(getText(this, "tilecache_struct") + ":");
+		getButtonRemove().setText(getText(this, "remove_cache"));
+		getLabelPath().setText(getText(this, "path_tilecache"));
+	}
+
+	protected void init() {
+		GridBagConstraints gridBagConstraints;
+
+		setLayout(new GridBagLayout());
+
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridwidth = 2;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.weightx = 1.0;
+		gridBagConstraints.insets = new Insets(5, 5, 2, 5);
+		add(getLabelWarning(), gridBagConstraints);
+
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.anchor = GridBagConstraints.EAST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getLabelCacheSize(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.anchor = GridBagConstraints.EAST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getLabelLevels(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 3;
+		gridBagConstraints.anchor = GridBagConstraints.EAST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getLabelTileSize(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 4;
+		gridBagConstraints.anchor = GridBagConstraints.EAST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getLabelWMSTileSize(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 5;
+		gridBagConstraints.anchor = GridBagConstraints.EAST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getLabelStruct(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 6;
+		gridBagConstraints.gridwidth = 2;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getButtonRemove(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 0;
+		gridBagConstraints.gridy = 7;
+		gridBagConstraints.anchor = GridBagConstraints.EAST;
+		gridBagConstraints.insets = new Insets(2, 5, 2, 2);
+		add(getLabelPath(), gridBagConstraints);
+
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 1;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
+		add(getTextFieldCacheSize(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 2;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
+		add(getTextFieldLevels(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 3;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
+		add(getTextFieldTileSize(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 4;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
+		add(getTextFieldWMSTileSize(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 5;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
+		add(getComboBoxStruct(), gridBagConstraints);
+		
+		gridBagConstraints = new GridBagConstraints();
+		gridBagConstraints.gridx = 1;
+		gridBagConstraints.gridy = 7;
+		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints.anchor = GridBagConstraints.WEST;
+		gridBagConstraints.insets = new Insets(2, 2, 2, 5);
+		add(getTextFieldPath(), gridBagConstraints);
+		
+	}
+
+	private JLabel getLabelWarning() {
+		if (labelWarning == null) {
+			labelWarning = new JLabel();
+			labelWarning.setForeground(new Color(255, 0, 0));
+			labelWarning.setHorizontalAlignment(SwingConstants.CENTER);
+			labelWarning.setPreferredSize(new Dimension(0, 32));
+		}
+		return labelWarning;
+	}
+
+	private JButton getButtonRemove() {
+		if(buttonRemove == null) {
+			buttonRemove = new JButton();
+			buttonRemove.addActionListener(this);
+		}
+		return buttonRemove;
+	}
+	
+	private JComboBox getComboBoxStruct() {
+		if (comboBoxStruct == null) {
+			comboBoxStruct = new JComboBox();
+			comboBoxStruct.setModel(new DefaultComboBoxModel(new String[] { "FLATX" }));
+		}
+		return comboBoxStruct;
+	}
+	
+	private JTextField getTextFieldPath() {
+		if (textFieldPath == null) {
+			textFieldPath = new JTextField();
+		}
+		return textFieldPath;
+	}
+	
+	private JFormattedTextField getTextFieldCacheSize() {
+		if (textFieldCacheSize == null) {
+			NumberFormat integerFormat = NumberFormat.getNumberInstance();
+			integerFormat.setParseIntegerOnly(true);
+			textFieldCacheSize = new JFormattedTextField(new DefaultFormatterFactory(
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat)));
+		}
+		return textFieldCacheSize;
+	}
+	
+	private JFormattedTextField getTextFieldTileSize() {
+		if (textFieldTileSize == null) {
+			NumberFormat integerFormat = NumberFormat.getNumberInstance();
+			integerFormat.setParseIntegerOnly(true);
+			textFieldTileSize = new JFormattedTextField(new DefaultFormatterFactory(
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat)));
+		}
+		return textFieldTileSize;
+	}
+	
+	private JFormattedTextField getTextFieldWMSTileSize() {
+		if (textFieldWMSTileSize == null) {
+			NumberFormat integerFormat = NumberFormat.getNumberInstance();
+			integerFormat.setParseIntegerOnly(true);
+			textFieldWMSTileSize = new JFormattedTextField(new DefaultFormatterFactory(
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat)));
+		}
+		return textFieldWMSTileSize;
+	}
+	
+	private JFormattedTextField getTextFieldLevels() {
+		if (textFieldLevels == null) {
+			NumberFormat integerFormat = NumberFormat.getNumberInstance();
+			integerFormat.setParseIntegerOnly(true);
+			textFieldLevels = new JFormattedTextField(new DefaultFormatterFactory(
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat),
+					new NumberFormatter(integerFormat)));
+		}
+		return textFieldLevels;
+	}
+
+	private JLabel getLabelPath() {
+		if (labelPath == null)
+			labelPath = new JLabel();
+		return labelPath;
+	}
+	
+	private JLabel getLabelCacheSize() {
+		if (labelCacheSize == null)
+			labelCacheSize = new JLabel();
+		return labelCacheSize;
+	}
+	
+	private JLabel getLabelLevels() {
+		if (labelLevels == null)
+			labelLevels = new JLabel();
+		return labelLevels;
+	}
+	
+	private JLabel getLabelStruct() {
+		if (labelStruct == null)
+			labelStruct = new JLabel();
+		return labelStruct;
+	}
+	
+	private JLabel getLabelTileSize() {
+		if (labelTileSize == null)
+			labelTileSize = new JLabel();
+		return labelTileSize;
+	}
+	
+	private JLabel getLabelWMSTileSize() {
+		if (labelWMSTileSize == null)
+			labelWMSTileSize = new JLabel();
+		return labelWMSTileSize;
+	}
+
+	/**
+	 * Establece los valores por defecto de la Cache
+	 */
+	public void initializeDefaults() {
+		getTextFieldCacheSize().setValue(Configuration.getDefaultValue("tilecache_size"));
+		getTextFieldTileSize().setValue(Configuration.getDefaultValue("tilesize"));
+		getTextFieldWMSTileSize().setValue(Configuration.getDefaultValue("tilesizewms"));
+		getTextFieldLevels().setValue(Configuration.getDefaultValue("tile_levels"));
+		getTextFieldPath().setText(Configuration.getDefaultValue("path_tilecache").toString());
+		String struct = (String) Configuration.getDefaultValue("cache_struct");
+		if(struct != null) {
+			for (int i = 0; i < getComboBoxStruct().getItemCount(); i++)
+				if (getComboBoxStruct().getItemAt(i).toString().equals(struct.toString())) {
+					getComboBoxStruct().setSelectedIndex(i);
+					break;
+				}
+		}
+	}
+
+	/**
+	 * Establece los valores que ha definido el usuario de la Cache
+	 */
+	public void initializeValues() {
+		getTextFieldCacheSize().setValue(Configuration.getValue("tilecache_size", Integer.valueOf(TileCacheLibrary.MAX_CACHE_SIZE)));
+		getTextFieldTileSize().setValue(Configuration.getValue("tilesize", Integer.valueOf(TileCacheLibrary.DEFAULT_TILEWIDTH)));
+		getTextFieldWMSTileSize().setValue(Configuration.getValue("tilesizewms", TILE_SIZE_WMS));
+		getTextFieldLevels().setValue(Configuration.getValue("tile_levels", Integer.valueOf(TileCacheLibrary.DEFAULT_LEVELS)));
+		getTextFieldPath().setText(Configuration.getValue("path_tilecache", RasterLibrary.pathTileCache));
+		String struct = Configuration.getValue("cache_struct", TileCacheLibrary.DEFAULT_STRUCTURE);
+		if(struct != null) {
+			for (int i = 0; i < getComboBoxStruct().getItemCount(); i++)
+				if (getComboBoxStruct().getItemAt(i).toString().equals(struct.toString())) {
+					getComboBoxStruct().setSelectedIndex(i);
+					break;
+				}
+		}
+	}
+
+	/**
+	 * Guarda los valores de la cache establecidos por el usuario
+	 */
+	public void storeValues() {
+		Integer tilecachesize = null;
+		try {
+			String s = getTextFieldCacheSize().getText().replaceAll(",", "");
+			tilecachesize = new Integer(s);
+			Configuration.setValue("tilecache_size", tilecachesize);
+		} catch (NumberFormatException e)  {
+			
+		}
+		
+		Integer tilesize = null;
+		try {
+			String s = getTextFieldTileSize().getText().replaceAll(",", "");
+			tilesize = new Integer(s);
+			Configuration.setValue("tilesize", tilesize);
+		} catch (NumberFormatException e)  {
+			
+		}
+		
+		Integer tilesizewms = null;
+		try {
+			String s = getTextFieldWMSTileSize().getText().replaceAll(",", "");
+			tilesizewms = new Integer(s);
+			Configuration.setValue("tilesizewms", tilesizewms);
+		} catch (NumberFormatException e)  {
+			
+		}
+		
+		Integer tilelevels = null;
+		try {
+			String s = getTextFieldLevels().getText().replaceAll(",", "");
+			tilelevels = new Integer(s);
+			Configuration.setValue("tile_levels", tilelevels);
+		} catch (NumberFormatException e)  {
+			
+		}
+		
+		Configuration.setValue("cache_struct", getComboBoxStruct().getSelectedItem() != null ? getComboBoxStruct().getSelectedItem().toString() : TileCacheLibrary.DEFAULT_STRUCTURE);
+		Configuration.setValue("path_tilecache", getTextFieldPath().getText());
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		String path = getTextFieldPath().getText();
+		IWindow parent = PluginServices.getMDIManager().getActiveWindow();
+		IWindow[] wList = PluginServices.getMDIManager().getAllWindows();
+		for (int i = 0; i < wList.length; i++) {
+			if(wList[i] instanceof DlgPreferences)
+				parent = wList[i];
+		}
+		
+		if(CacheExtension.messageBoxYesOrNot(Messages.getText("remove_directory") + "<BR>" + path, parent)) {
+			File f = new File(path);
+			if(f.exists()) {
+				if(!deleteDirectory(f)) {
+					CacheExtension.messageBoxError("open_files", parent);
+				}
+			}else
+				CacheExtension.messageBoxError("path_not_exists", parent);
+		}
+	}
+
+	public boolean deleteDirectory(File directory) {  
+		File[] files = directory.listFiles();  
+		for(int i = 0; i < files.length; i++) {  
+			if(files[i].isDirectory()) {  
+				this.deleteDirectory(files[i]);  
+			} else {  
+				files[i].delete();  
+			}  
+		}  
+		return directory.delete();  
+	}  
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/TileCachePreferencesPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/Configuration.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/Configuration.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/Configuration.java	(revision 3305)
@@ -0,0 +1,343 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.raster.fmap.layers.IConfiguration;
+import org.gvsig.utils.XMLEntity;
+
+/**
+ * La clase <code>Configuration</code> sirve para poder leer y escribir valores en el entorno
+ * de raster a nivel de configuración. Para leer o escribir hay que usar los
+ * metodos getValue y setValue, estos metodos lanzan eventos en el caso de
+ * cambiar el valor que habia establecido. Forma de uso:<p>
+ *
+ * En la lectura es recomendable pasar un valor por defecto en el get, para que
+ * si no existe o si existe pero no corresponde el tipo de datos devolvera el
+ * valor por defecto<p>
+ *
+ * <code>Boolean valor = Configuration.getValue("valorBooleano", Boolean.valueOf(true));</code><p>
+ *
+ * <code>Configuration.setValue("valorBooleano", Boolean.valueOf(false));</code><p>
+ *
+ * Solo se pueden usar los siguientes tipos de datos:<br>
+ *  - <b>Boolean</b>, <b>Double</b>, <b>Float</b>, <b>Integer</b>, <b>Long</b>
+ *  y <b>String</b>.<p>
+ *
+ * Otra funcionalidad que tiene, es que puedes agregar un manejador de eventos
+ * para controlar los cambios de las variables y actuar en consecuencia si cambia
+ * la que deseas.
+ *
+ * @version 07/12/2007
+ * @author BorSanZa - Borja Sánchez Zamorano (borja.sanchez@iver.es)
+ */
+public class Configuration implements IConfiguration {
+	static private Configuration singleton              = new Configuration();
+	private ArrayList<ConfigurationListener>            
+	                             actionCommandListeners = new ArrayList<ConfigurationListener>();
+	private XMLEntity            xml                    = null;
+	private HashMap<String, Object>
+	                             hashMap                = new HashMap<String, Object>();
+
+	/**
+	 * Constructor privado. Nos aseguramos de que nadie pueda crear una instancia
+	 * desde fuera, la configuración es única para todos.
+	 */
+	private Configuration() {
+		try {
+			PluginServices ps = PluginServices.getPluginServices("org.gvsig.raster.tilecache.app");
+			xml = ps.getPersistentXML();
+		} catch (NullPointerException e) {
+			//No está inicializado Configuration
+			xml = new XMLEntity();
+		}
+	}
+
+	/**
+	 * Devuelve un valor Boolean para el key especificado
+	 * @param key
+	 * @param defaultValue
+	 * @return
+	 */
+	static public Boolean getValue(String key, Boolean defaultValue) {
+		singleton.saveDefaultValue(key, defaultValue);
+		try {
+			return Boolean.valueOf(getXMLEntity().getStringProperty(key));
+		} catch (Exception e) {
+		}
+		try {
+			getXMLEntity().putProperty(key, defaultValue.booleanValue());
+		} catch(NullPointerException e) {
+			//No está inicializada la configuración. Devuelve el default
+		}
+		return defaultValue;
+	}
+
+	/**
+	 * Devuelve un valor Double para el key especificado
+	 * @param key
+	 * @param defaultValue
+	 * @return
+	 */
+	static public Double getValue(String key, Double defaultValue) {
+		singleton.saveDefaultValue(key, defaultValue);
+		try {
+			return Double.valueOf(getXMLEntity().getStringProperty(key));
+		} catch (Exception e) {
+		}
+		getXMLEntity().putProperty(key, defaultValue.doubleValue());
+		return defaultValue;
+	}
+
+	/**
+	 * Devuelve un valor Float para el key especificado
+	 * @param key
+	 * @param defaultValue
+	 * @return
+	 */
+	static public Float getValue(String key, Float defaultValue) {
+		singleton.saveDefaultValue(key, defaultValue);
+		try {
+			return Float.valueOf(getXMLEntity().getStringProperty(key));
+		} catch (Exception e) {
+		}
+		getXMLEntity().putProperty(key, defaultValue.floatValue());
+		return defaultValue;
+	}
+
+	/**
+	 * Devuelve un valor Integer para el key especificado
+	 * @param key
+	 * @param defaultValue
+	 * @return
+	 */
+	static public Integer getValue(String key, Integer defaultValue) {
+		singleton.saveDefaultValue(key, defaultValue);
+		try {
+			return Integer.valueOf(getXMLEntity().getStringProperty(key));
+		} catch (Exception e) {
+		}
+		getXMLEntity().putProperty(key, defaultValue.intValue());
+		return defaultValue;
+	}
+
+	/**
+	 * Devuelve un valor Long para el key especificado
+	 * @param key
+	 * @param defaultValue
+	 * @return
+	 */
+	static public Long getValue(String key, Long defaultValue) {
+		singleton.saveDefaultValue(key, defaultValue);
+		try {
+			return Long.valueOf(getXMLEntity().getStringProperty(key));
+		} catch (Exception e) {
+		}
+		getXMLEntity().putProperty(key, defaultValue.longValue());
+		return defaultValue;
+	}
+
+	/**
+	 * Devuelve un valor String para el key especificado
+	 * @param key
+	 * @param defaultValue
+	 * @return
+	 */
+	static public String getValue(String key, String defaultValue) {
+		singleton.saveDefaultValue(key, defaultValue);
+		try {
+			return getXMLEntity().getStringProperty(key);
+		} catch (Exception e) {
+		}
+		getXMLEntity().putProperty(key, defaultValue);
+		return defaultValue;
+	}
+
+	/**
+	 * Guarda el valor por defecto en caso de que no exista
+	 * @param key
+	 * @param defaultValue
+	 */
+	private void saveDefaultValue(String key, Object defaultValue) {
+		if (hashMap.get(key) == null)
+			hashMap.put(key, defaultValue);
+	}
+
+	/**
+	 * Devuelve el valor por defecto de un key
+	 * @param key
+	 * @return
+	 */
+	static public Object getDefaultValue(String key) {
+		return singleton.hashMap.get(key);
+	}
+
+	/**
+	 * Guarda en la configuracion el Objeto pasado por parametro asociado a dicho
+	 * key
+	 * @param key
+	 * @param value
+	 */
+	private void putProperty(String key, Object value) {
+		if (Integer.class.isInstance(value)) {
+			getXMLEntity().putProperty(key, ((Integer) value).intValue());
+			return;
+		}
+		if (Double.class.isInstance(value)) {
+			getXMLEntity().putProperty(key, ((Double) value).doubleValue());
+			return;
+		}
+		if (Float.class.isInstance(value)) {
+			getXMLEntity().putProperty(key, ((Float) value).floatValue());
+			return;
+		}
+		if (Boolean.class.isInstance(value)) {
+			getXMLEntity().putProperty(key, ((Boolean) value).booleanValue());
+			return;
+		}
+		if (Long.class.isInstance(value)) {
+			getXMLEntity().putProperty(key, ((Long) value).longValue());
+			return;
+		}
+		if (String.class.isInstance(value)) {
+			getXMLEntity().putProperty(key, (String) value);
+			return;
+		}
+		getXMLEntity().putProperty(key, value);
+	}
+
+	/**
+	 * Establece un valor en la configuracion
+	 * @param uri
+	 * @param value
+	 */
+	static public void setValue(String key, Object value) {
+		if (value == null) {
+			getXMLEntity().remove(key);
+			singleton.callConfigurationChanged(key, value);
+			return;
+		}
+
+		String oldValue = getValue(key, value.toString());
+
+		singleton.putProperty(key, value);
+
+		if (!oldValue.equals(value.toString()))
+			singleton.callConfigurationChanged(key, value);
+	}
+
+	/**
+	 * Añadir un listener a la lista de eventos
+	 * @param listener
+	 */
+	static public void addValueChangedListener(ConfigurationListener listener) {
+		if (!singleton.actionCommandListeners.contains(listener))
+			singleton.actionCommandListeners.add(listener);
+	}
+
+	/**
+	 * Borrar un listener de la lista de eventos
+	 * @param listener
+	 */
+	static public void removeValueChangedListener(ConfigurationListener listener) {
+		singleton.actionCommandListeners.remove(listener);
+	}
+
+	/**
+	 * Invocar a los eventos asociados al componente
+	 */
+	private void callConfigurationChanged(String key, Object value) {
+		Iterator<ConfigurationListener> iterator = actionCommandListeners.iterator();
+		while (iterator.hasNext()) {
+			ConfigurationListener listener = iterator.next();
+			listener.actionConfigurationChanged(new ConfigurationEvent(this, key, value));
+		}
+	}
+
+	/**
+	 * Devuelve una instancia unica al XMLEntity de Configuration
+	 * @return
+	 */
+	static private XMLEntity getXMLEntity() {
+		return singleton.xml;
+	}
+	
+	/**
+	 * Devuelve una instancia al unico objeto de configuración que puede existir.
+	 * @return
+	 */
+	static public Configuration getSingleton() {
+		return singleton;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueBoolean(java.lang.String, java.lang.Boolean)
+	 */
+	public Boolean getValueBoolean(String name, Boolean defaultValue) {
+		return Configuration.getValue(name, defaultValue);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueString(java.lang.String, java.lang.String)
+	 */
+	public String getValueString(String name, String defaultValue) {
+		return Configuration.getValue(name, defaultValue);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueDouble(java.lang.String, java.lang.Double)
+	 */
+	public Double getValueDouble(String name, Double defaultValue) {
+		return Configuration.getValue(name, defaultValue);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueFloat(java.lang.String, java.lang.Float)
+	 */
+	public Float getValueFloat(String name, Float defaultValue) {
+		return Configuration.getValue(name, defaultValue);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueInteger(java.lang.String, java.lang.Integer)
+	 */
+	public Integer getValueInteger(String name, Integer defaultValue) {
+		return Configuration.getValue(name, defaultValue);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.fmap.raster.conf.IConfiguration#getValueLong(java.lang.String, java.lang.Long)
+	 */
+	public Long getValueLong(String name, Long defaultValue) {
+		return Configuration.getValue(name, defaultValue);
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/Configuration.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationEvent.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationEvent.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationEvent.java	(revision 3305)
@@ -0,0 +1,61 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.util.EventObject;
+/**
+ * Estado del evento de configuración para las preferencias de Raster.
+ * 
+ * @version 26/02/2008
+ * @author BorSanZa - Borja Sánchez Zamorano (borja.sanchez@iver.es)
+ */
+public class ConfigurationEvent extends EventObject {
+	private static final long serialVersionUID = 7016236098872059L;
+	private String key;
+	private Object value;
+
+	/**
+	 * Constructor de un ConfigurationEvent
+	 * @param source
+	 * @param key
+	 * @param value
+	 */
+	public ConfigurationEvent(Object source, String key, Object value) {
+		super(source);
+		this.key = key;
+		this.value = value;
+	}
+
+	/**
+	 * @return the key
+	 */
+	public String getKey() {
+		return key;
+	}
+
+	/**
+	 * @return the value
+	 */
+	public Object getValue() {
+		return value;
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationEvent.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationListener.java
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationListener.java	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationListener.java	(revision 3305)
@@ -0,0 +1,32 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+*
+* Copyright (C) 2007-2008 Infrastructures and Transports Department
+* of the Valencian Government (CIT)
+* 
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+* MA  02110-1301, USA.
+* 
+*/
+package org.gvsig.raster.tilecache.app;
+
+import java.util.EventListener;
+
+public interface ConfigurationListener extends EventListener {
+	/**
+	 * Evento que se dispara cuando cambia un valor de configuracion.
+	 * @param e
+	 */
+	public void actionConfigurationChanged(ConfigurationEvent e);
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/java/org/gvsig/raster/tilecache/app/ConfigurationListener.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text.properties
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text.properties	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text.properties	(revision 3305)
@@ -0,0 +1,18 @@
+tiled_layer=¿Deseas usar la caché de tiles con las capas seleccionadas?
+tiled_layer2=¿Deseas cargar la capa de forma normal o cacheando datos en forma de teselas?
+tiled=Teselada
+all_normally=Todas normal
+all_tiled=Todas teseladas
+normally=Normal
+tilecache=Tilecaché
+preference_cache_warning=<html><center><b>ATENCIÓN: Solo tocar esta sección si está seguro de lo que está haciendo</b></center></html>
+tamanyo_max_tilecache=Tamaño máximo tile cache
+res_levels=Niveles de resolución
+tilesize=Tamaño de tile
+tilecache_struct=Estructura de directorios
+remove_cache=Borrar caché
+path_tilecache=Ruta a los ficheros de la caché
+remove_directory=Borrar directorio
+open_files=El directorio de caché no puede ser eliminado.\n No debe tener ficheros abiertos. Cierre todas las capas.
+path_not_exists=El directorio no existe
+file=Fichero
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text_en.properties
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text_en.properties	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text_en.properties	(revision 3305)
@@ -0,0 +1,18 @@
+tiled_layer=Would you like to use tile cache with the selected layers?
+tiled_layer2=Would you like to load this layer normally or caching data as tiles?
+tiled=Tiled
+all_normally=Normally all
+all_tiled=Tiled all
+normally=Normally
+tilecache=Tilecache
+preference_cache_warning=<html><center><b>WARNING: You mustn't to change this section if you're not sure what you are doing</b></center></html>
+tamanyo_max_tilecache=Maximum size of tilecache
+res_levels=Resolution levels
+tilesize=Tile size
+tilecache_struct=Path structure
+remove_cache=Remove cache
+path_tilecache=Path to the files of cache 
+remove_directory=Remove folder
+open_files=The folder cannot be eliminated.\n It should not have open files. Close all layers
+path_not_exists=The directory does not exists
+file=File
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/text_en.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/config.xml	(revision 3305)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.raster.mainplugin" />
+	<libraries library-dir="lib"/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.raster.tilecache.app.CacheExtension"
+			description="Tile Cache support"
+			active="true"
+			priority="1">
+		</extension>
+	</extensions>
+</plugin-config>
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/config.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/images/pref-tilecache-icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/images/pref-tilecache-icon.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/images/pref-tilecache-icon.jpeg
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/images/pref-tilecache-icon.jpeg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/install/install.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/install/install.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/install/install.xml	(revision 3305)
@@ -0,0 +1,45 @@
+<project name="org.gvsig.plugin1" default="main" basedir=".">
+	<target name="main" depends="copy_files, link1, link2"/>
+    <target name="copy_files">
+    	<copy todir="${gvsig_dir}">
+    		<fileset dir="./files" includes="**"/>
+		</copy>
+	</target>
+	<target name="link1" depends="gdal-properties" if="gdal.link1">
+	  <exec executable="ln" >
+      <arg value="-s"/>
+      <arg value="${gdal.so}"/>
+      <arg value="${gdal.link1}"/>
+	  </exec>
+	</target>
+	<target name="link2" depends="gdal-properties" if="gdal.link2">
+    <exec executable="ln" >
+      <arg value="-s"/>
+      <arg value="${gdal.so}"/>
+      <arg value="${gdal.link2}"/>
+    </exec>
+	</target>
+  <target name="gdal-properties" depends="checkgdal, gdal-properties.1.15.1, gdal-properties.1.13.0"/>
+  <target name="gdal-properties.1.15.1" if="gdal.1.15.1">
+    <property name="gdal.so" value="${gvsig_dir}/native/libgdal.so.1.15.1"/>
+    <property name="gdal.link1" value="${gvsig_dir}/native/libgdal.so.1"/>
+    <property name="gdal.link2" value="${gvsig_dir}/native/libgdal.so"/>
+  </target>
+  <target name="gdal-properties.1.13.0" if="gdal.1.13.0">
+    <property name="gdal.so" value="${gvsig_dir}/native/libgdal.so.1.13.0"/>
+    <property name="gdal.link1" value="${gvsig_dir}/native/libgdal.so.1"/>
+    <property name="gdal.link2" value="${gvsig_dir}/native/libgdal.so"/>
+  </target>
+	<target name="checkgdal">
+    <available file="${gvsig_dir}/native/libgdal.so.1.15.1" property="gdal.1.15.1"/>
+    <available file="${gvsig_dir}/native/libgdal.so.1.13.0" property="gdal.1.13.0"/>
+	</target>
+
+  <!-- To add a new gdal so version:
+       * add a new available in "checkgdal" target
+       * create a new  "gdal-properties.x.xx.x" target with right property values
+       * add the new "gda-properties.x.xx.x" into "gdal-properties" target depends list
+
+
+  -->
+</project>

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/install/install.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/about/logo.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/about/logo.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/about/tilecache-about.html
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/about/tilecache-about.html	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/about/tilecache-about.html	(revision 3305)
@@ -0,0 +1,36 @@
+<html>
+	<head>
+	<style type="text/css">
+	BODY { background-image: url(logo.png); background-repeat: no-repeat; background-position: 100% 0% }
+	</style>
+	</head>
+	<body>	
+		<h2>Soporte PostGIS Raster para gvSIG</h2>	
+		<p><b>Prodevelop S.L.</b> ha incorporado el soporte al formato raster en 
+		base de datos <b>PostGres</b></p>
+		
+		<p><b>Desarrollo:</b></p>
+		
+		<p>Director del proyecto:</p>
+		<ul>
+			<li>Miguel Montesinos Lajara</li>
+		</ul>
+		<p>Equipo de desarrollo:</p>
+		<ul>
+			<li>Nacho Brodin</li>
+		</ul>
+		
+		<p><b>Colaboradores:</b></p>
+		
+		<p>Deimos:</p>
+		<ul>
+			<li>Jorge Arevalo</li>
+		</ul>
+
+		<p>Build Number de la extensi&oacute;n: 1</p>
+		<center>
+			<p><b><a href="http://www.prodevelop.es" title="Prodevelop">http://www.prodevelop.es</a></b></p>
+		</center>
+		
+	</body>
+</html>
\ No newline at end of file

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/src/main/resources-plugin/about/tilecache-about.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/pom.xml
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/pom.xml	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/pom.xml	(revision 3305)
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>org.gvsig.raster.tilecache.app</artifactId>
+	<packaging>jar</packaging>
+	<name>Tilecache for raster services</name>
+	<description>Basic libraries to support tiled raster</description>
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.raster.tilecache</artifactId>
+      <version>2.2.4</version>
+    </parent>
+    <scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app</url>
+    </scm>
+	<dependencies>
+         <dependency>
+             <groupId>org.gvsig</groupId>
+             <artifactId>org.gvsig.about.api</artifactId>
+             <scope>compile</scope>
+        </dependency>
+    	<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.cache.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.cache.lib.impl</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.tilecache.io</artifactId>
+            <scope>runtime</scope>
+		</dependency>
+		<dependency>
+        	<groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.andami</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.i18n</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.tools.lib</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.app.mainplugin</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.lib.impl</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		 <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.fmap</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.control</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.utils</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.ui</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.timesupport.lib.api</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.timesupport.lib.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+       	<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.swing.api</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.swing.impl</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.algorithm</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+		
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+         <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.compat.se</artifactId>
+            <scope>compile</scope>
+        </dependency>
+		<dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.impl</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.mapcontext.operation</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+	</dependencies>
+    <properties>
+    	<gvsig.package.info.state>final</gvsig.package.info.state>
+    	<gvsig.package.info.categories>Raster</gvsig.package.info.categories>
+    	<gvsig.package.info.official>true</gvsig.package.info.official>
+    	<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/Raster/pool</gvsig.package.info.poolURL>
+    </properties>
+</project>

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/buildNumber.properties
===================================================================
--- org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/buildNumber.properties	(revision 0)
+++ org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/buildNumber.properties	(revision 3305)
@@ -0,0 +1,2 @@
+#Thu Apr 02 15:56:36 CEST 2015
+buildNumber=56

Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app/buildNumber.properties
___________________________________________________________________
Added: svn:mime-type
   + text/plain


Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4/org.gvsig.raster.tilecache.app
___________________________________________________________________
Added: svn:ignore
   + target

.settings

.project

.classpath



Property changes on: org.gvsig.raster.tilecache/tags/org.gvsig.raster.tilecache-2.2.4
___________________________________________________________________
Added: svn:ignore
   + .project
.pom.xml.swp


