Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/pom.xml
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/pom.xml	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/pom.xml	(revision 20991)
@@ -0,0 +1,144 @@
+<?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.netcdf.app.netcdfclient</artifactId>
+	<packaging>jar</packaging>
+	<name>Formats: NETCDF raster format support</name>
+	<description>NETCDF raster format support</description>
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.raster.netcdf</artifactId>
+      <version>2.2.223</version>
+    </parent>
+	
+	<scm>
+        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app</url>
+    </scm>
+    
+    <developers>
+        <developer>
+            <id>nbrodin</id>
+            <name>Nacho Brodin</name>
+            <email>nachobrodin@gmail.com</email>
+            <roles>
+                <role>Architect</role>
+                <role>Developer</role>
+            </roles>
+        </developer>
+    </developers>
+    
+	<dependencies>
+	    <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.raster.lib.api</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.raster.netcdf.io</artifactId>
+        </dependency>
+        <dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.raster.fmap</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.fmap.control</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.about.api</artifactId>
+             <scope>compile</scope>
+        </dependency>
+        <dependency>
+			<groupId>essi-unidata</groupId>
+			<artifactId>netcdf-java</artifactId>
+			<scope>compile</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.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>runtime</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.spi</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>
+	</dependencies>
+	
+	<build>
+   		<plugins>
+    	
+		</plugins>
+	</build>
+
+	<properties>
+		<gvsig.package.info.dependencies>required: org.gvsig.raster.tilecache.app -ge 2</gvsig.package.info.dependencies>
+		<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/Raster/pool</gvsig.package.info.poolURL>
+		<gvsig.package.info.categories>Raster, Formats</gvsig.package.info.categories>
+		<gvsig.package.info.state>final</gvsig.package.info.state>
+		<gvsig.package.info.official>true</gvsig.package.info.official>
+	</properties>
+</project>

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/buildNumber.properties
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/buildNumber.properties	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/buildNumber.properties	(revision 20991)
@@ -0,0 +1,2 @@
+#Sun Jul 09 18:23:24 CEST 2023
+buildNumber=277

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/test/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/TestVarSelectionPanel.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/test/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/TestVarSelectionPanel.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/test/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/TestVarSelectionPanel.java	(revision 20991)
@@ -0,0 +1,40 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ */
+package org.gvsig.raster.netcdf.app.netcdfclient.gui.panel;
+
+import javax.swing.JFrame;
+
+public class TestVarSelectionPanel {
+	private int                          w        = 510;
+	private int                          h        = 610;
+	private JFrame                       frame    = new JFrame();
+	private VariableSelectionPanel       desc     = null;
+
+	public TestVarSelectionPanel() {
+		desc = new VariableSelectionPanel();
+		frame.getContentPane().add(desc);
+		frame.setSize(w, h);
+		frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+		frame.setVisible(true);
+	}
+
+	public static void main(String[] args) {
+		new TestVarSelectionPanel();
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/test/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/TestVarSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/assembly/gvsig-plugin-package.xml	(revision 20991)
@@ -0,0 +1,38 @@
+<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>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes> 
+				<include>org.gvsig:org.gvsig.raster.netcdf.app.netcdfclient:jar</include>
+				<include>org.gvsig:org.gvsig.raster.netcdf.io:jar</include>
+				<include>essi-unidata:netcdf-java:jar</include>
+	  </includes>
+	</dependencySet>
+  </dependencySets>
+</assembly>

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFMenuEntry.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFMenuEntry.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFMenuEntry.java	(revision 20991)
@@ -0,0 +1,158 @@
+/* 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.netcdf.app.netcdfclient;
+import javax.swing.Icon;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.app.project.documents.view.toc.AbstractTocContextMenuAction;
+import org.gvsig.app.project.documents.view.toc.ITocItem;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.fmap.layers.ILayerState;
+import org.gvsig.raster.netcdf.app.netcdfclient.gui.panel.NetCDFPanel;
+import org.gvsig.raster.netcdf.io.NetCDFDataParameters;
+
+
+/**
+ * <p>
+ * TOC menu entry for NetCDF files
+ * <p>
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ *
+ */
+public class NetCDFMenuEntry extends AbstractTocContextMenuAction {
+	static private NetCDFMenuEntry    singleton     = null;
+
+	/**
+	 * Nadie puede crear una instancia a esta clase �nica, hay que usar el
+	 * getSingleton()
+	 */
+	private NetCDFMenuEntry() {}
+
+	/**
+	 * Devuelve un objeto unico a dicha clase
+	 * @return
+	 */
+	static public NetCDFMenuEntry getSingleton() {
+		if (singleton == null)
+			singleton = new NetCDFMenuEntry();
+		return singleton;
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.contextMenu.AbstractContextMenuAction#getGroup()
+	 */
+	public String getGroup() {
+		return "Raster";
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.contextMenu.AbstractContextMenuAction#getGroupOrder()
+	 */
+	public int getGroupOrder() {
+		return 50;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.contextMenu.AbstractContextMenuAction#getOrder()
+	 */
+	public int getOrder() {
+		return 1;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.IContextMenuAction#getText()
+	 */
+	public String getText() {
+		return PluginServices.getText(this, "NetCDF_Variables");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#isEnabled(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
+	 */
+	public boolean isEnabled(ITocItem item, FLayer[] selectedItems) {
+		if ((selectedItems == null) || (selectedItems.length != 1))
+			return false;
+
+		if (!(selectedItems[0] instanceof ILayerState))
+			return false;
+
+		if (!((ILayerState) selectedItems[0]).isOpen())
+			return false;
+
+		return true;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#isVisible(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
+	 */
+	public boolean isVisible(ITocItem item, FLayer[] selectedItems) {
+		if ((selectedItems == null) || (selectedItems.length != 1))
+			return false;
+
+		if (!(selectedItems[0] instanceof FLyrRaster))
+			return false;
+
+		if(((FLyrRaster) selectedItems[0]).getDataStore() != null)
+			return (((FLyrRaster) selectedItems[0]).getDataStore().getInternalParameters() instanceof NetCDFDataParameters);
+		return false;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see com.iver.cit.gvsig.project.documents.view.toc.AbstractTocContextMenuAction#execute(com.iver.cit.gvsig.project.documents.view.toc.ITocItem, com.iver.cit.gvsig.fmap.layers.FLayer[])
+	 */
+	public void execute(ITocItem item, FLayer[] selectedItems) {
+		FLayer lyr = null;
+
+		if (selectedItems.length != 1)
+			return;
+
+		lyr = selectedItems[0];
+
+		if (!(lyr instanceof FLyrRaster))
+			return;
+		
+		FLyrRaster fLayer = (FLyrRaster)lyr;
+		
+		NetCDFPanel panel = new NetCDFPanel(fLayer);
+		PluginServices.getMDIManager().addWindow(panel);
+		//Esto es porque la llamada setHeight de getWindowInfo no funciona igual que esta. Asignan tama�os diferentes 
+		PluginServices.getMDIManager().getWindowInfo(panel).setHeight(NetCDFPanel.HEIGHT);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.rastertools.generictoolbar.IGenericToolBarMenuItem#getIcon()
+	 */
+	public Icon getIcon() {
+		return IconThemeHelper.getImageIcon("save-icon");
+	}
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFMenuEntry.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFClientExtension.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFClientExtension.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFClientExtension.java	(revision 20991)
@@ -0,0 +1,93 @@
+/* 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.netcdf.app.netcdfclient;
+
+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.tools.ToolsLocator;
+import org.gvsig.tools.extensionpoint.ExtensionPoint;
+import org.gvsig.tools.extensionpoint.ExtensionPointManager;
+
+/**
+ * Extension for adding grid netcdf support to gvSIG.
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFClientExtension extends Extension {
+
+	public void initialize() {
+		registerIcons();
+    	
+    	ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
+    	ExtensionPoint point = extensionPoints.add("View_TocActions");
+    	point.append("NetCDF_TocActions", "NetCDF", NetCDFMenuEntry.getSingleton());
+	}
+	
+	/**
+	 * @see com.iver.andami.plugins.IExtension#postInitialize()
+	 */
+	@Override
+	public void postInitialize() {
+		super.postInitialize();
+//	    addAboutInfo();
+	}
+	
+//	private void addAboutInfo() {
+//        ApplicationManager application = ApplicationLocator.getManager();
+//        
+//        AboutManager about = application.getAbout();
+//        about.addDeveloper("PRODEVELOP", getClass().getClassLoader()
+//            .getResource("about/netcdf-about.html"), 2);
+//
+//        AboutParticipant participant = about.getDeveloper("PRODEVELOP");
+//        participant.addContribution(
+//            "NetCDF Raster",
+//            "Soporte para NetCDF raster ", 
+//            2011,7,1, 
+//            2011,7,30
+//        );      
+//    }
+
+	public void execute(String actionCommand) {
+	}
+
+	public boolean isEnabled() {
+		return true;
+	}
+
+	public boolean isVisible() {
+		return false;
+	}
+	
+	/**
+	 * Registra los iconos a utilizar en la botonera.
+	 */
+	private void registerIcons() {
+		IconThemeHelper.registerIcon(null, "nextarrow-icon", this);
+		IconThemeHelper.registerIcon(null, "prevarrow-icon", this);
+		IconThemeHelper.registerIcon(null, "inspect-icon", this);
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/NetCDFClientExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/NetCDFPanel.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/NetCDFPanel.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/NetCDFPanel.java	(revision 20991)
@@ -0,0 +1,421 @@
+/* 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.netcdf.app.netcdfclient.gui.panel;
+
+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.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.ui.mdiManager.IWindow;
+import org.gvsig.andami.ui.mdiManager.WindowInfo;
+import org.gvsig.fmap.dal.coverage.exception.FileNotOpenException;
+import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException;
+import org.gvsig.fmap.dal.coverage.exception.RasterDriverException;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanel;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent;
+import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener;
+import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel;
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+import org.gvsig.raster.fmap.layers.FLyrRaster;
+import org.gvsig.raster.netcdf.io.NetCDFDataParameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import ucar.nc2.Variable;
+
+/**
+ * Properties panel for NetCDF format.
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFPanel extends DefaultButtonsPanel implements IWindow, ActionListener, ButtonsPanelListener {
+	private static final long             serialVersionUID  = 1L;
+	private static String                 NOVALUE           = "---";
+	private VariableSelectionPanel        panel             = null;
+	private FLyrRaster                    lyr               = null;
+	private static boolean                blockRefreshEvent = false;
+	private ArrayList<Variable>           listVars          = null;
+	public static int                     HEIGHT            = 360;
+	public static int                     WIDTH             = 340;
+	private Logger                        logger            = LoggerFactory.getLogger(NetCDFPanel.class.toString());
+	
+	/**
+	 * This method initializes
+	 */
+	public NetCDFPanel(FLyrRaster lyr) {
+		super(ButtonsPanel.BUTTONS_APPLYCLOSE);
+		addButtonPressedListener(this);
+		this.lyr = lyr;
+		initialize();
+		
+		try {
+			loadVariablesFromParameters();
+		} catch (IOException e) {
+			panel.getGridVariableCombo().setSelectedIndex(0);
+		} finally {
+		}
+		
+		setStatus();
+	}
+	
+	/**
+	 * Initializes graphic components
+	 */
+	protected void initialize() {
+		GridBagConstraints gbc = new GridBagConstraints();
+		setLayout(new GridBagLayout());
+		
+		gbc.insets = new Insets(0, 0, 0, 0);
+		gbc.fill = GridBagConstraints.BOTH;
+		gbc.anchor = GridBagConstraints.CENTER;
+		gbc.weightx = 1.0;
+		gbc.weighty = 1.0;
+		
+		add(getVariableSelectionPanel(), gbc);
+		panel.getLevelCombo().addActionListener(this);
+		panel.getTimeCombo().addActionListener(this);
+		panel.getGridVariableCombo().addActionListener(this);
+		panel.getGridVarUpDownPanel().getUpButton().addActionListener(this);
+		panel.getGridVarUpDownPanel().getDownButton().addActionListener(this);
+		panel.getTimeUpDownPanel().getUpButton().addActionListener(this);
+		panel.getTimeUpDownPanel().getDownButton().addActionListener(this);
+		panel.getLevelUpDownPanel().getUpButton().addActionListener(this);
+		panel.getLevelUpDownPanel().getDownButton().addActionListener(this);
+		panel.getVarPropertiesButton().addActionListener(this);
+		panel.getVariableCombo().addActionListener(this);
+	}
+	
+	/**
+	 * Sets the variable status
+	 * @param params
+	 */
+	private void setStatus() {
+		NetCDFDataParameters params = (NetCDFDataParameters)lyr.getDataStore().getInternalParameters();
+		Integer time = params.getFieldTime();
+		Integer level = params.getFieldLevel();
+		String fieldVar = params.getStringVariable();
+		
+		blockRefreshEvent = true;
+		for (int i = 0; i < panel.getGridVariableCombo().getItemCount(); i++) {
+			if(fieldVar.compareTo((String)panel.getGridVariableCombo().getItemAt(i)) == 0) {
+				panel.getGridVariableCombo().setSelectedIndex(i);
+				break;
+			}
+		}
+		panel.getTimeCombo().setSelectedIndex(time.intValue());
+		panel.getLevelCombo().setSelectedIndex(level.intValue());
+		blockRefreshEvent = false;
+	}
+	
+	/**
+	 * Loads the main window of data
+	 * @throws IOException
+	 */
+	private void loadVariablesFromParameters() throws IOException {
+		NetCDFDataParameters params = ((NetCDFDataParameters)lyr.getDataStore().getInternalParameters());
+		
+		panel.getXDimField().setText(params.getXDimVariable());
+		panel.getYDimField().setText(params.getYDimVariable());
+		
+		blockRefreshEvent = true;
+		ArrayList<String[]> listGridVars = params.getGridVariables();
+		panel.getGridVariableCombo().removeAllItems();
+		for (int i = 0; i < listGridVars.size(); i++) {
+			panel.getGridVariableCombo().addItem(listGridVars.get(i)[0]);
+		}
+		
+		listVars = params.getVariables();
+		panel.getVariableCombo().removeAllItems();
+		if(listVars != null) {
+			for (int i = 0; i < listVars.size(); i++) {
+				panel.getVariableCombo().addItem(listVars.get(i).getName());
+			}
+		} else {
+			panel.getLevelCombo().addItem(NOVALUE);
+		}
+
+		Date[] dateList = params.getTimeList(params.getStringVariable());
+		panel.getTimeCombo().removeAllItems();
+		if(dateList != null) {
+			for (int i = 0; i < dateList.length; i++) {
+				panel.getTimeCombo().addItem(dateList[i]);
+			}
+		} else
+			panel.getTimeCombo().addItem(NOVALUE);
+		
+		panel.getLevelCombo().removeAllItems();
+		double[] levels = params.getLevelList(params.getStringVariable());
+		if(levels != null) {
+			for (int i = 0; i < levels.length; i++) {
+				panel.getLevelCombo().addItem(levels[i]);
+			}
+		} else
+			panel.getLevelCombo().addItem(NOVALUE);
+		
+		blockRefreshEvent = false;
+	}
+	
+	/**
+	 * Loads the description of the selected variable
+	 * @param selectedVariable
+	 * @throws IOException
+	 */
+	private void loadDescription(String selectedVariable) throws IOException {
+		NetCDFDataParameters params = ((NetCDFDataParameters)lyr.getDataStore().getInternalParameters());
+		ArrayList<String[]> list = params.getGridVariables();
+		for (int i = 0; i < list.size(); i++) {
+			String[] values = list.get(i);
+			if(values[0].compareTo(selectedVariable) == 0)
+				panel.getTxtDescription().setText(values[1]);
+		}
+	}
+	
+	/**
+	 * Loads the list of levels of the selected variable
+	 */
+	private void loadLevel() {
+		NetCDFDataParameters params = ((NetCDFDataParameters)lyr.getDataStore().getInternalParameters());
+		double[] levels = params.getLevelList((String)panel.getGridVariableCombo().getSelectedItem());
+		blockRefreshEvent = true;
+		panel.getLevelCombo().removeAllItems();
+		if(levels != null) {
+			for (int i = 0; i < levels.length; i++) {
+				panel.getLevelCombo().addItem(levels[i]);
+			}
+		} else
+			panel.getLevelCombo().addItem(NOVALUE);
+		blockRefreshEvent = false;
+	}
+	
+	/**
+	 * Loads the list of dates of the selected variable.
+	 */
+	private void loadDates() {
+		NetCDFDataParameters params = ((NetCDFDataParameters)lyr.getDataStore().getInternalParameters());
+		Date[] dateList = params.getTimeList((String)panel.getGridVariableCombo().getSelectedItem());
+		blockRefreshEvent = true;
+		panel.getTimeCombo().removeAllItems();
+		if(dateList != null) {
+			for (int i = 0; i < dateList.length; i++) {
+				panel.getTimeCombo().addItem(dateList[i]);
+			}
+		} else
+			panel.getTimeCombo().addItem(NOVALUE);
+		blockRefreshEvent = false;
+	}
+	
+	/**
+	 * Gets the main panel
+	 * @return
+	 */
+	private VariableSelectionPanel getVariableSelectionPanel() {
+		if(panel == null) {
+			panel = new VariableSelectionPanel();
+			panel.getGridVariableCombo().addActionListener(this);
+		}
+		return panel;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.andami.ui.mdiManager.IWindow#getWindowInfo()
+	 */
+	public WindowInfo getWindowInfo() {
+		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG);
+		m_viewinfo.setTitle(PluginServices.getText(this, "NetCDF_Variables"));
+		m_viewinfo.setHeight(HEIGHT);
+		m_viewinfo.setWidth(WIDTH);
+		return m_viewinfo;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.andami.ui.mdiManager.IWindow#getWindowProfile()
+	 */
+	public Object getWindowProfile() {
+		return WindowInfo.PROPERTIES_PROFILE;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
+	 */
+	public void actionPerformed(ActionEvent e) {
+		if(blockRefreshEvent)
+			return;
+		
+		if(e.getSource() == panel.getGridVariableCombo()) {
+			try {
+				loadDescription((String)panel.getGridVariableCombo().getSelectedItem());
+				loadLevel();
+				loadDates();
+			} catch (IOException e1) {
+				panel.getTxtDescription().setText("?");
+			}
+		}
+		
+		if(e.getSource() == panel.getGridVarUpDownPanel().getDownButton()) {
+			panel.getGridVariableCombo().setSelectedIndex(
+					Math.min(panel.getGridVariableCombo().getSelectedIndex() + 1,
+					panel.getGridVariableCombo().getItemCount() - 1));
+		}
+		
+		if(e.getSource() == panel.getGridVarUpDownPanel().getUpButton()) {
+			panel.getGridVariableCombo().setSelectedIndex(
+					Math.max(panel.getGridVariableCombo().getSelectedIndex() - 1,
+					0));
+		}
+		
+		if(e.getSource() == panel.getTimeUpDownPanel().getDownButton()) {
+			panel.getTimeCombo().setSelectedIndex(
+					Math.min(panel.getTimeCombo().getSelectedIndex() + 1,
+					panel.getTimeCombo().getItemCount() - 1));
+		}
+		
+		if(e.getSource() == panel.getTimeUpDownPanel().getUpButton()) {
+			panel.getTimeCombo().setSelectedIndex(
+					Math.max(panel.getTimeCombo().getSelectedIndex() - 1,
+					0));
+		}
+		
+		if(e.getSource() == panel.getLevelUpDownPanel().getDownButton()) {
+			panel.getLevelCombo().setSelectedIndex(
+					Math.min(panel.getLevelCombo().getSelectedIndex() + 1,
+					panel.getLevelCombo().getItemCount() - 1));
+		}
+		
+		if(e.getSource() == panel.getLevelUpDownPanel().getUpButton()) {
+			panel.getLevelCombo().setSelectedIndex(
+					Math.max(panel.getLevelCombo().getSelectedIndex() - 1,
+					0));
+		}
+		
+		if(e.getSource() == panel.getVarPropertiesButton()) {
+			showVariableProperties((String)panel.getVariableCombo().getSelectedItem());
+			openVariableTable();
+		}
+		
+		if(e.getSource() == panel.getVariableCombo()) {
+			showVariableProperties((String)panel.getVariableCombo().getSelectedItem());
+		}
+		
+		//Apply when a selection changes
+		if((e.getSource() == panel.getGridVariableCombo() || 
+			e.getSource() == panel.getTimeCombo() || 
+			e.getSource() == panel.getLevelCombo())) 
+			actionButtonPressed(null);
+	}
+	
+	/**
+	 * Shows the dialog for properties variable
+	 * @param var
+	 */
+	private void showVariableProperties(String var) {
+		if(listVars != null) {
+			ArrayList<String[]> varValue = new ArrayList<String[]>();
+			for (int i = 0; i < listVars.size(); i++) {
+				Variable v = listVars.get(i);
+				String name = v.getName();
+				if(name.compareTo(var) == 0) {
+					varValue.add(new String[] {PluginServices.getText(this, "description"), v.getDescription()});
+					varValue.add(new String[] {PluginServices.getText(this, "dimensions"), v.getDimensionsString()});
+					int[] shape = v.getShape();
+					String shapeString = "";
+					for (int j = 0; j < shape.length; j++) {
+						shapeString += shape[j] + ", ";
+					}
+					varValue.add(new String[] {PluginServices.getText(this, "shape"), shapeString});
+					varValue.add(new String[] {PluginServices.getText(this, "units"), v.getUnitsString()});
+					varValue.add(new String[] {PluginServices.getText(this, "dataType"), v.getDataType().toString()});
+				}
+			}
+			try {
+				panel.getTablePanel().getTable().removeAllRows();
+			} catch (NotInitializeException e) {
+				logger.debug(org.gvsig.i18n.Messages.getText("error_removing_rows"), e);
+			}
+			panel.getTablePanel().setRows(varValue);
+		}
+	}
+	
+	/**
+	 * Opens variable table
+	 */
+	private void openVariableTable() {
+		//Shows and hides the table of data
+		if(panel.getSouthPanel().isVisible()) {
+			panel.showTable(false);
+			PluginServices.getMDIManager().getWindowInfo(this).setHeight(HEIGHT);
+		} else {
+			panel.showTable(true);
+			PluginServices.getMDIManager().getWindowInfo(this).setHeight(500);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener#actionButtonPressed(org.gvsig.gui.beans.buttonspanel.ButtonsPanelEvent)
+	 */
+	public void actionButtonPressed(ButtonsPanelEvent e) {
+		if(blockRefreshEvent)
+			return;
+			
+		// Bot�n de Aplicar
+		if (e == null || e.getButton() == ButtonsPanel.BUTTON_APPLY) {
+			//DataManager datamanager = DALLocator.getDataManager();
+			//FilesystemServerExplorerParameters explorerParams = (FilesystemServerExplorerParameters) datamanager.createServerExplorerParameters(FilesystemServerExplorer.NAME);
+			//DataServerExplorer explorer = datamanager.openServerExplorer(FilesystemServerExplorer.NAME, explorerParams);
+			//NewDataStoreParameters newParams = explorer.getAddParameters(NetCDFProvider.NAME);
+			NetCDFDataParameters newParams = (NetCDFDataParameters)lyr.getDataStore().getInternalParameters();
+			newParams.setDynValue(NetCDFDataParameters.FIELD_VARIABLE, panel.getGridVariableCombo().getSelectedItem());
+			String value = (String)panel.getTimeCombo().getSelectedItem().toString();
+			newParams.setDynValue(NetCDFDataParameters.FIELD_TIME, value.compareTo(NOVALUE) == 0 ? 0 : panel.getTimeCombo().getSelectedIndex());
+			value = (String)panel.getLevelCombo().getSelectedItem().toString();
+			newParams.setDynValue(NetCDFDataParameters.FIELD_LEVEL, value.compareTo(NOVALUE) == 0 ? new Integer(0) : new Integer(panel.getLevelCombo().getSelectedIndex()));
+
+			//The statistics have to be recalculated for each subdataset
+			try {
+				lyr.getDataStore().getStatistics().forceToRecalc();
+				lyr.getDataStore().getStatistics().calculate(1);
+			} catch (FileNotOpenException e1) {
+				logger.debug(org.gvsig.i18n.Messages.getText("error_stats"), e1);
+			} catch (RasterDriverException e1) {
+				logger.debug(org.gvsig.i18n.Messages.getText("error_stats"), e1);
+			} catch (ProcessInterruptedException e1) {
+			}
+
+			//If there is a color table this will have to be adapted to subdataset range
+			if(lyr.getRender().getColorTable() != null)
+				lyr.getRender().getColorTable().createColorTableInRange(lyr.getDataStore().getStatistics().getMinimun(), lyr.getDataStore().getStatistics().getMaximun(), false);
+			lyr.getMapContext().invalidate();
+		}
+		
+		// Bot�n de Cerrar
+		if (e != null && e.getButton() == ButtonsPanel.BUTTON_CLOSE)
+			PluginServices.getMDIManager().closeWindow(this);
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/NetCDFPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableSelectionPanel.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableSelectionPanel.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableSelectionPanel.java	(revision 20991)
@@ -0,0 +1,472 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ */
+package org.gvsig.raster.netcdf.app.netcdfclient.gui.panel;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+
+/**
+ * Panel for selecting grid variables and dimensions
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class VariableSelectionPanel extends JPanel {
+	private static final long       serialVersionUID         = 1L;
+	private JLabel                  xdimLabel                = null;
+	private JLabel                  ydimLabel                = null;
+	private JLabel                  gridVariableLabel        = null;
+	private JLabel                  gridVarDescriptionLabel  = null;
+	private JLabel                  varDescriptionLabel      = null;
+	private JLabel                  levelLabel               = null;
+	private JLabel                  timeLabel                = null;
+	private JTextArea               txtDescription           = null;
+	private JTextField              xdimField                = null;
+	private JTextField              ydimField                = null;
+	private JComboBox               gridVariableCombo        = null;
+	private JComboBox               levelCombo               = null;
+	private JComboBox               timeCombo                = null;
+	private JComboBox               variableCombo            = null;
+	private UpDownPanel             varUpDown                = null;
+	private UpDownPanel             timeUpDown               = null;
+	private UpDownPanel             levelUpDown              = null;
+	private JPanel                  varPanel                 = null;
+	private JPanel                  gridVarPanel             = null;
+	private JPanel                  timePanel                = null;
+	private JPanel                  levelPanel               = null;
+	private JPanel                  dimPanel                 = null;
+	private JPanel                  northPanel               = null;
+	private JPanel                  southPanel               = null;
+	private JPanel                  centerPanel              = null;
+	private JPanel                  auxPanel                 = new JPanel();
+	private JButton                 varPropertiesButton      = null;
+	private VariableTablePanel      tablePanel               = null;
+	private String                  pathToImagesForTest      = "/src/main/resources/images/";
+	
+	public VariableSelectionPanel() {
+		xdimLabel = new JLabel(PluginServices.getText(this, "xdim"));
+		ydimLabel = new JLabel(PluginServices.getText(this, "ydim"));
+		gridVariableLabel = new JLabel(PluginServices.getText(this, "gridvar"));
+		gridVarDescriptionLabel = new JLabel(PluginServices.getText(this, "gridvardescription"));
+		varDescriptionLabel = new JLabel(PluginServices.getText(this, "vardescription"));
+		levelLabel = new JLabel(PluginServices.getText(this, "level"));
+		timeLabel = new JLabel(PluginServices.getText(this, "time"));
+		init();
+	}
+	
+	GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+	
+	private void init() {
+		setLayout(new GridBagLayout());
+		gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+		gridBagConstraints1.weightx = 1.0;
+		gridBagConstraints1.weighty = 0.0;
+		gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+		gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2);
+		
+		add(getNorthPanel(), gridBagConstraints1);
+		
+		gridBagConstraints1.gridy = 1;
+		add(getCenterPanel(), gridBagConstraints1);
+		
+		showTable(false);
+	}
+	
+	/**
+	 * Shows and hides the table of data
+	 * @param show
+	 */
+	public void showTable(boolean show) {
+		gridBagConstraints1.fill = GridBagConstraints.BOTH;
+		gridBagConstraints1.weightx = 1.0;
+		gridBagConstraints1.weighty = 1.0;
+		gridBagConstraints1.gridy = 2;
+		
+		if(show) {
+			remove(auxPanel);
+			add(getSouthPanel(), gridBagConstraints1);
+			getSouthPanel().setVisible(true);
+		} else {
+			remove(getSouthPanel());
+			add(auxPanel, gridBagConstraints1);
+			getSouthPanel().setVisible(false);
+		}
+	}
+	
+	/**
+	 * Gets the south panel
+	 * @return
+	 */
+	public JPanel getSouthPanel() {
+		if(southPanel == null) {
+			southPanel = new JPanel();
+			southPanel.setLayout(new BorderLayout());
+			southPanel.setBorder(BorderFactory.createLineBorder(Color.gray));
+			southPanel.add(getTablePanel(), BorderLayout.CENTER);
+		}
+		return southPanel;
+	}
+	
+	/**
+	 * Gets the north panel
+	 * @return
+	 */
+	private JPanel getNorthPanel() {
+		if(northPanel == null) {
+			northPanel = new JPanel();
+			northPanel.setLayout(new GridBagLayout());
+			northPanel.setBorder(BorderFactory.createLineBorder(Color.gray));
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2);
+			
+			gridBagConstraints1.gridy = 0;
+			northPanel.add(getDimPanel(), gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 1;
+			northPanel.add(levelLabel, gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 2;
+			northPanel.add(getLevelPanel(), gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 3;
+			northPanel.add(timeLabel, gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 4;
+			northPanel.add(getTimePanel(), gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 5;
+			northPanel.add(gridVariableLabel, gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 6;
+			northPanel.add(getGridVarPanel(), gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 7;
+			northPanel.add(gridVarDescriptionLabel, gridBagConstraints1);
+			
+			gridBagConstraints1.gridy = 8;
+			gridBagConstraints1.fill = GridBagConstraints.BOTH;
+			gridBagConstraints1.weighty = 1.0;
+			northPanel.add(getTxtDescription(), gridBagConstraints1);
+			
+			//gridBagConstraints1.gridy = 9;
+			//gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+			//gridBagConstraints1.weighty = 0.0;
+			//northPanel.add(varDescriptionLabel, gridBagConstraints1);
+			
+			//gridBagConstraints1.gridy = 10;
+			//northPanel.add(getVarPanel(), gridBagConstraints1);
+		}
+		return northPanel;
+	}
+	
+	/**
+	 * Gets the center panel
+	 * @return
+	 */
+	public JPanel getCenterPanel() {
+		if(centerPanel == null) {
+			centerPanel = new JPanel();
+			centerPanel.setLayout(new GridBagLayout());
+			centerPanel.setBorder(BorderFactory.createLineBorder(Color.gray));
+			
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.weighty = 0.0;
+			gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2);
+			
+			centerPanel.add(varDescriptionLabel, gridBagConstraints1);
+			gridBagConstraints1.gridy = 1;
+			centerPanel.add(getVarPanel(), gridBagConstraints1);
+		}
+		return centerPanel;
+	}
+	
+	/**
+	 * Gets the table panel 
+	 * @return
+	 */
+	public VariableTablePanel getTablePanel() {
+		if(tablePanel == null) {
+			tablePanel = new VariableTablePanel();
+		}
+		return tablePanel;
+	}
+	
+	/**
+	 * Gets the panel of dimension variables
+	 * @return
+	 */
+	private JPanel getDimPanel() {
+		if(dimPanel == null) {
+			dimPanel = new JPanel();
+			dimPanel.setLayout(new GridBagLayout());
+			
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.insets = new java.awt.Insets(2, 2, 2, 2);
+			
+			gridBagConstraints1.gridx = 0;
+			gridBagConstraints1.gridy = 0;
+			dimPanel.add(xdimLabel, gridBagConstraints1);
+			
+			gridBagConstraints1.gridx = 1;
+			gridBagConstraints1.gridy = 0;
+			dimPanel.add(ydimLabel, gridBagConstraints1);
+			
+			gridBagConstraints1.gridx = 0;
+			gridBagConstraints1.gridy = 1;
+			dimPanel.add(getXDimField(), gridBagConstraints1);
+			
+			gridBagConstraints1.gridx = 1;
+			gridBagConstraints1.gridy = 1;
+			dimPanel.add(getYDimField(), gridBagConstraints1);
+		}
+		return dimPanel;
+	}
+	
+	public javax.swing.JTextArea getTxtDescription() {
+		if (txtDescription == null) {
+			txtDescription = new javax.swing.JTextArea();
+			txtDescription.setWrapStyleWord(true);
+			txtDescription.setColumns(30);
+			txtDescription.setLineWrap(true);
+			txtDescription.setEditable(false);
+		}
+		return txtDescription;
+	}
+	
+	public JComboBox getTimeCombo() {
+		if(timeCombo == null) {
+			timeCombo = new JComboBox();
+		}
+		return timeCombo;
+	}
+	
+	public JComboBox getLevelCombo() {
+		if(levelCombo == null) {
+			levelCombo = new JComboBox();
+		}
+		return levelCombo;
+	}
+	
+	public JTextField getXDimField() {
+		if(xdimField == null) {
+			xdimField = new JTextField();
+			xdimField.setEditable(false);
+		}
+		return xdimField;
+	}
+	
+	public JTextField getYDimField() {
+		if(ydimField == null) {
+			ydimField = new JTextField();
+			ydimField.setEditable(false);
+		}
+		return ydimField;
+	}
+	
+	public JComboBox getGridVariableCombo() {
+		if(gridVariableCombo == null) {
+			gridVariableCombo = new JComboBox();
+		}
+		return gridVariableCombo;
+	}
+	
+	public JComboBox getVariableCombo() {
+		if(variableCombo == null) {
+			variableCombo = new JComboBox();
+		}
+		return variableCombo;
+	}
+	
+	public JButton getVarPropertiesButton() {
+		if(varPropertiesButton == null) {
+			varPropertiesButton = new JButton(loadIcon("inspect-icon"));
+		}
+		return varPropertiesButton;
+	}
+	
+	/**
+	 * Gets the panel of variable controls
+	 * @return
+	 */
+	private JPanel getVarPanel() {
+		if(varPanel == null) {
+			varPanel = new JPanel();
+			varPanel.setLayout(new GridBagLayout());
+			
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.insets = new java.awt.Insets(0, 2, 0, 0);
+			
+			gridBagConstraints1.gridx = 0;
+			gridBagConstraints1.gridy = 0;
+			varPanel.add(getVariableCombo(), gridBagConstraints1);
+			
+			gridBagConstraints1.fill = GridBagConstraints.NONE;
+			gridBagConstraints1.weightx = 0.0;
+			gridBagConstraints1.gridx = 1;
+			gridBagConstraints1.gridy = 0;
+			varPanel.add(getVarPropertiesButton(), gridBagConstraints1);
+		}
+		return varPanel;
+	}
+	
+	/**
+	 * Gets the panel of variable controls
+	 * @return
+	 */
+	private JPanel getGridVarPanel() {
+		if(gridVarPanel == null) {
+			gridVarPanel = new JPanel();
+			gridVarPanel.setLayout(new GridBagLayout());
+			
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.insets = new java.awt.Insets(0, 2, 0, 0);
+			
+			gridBagConstraints1.gridx = 0;
+			gridBagConstraints1.gridy = 0;
+			gridVarPanel.add(getGridVariableCombo(), gridBagConstraints1);
+			
+			gridBagConstraints1.fill = GridBagConstraints.NONE;
+			gridBagConstraints1.weightx = 0.0;
+			gridBagConstraints1.gridx = 1;
+			gridBagConstraints1.gridy = 0;
+			gridVarPanel.add(getGridVarUpDownPanel(), gridBagConstraints1);
+		}
+		return gridVarPanel;
+	}
+	
+	/**
+	 * Gets the panel of time controls
+	 * @return
+	 */
+	private JPanel getTimePanel() {
+		if(timePanel == null) {
+			timePanel = new JPanel();
+			timePanel.setLayout(new GridBagLayout());
+			
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.BOTH;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.weighty = 1.0;
+			gridBagConstraints1.insets = new java.awt.Insets(0, 2, 0, 0);
+			
+			gridBagConstraints1.gridx = 0;
+			gridBagConstraints1.gridy = 0;
+			timePanel.add(getTimeCombo(), gridBagConstraints1);
+			
+			gridBagConstraints1.fill = GridBagConstraints.NONE;
+			gridBagConstraints1.weightx = 0.0;
+			gridBagConstraints1.weighty = 0.0;
+			gridBagConstraints1.gridx = 1;
+			gridBagConstraints1.gridy = 0;
+			timePanel.add(getTimeUpDownPanel(), gridBagConstraints1);
+		}
+		return timePanel;
+	}
+	
+	/**
+	 * Gets the panel of level controls
+	 * @return
+	 */
+	private JPanel getLevelPanel() {
+		if(levelPanel == null) {
+			levelPanel = new JPanel();
+			levelPanel.setLayout(new GridBagLayout());
+			
+			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+			gridBagConstraints1.fill = GridBagConstraints.BOTH;
+			gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+			gridBagConstraints1.weightx = 1.0;
+			gridBagConstraints1.weighty = 1.0;
+			gridBagConstraints1.insets = new java.awt.Insets(0, 2, 0, 0);
+			
+			gridBagConstraints1.gridx = 0;
+			gridBagConstraints1.gridy = 0;
+			levelPanel.add(getLevelCombo(), gridBagConstraints1);
+			
+			gridBagConstraints1.fill = GridBagConstraints.NONE;
+			gridBagConstraints1.weightx = 0.0;
+			gridBagConstraints1.weighty = 0.0;
+			gridBagConstraints1.gridx = 1;
+			gridBagConstraints1.gridy = 0;
+			levelPanel.add(getLevelUpDownPanel(), gridBagConstraints1);
+		}
+		return levelPanel;
+	}
+	
+	public UpDownPanel getGridVarUpDownPanel() {
+		if(varUpDown == null) {
+			varUpDown = new UpDownPanel();
+		}
+		return varUpDown;
+	}
+	
+	public UpDownPanel getTimeUpDownPanel() {
+		if(timeUpDown == null) {
+			timeUpDown = new UpDownPanel();
+		}
+		return timeUpDown;
+	}
+	
+	public UpDownPanel getLevelUpDownPanel() {
+		if(levelUpDown == null) {
+			levelUpDown = new UpDownPanel();
+		}
+		return levelUpDown;
+	}
+	
+	private ImageIcon loadIcon(String iconName) {
+		ImageIcon icon = null;
+		try {
+			icon = IconThemeHelper.getImageIcon(iconName);
+		} catch(NullPointerException e) {}
+		if(icon == null) 
+			icon = new ImageIcon(System.getProperty("user.dir") + pathToImagesForTest + iconName + ".png", "");
+		if(icon == null) 
+			icon = new ImageIcon(System.getProperty("user.dir") + pathToImagesForTest + iconName + ".gif", "");
+		return icon;
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableSelectionPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/UpDownPanel.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/UpDownPanel.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/UpDownPanel.java	(revision 20991)
@@ -0,0 +1,86 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ */
+package org.gvsig.raster.netcdf.app.netcdfclient.gui.panel;
+
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JPanel;
+
+import org.gvsig.andami.IconThemeHelper;
+
+/**
+ * Panel for up and down button
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class UpDownPanel extends JPanel {
+	private static final long       serialVersionUID     = 1L;
+	private JButton                 up                   = null;
+	private JButton                 down                 = null;
+	private String                  pathToImagesForTest  = "/src/main/resources/images/";
+	
+	public UpDownPanel() {
+		init();
+	}
+	
+	private void init() {
+		setLayout(new GridBagLayout());
+		
+		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
+		gridBagConstraints1.fill = GridBagConstraints.BOTH;
+		gridBagConstraints1.anchor = GridBagConstraints.CENTER;
+		gridBagConstraints1.weightx = 1.0;
+		gridBagConstraints1.weighty = 1.0;
+		
+		add(getDownButton(), gridBagConstraints1);
+				
+		gridBagConstraints1.gridx = 1;
+		add(getUpButton(), gridBagConstraints1);
+	}
+
+	public JButton getUpButton() {
+		if(up == null) {
+			up = new JButton(loadIcon("nextarrow-icon"));
+			//up.setPreferredSize(new Dimension(32, 12));
+		}
+		return up;
+	}
+	
+	public JButton getDownButton() {
+		if(down == null) {
+			down = new JButton(loadIcon("prevarrow-icon"));
+			//down.setPreferredSize(new Dimension(32, 12));
+		}
+		return down;
+	}
+	
+	private ImageIcon loadIcon(String iconName) {
+		ImageIcon icon = null;
+		try {
+			icon = IconThemeHelper.getImageIcon(iconName);
+		} catch(NullPointerException e) {}
+		if(icon == null) 
+			icon = new ImageIcon(System.getProperty("user.dir") + pathToImagesForTest + iconName + ".png", "");
+		if(icon == null) 
+			icon = new ImageIcon(System.getProperty("user.dir") + pathToImagesForTest + iconName + ".gif", "");
+		return icon;
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/UpDownPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableTablePanel.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableTablePanel.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableTablePanel.java	(revision 20991)
@@ -0,0 +1,73 @@
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ */
+package org.gvsig.raster.netcdf.app.netcdfclient.gui.panel;
+
+import java.awt.BorderLayout;
+import java.util.ArrayList;
+
+import javax.swing.JPanel;
+
+import org.gvsig.andami.PluginServices;
+import org.gvsig.gui.beans.table.TableContainer;
+import org.gvsig.gui.beans.table.exceptions.NotInitializeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Panel for show variables
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class VariableTablePanel extends JPanel {
+	private static final long serialVersionUID = 1L;
+	private Logger            logger           = LoggerFactory.getLogger(VariableTablePanel.class.toString());
+	private TableContainer    table            = null;
+	private String[]          columnNames      = null;
+	private int[]             columnWidths     = null;
+	
+	public VariableTablePanel() {
+		init();
+	}
+	
+	public TableContainer getTable() {
+		if(table == null) {
+			columnNames = new String[]{PluginServices.getText(this, "property"), PluginServices.getText(this, "value")};
+			columnWidths = new int[]{(int)(NetCDFPanel.WIDTH * 0.3) , (int)(NetCDFPanel.WIDTH * 0.7)};
+			table = new TableContainer(columnNames, columnWidths);
+			table.initialize();
+			table.setControlVisible(false);
+		}
+		return table;
+	}
+
+	private void init() {
+		setLayout(new BorderLayout());
+		add(getTable(), BorderLayout.CENTER);
+	}
+	
+	public void setRows(ArrayList<String[]> varValue) {
+		for (int i = 0; i < varValue.size(); i++) {
+			try {
+				table.addRow(varValue.get(i));
+			} catch (NotInitializeException e) {
+				logger.debug(org.gvsig.i18n.Messages.getText("error_adding_rows"), e);
+			}
+		}
+	}
+
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/java/org/gvsig/raster/netcdf/app/netcdfclient/gui/panel/VariableTablePanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/text_en.properties
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/text_en.properties	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/text_en.properties	(revision 20991)
@@ -0,0 +1,18 @@
+level=Level
+gridvar=Grid Variable
+NetCDF_Properties=NetCDF properties
+NetCDF_Variables=NetCDF variables
+error_stats=Error while calculatin statistics
+coordSys=Coordinate system
+dataType=Type of data
+description=Description
+dimensions=Dimensions
+group=Group
+name=Name
+shape=Shape
+units=Units
+property=Property
+variable_info=Variable information
+vardescription=Variable description
+gridvardescription=Grid variable description
+error_adding_rows=Error while adding rows to the table

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/config.xml	(revision 20991)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+	<depends plugin-name="org.gvsig.raster.mainplugin"/>
+	<depends plugin-name="org.gvsig.raster.tilecache.app" optional="true" />
+	<libraries library-dir="lib"/>
+	<resourceBundle name="text"/>
+	<extensions>
+		<extension class-name="org.gvsig.raster.netcdf.app.netcdfclient.NetCDFClientExtension"
+			description="M�dulo de NetCDF." 
+			active="true" 
+			priority="1">
+		</extension>
+	</extensions>
+</plugin-config>

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/images/inspect-icon.gif
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/images/inspect-icon.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

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

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

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

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/plugin.dtd
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/plugin.dtd	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/plugin.dtd	(revision 20991)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO_8859-1"?>
+<!ELEMENT class EMPTY >
+<!ATTLIST class name NMTOKEN #REQUIRED >
+
+<!ELEMENT extension ( class | menu | toolBar | toolBoxItem | popupMenu)* >
+<!ATTLIST extension enabled NMTOKEN #IMPLIED >
+<!ATTLIST extension position NMTOKEN #IMPLIED >
+
+<!ELEMENT fileExtension ( class ) >
+<!ATTLIST fileExtension description CDATA #REQUIRED >
+<!ATTLIST fileExtension enabled NMTOKEN #IMPLIED >
+<!ATTLIST fileExtension endsWith CDATA #REQUIRED >
+<!ATTLIST fileExtension dialog CDATA #REQUIRED >
+
+<!ELEMENT import EMPTY >
+<!ATTLIST import plugin NMTOKEN #REQUIRED >
+
+<!ELEMENT libraries ( library+ ) >
+
+<!ELEMENT library EMPTY >
+<!ATTLIST library file NMTOKEN #REQUIRED >
+
+<!ELEMENT menu EMPTY >
+<!ATTLIST menu actionCommand NMTOKEN #IMPLIED >
+<!ATTLIST menu enableText CDATA #IMPLIED >
+<!ATTLIST menu key NMTOKEN #IMPLIED >
+<!ATTLIST menu mnemonic NMTOKEN #IMPLIED >
+<!ATTLIST menu icon CDATA #IMPLIED >
+<!ATTLIST menu text CDATA #REQUIRED >
+<!ATTLIST menu tooltip CDATA #IMPLIED >
+
+<!ELEMENT plugin ( import*, libraries, resourceBundle, labelSet*, extension*, fileExtension*, icon*) >
+
+<!ELEMENT icon EMPTY >
+<!ATTLIST icon src CDATA #REQUIRED >
+<!ATTLIST icon text CDATA #REQUIRED >
+
+<!ELEMENT resourceBundle EMPTY >
+<!ATTLIST resourceBundle name NMTOKEN #REQUIRED >
+
+<!ELEMENT tool EMPTY >
+<!ATTLIST tool actionCommand NMTOKEN #IMPLIED >
+<!ATTLIST tool enableText CDATA #IMPLIED >
+<!ATTLIST tool icon CDATA #IMPLIED >
+<!ATTLIST tool text NMTOKEN #IMPLIED >
+<!ATTLIST tool tooltip CDATA #IMPLIED >
+
+<!ELEMENT toolBar ( tool+ ) >
+<!ATTLIST toolBar name NMTOKEN #IMPLIED >
+
+<!ELEMENT entry EMPTY >
+<!ATTLIST entry text CDATA #IMPLIED >
+<!ATTLIST entry enableText CDATA #IMPLIED >
+<!ATTLIST entry tooltip CDATA #IMPLIED >
+<!ATTLIST entry actionCommand NMTOKEN #IMPLIED >
+
+<!ELEMENT popupMenu ( entry+ ) >
+<!ATTLIST popupMenu name NMTOKEN #IMPLIED >
+
+<!ELEMENT labelSet ( label+ ) >
+<!ATTLIST labelSet class NMTOKEN #REQUIRED >
+
+<!ELEMENT label EMPTY >
+<!ATTLIST label text NMTOKEN #REQUIRED >
+<!ATTLIST label size NMTOKEN #IMPLIED>
+
+<!ELEMENT toolBoxItem EMPTY >
+<!ATTLIST toolBoxItem default NMTOKEN #IMPLIED >
+<!ATTLIST toolBoxItem actionCommand NMTOKEN #IMPLIED >
+<!ATTLIST toolBoxItem icon CDATA #IMPLIED >
+<!ATTLIST toolBoxItem text CDATA #IMPLIED >
+<!ATTLIST toolBoxItem tooltip CDATA #IMPLIED >
\ No newline at end of file

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/plugin.dtd
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/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.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/logo.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/Thumbs.db
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/Thumbs.db
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/netcdf-about.html
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/netcdf-about.html	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/netcdf-about.html	(revision 20991)
@@ -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 WKT 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.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/about/netcdf-about.html
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/text.properties
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/text.properties	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient/src/main/resources-plugin/text.properties	(revision 20991)
@@ -0,0 +1,18 @@
+level=Nivel
+gridvar=Variable Grid
+NetCDF_Properties=Propiedades de NetCDF
+NetCDF_Variables=Variables de NetCDF
+error_stats=Error calculando las estad�sticas
+coordSys=Sistema de coordenadas
+dataType=Tipo de dato
+description=Descripci�n
+dimensions=Dimensiones
+group=Grupo
+name=Nombre
+shape=Shape
+units=Unidades
+property=Propiedad
+variable_info=Informaci�n de variable
+vardescription=Descripci�n de variable
+gridvardescription=Descripci�n de variable grid
+error_adding_rows=Error a�adiendo filas a la tabla

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


Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.app.netcdfclient
___________________________________________________________________
Added: svn:ignore
   + target

.classpath

.settings

.project


Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/pom.xml
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/pom.xml	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/pom.xml	(revision 20991)
@@ -0,0 +1,90 @@
+<?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.netcdf</artifactId>
+	<packaging>pom</packaging>
+	<version>2.2.223</version>
+	<name>${project.artifactId}</name>
+	<description>NetCDF adapter</description>
+	<inceptionYear>2011</inceptionYear>
+	<parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.425</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.248</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.netcdf/tags/org.gvsig.raster.netcdf-2.2.223</connection>
+        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-raster/org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223</developerConnection>
+        <url>https://devel.gvsig.org/redmine/projects/gvsig-raster/repository/show/org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223</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.netcdf/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>essi-unidata</groupId>
+			  <artifactId>netcdf-java</artifactId>
+			  <version>4.2</version>
+			</dependency>
+			
+
+			<dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.raster.netcdf.io</artifactId>
+        <version>2.2.223</version>
+      </dependency>
+      
+    	</dependencies>
+    </dependencyManagement>
+    
+	<modules>
+		<module>org.gvsig.raster.netcdf.io</module>
+		<module>org.gvsig.raster.netcdf.app.netcdfclient</module>
+	</modules>
+	
+</project>

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

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParametersImpl.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParametersImpl.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParametersImpl.java	(revision 20991)
@@ -0,0 +1,345 @@
+/* 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.netcdf.io;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+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;
+
+import ucar.nc2.Dimension;
+import ucar.nc2.NetcdfFile;
+import ucar.nc2.Variable;
+import ucar.nc2.dataset.CoordinateAxis1D;
+import ucar.nc2.dataset.CoordinateAxis1DTime;
+import ucar.nc2.dt.GridCoordSystem;
+import ucar.nc2.dt.GridDatatype;
+import ucar.nc2.dt.grid.GridDataset;
+
+/**
+ * Parameters for the NetCDF provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFDataParametersImpl extends AbstractRasterFileDataParameters implements NetCDFDataParameters {
+	private ArrayList<String[]>           gridVarList                = null;
+	private ArrayList<Variable>           varList                    = null;
+	private HashMap<String, double[]>     rankByVar                  = new HashMap<String, double[]>();
+	private HashMap<String, Date[]>       dateByVar                  = new HashMap<String, Date[]>();
+	private String                        xDimVariable               = null;
+	private String                        yDimVariable               = null;
+	
+	
+	public NetCDFDataParametersImpl() {
+		super();
+		initialize();
+	}
+	
+	protected void initialize() {
+		delegatedDynObject = (DelegatedDynObject) ToolsLocator
+				.getDynObjectManager().createDynObject(
+						registerDynClass());
+	}
+	
+	public static DynStruct registerDynClass() {
+		PersistenceManager manager = ToolsLocator.getPersistenceManager();
+		DynStruct definition = manager.getDefinition("NetCDFDataParametersImpl_Persistent");
+		if( definition == null ) {
+			definition = manager.addDefinition(
+					NetCDFDataParametersImpl.class,
+					"NetCDFDataParametersImpl_Persistent",
+					"NetCDFDataParametersImpl Persistent",
+					null, 
+					null
+			);
+			AbstractRasterFileDataParameters.registerDynClass(definition);
+		}
+		
+		definition.addDynFieldString(FIELD_VARIABLE)
+		.setDescription("Grid variable")
+		.setMandatory(false);
+        
+		definition.addDynFieldInt(FIELD_LEVEL)
+		.setDescription("Level selected")
+		.setMandatory(false);
+        
+		definition.addDynFieldInt(FIELD_TIME)
+		.setDescription("Time selected")
+		.setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_XDIM).
+		setMandatory(false);
+		
+		definition.addDynFieldString(FIELD_YDIM).
+		setMandatory(false);
+        
+		return definition;
+	}
+	
+	/**
+	 * Gets the list of grids
+	 * @return A list of pair of values. The first element of one pair is the variable's name 
+	 * and the second its description
+	 * @throws IOException 
+	 */
+	public ArrayList<Variable> getVariables() throws IOException {
+		if(varList == null) {
+			NetcdfFile netCDFFile = NetcdfFile.open(getFile().getAbsolutePath());
+			varList = new ArrayList<Variable>();
+			
+			List<Variable> variableList = netCDFFile.getVariables();
+            Iterator<Variable> it = variableList.iterator();
+            while(it.hasNext()) {
+            	Variable var = it.next();
+            	varList.add(var);
+            }
+            netCDFFile.close();
+		}
+		return varList;
+	}
+	
+	/**
+	 * Gets the list of grids
+	 * @return A list of pair of values. The first element of one pair is the variable's name 
+	 * and the second its description
+	 * @throws IOException 
+	 */
+	public ArrayList<String[]> getGridVariables() throws IOException {
+		if(gridVarList == null) {
+			GridDataset connector = GridDataset.open(getFile().getAbsolutePath());
+			List<GridDatatype> gridList = connector.getGrids();
+			gridVarList = new ArrayList<String[]>();
+			Iterator<GridDatatype> it = gridList.iterator();
+			while(it.hasNext()) {
+				GridDatatype dt = it.next();
+				
+				//Loads name and description
+				String[] pair = new String[2];
+				pair[0] = dt.getName();
+				pair[1] = dt.getDescription();
+				gridVarList.add(pair);
+				
+				//Loads variable's name
+				Dimension dim = dt.getDimensions().get(dt.getXDimensionIndex());
+				xDimVariable = dim.getName();
+				dim = dt.getDimensions().get(dt.getYDimensionIndex());
+				yDimVariable = dim.getName();
+				
+				if(dt.getShape() != null) {
+					GridCoordSystem gcs = dt.getCoordinateSystem();
+					//Loads levels
+					CoordinateAxis1D zAxis = gcs.getVerticalAxis();
+					if(zAxis != null) {
+						double[] d = calcSliceValue(zAxis.getCoordEdges());
+						rankByVar.put(pair[0], d);
+					}
+					
+					//Loads time list
+					if (gcs.hasTimeAxis1D()) {
+						CoordinateAxis1DTime tAxis1D = gcs.getTimeAxis1D();
+						Date[] dates = tAxis1D.getTimeDates();
+						dateByVar.put(pair[0], dates);
+					}
+				}
+			}
+			connector.close();
+		}
+		return gridVarList;
+	}
+	
+	/**
+	 * Calculates the array of levels
+	 * @param coordsEdges
+	 * @return
+	 */
+	private double[] calcSliceValue(double[] coordsEdges) {
+		if(coordsEdges == null)
+			return null;
+		double[] values = new double[coordsEdges.length - 1];
+		for (int i = 0; i < coordsEdges.length - 1; i++) {
+			values[i] = ((coordsEdges[i] + coordsEdges[i + 1]) / 2);
+		}
+		return values;
+	}
+	
+	/**
+	 * Gets the list of dates
+	 * @param var
+	 * @return
+	 */
+	public Date[] getTimeList(String var) {
+		return dateByVar.get(var);
+	}
+
+	/**
+	 * Gets the number of levels of one variable
+	 * @param var
+	 * @return
+	 */
+	public double[] getLevelList(String var) {
+		return rankByVar.get(var);
+	}
+	
+	/**
+	 * Gets the variable's name of the X dimension
+	 * @return
+	 */
+	public String getXDimVariable() {
+		return xDimVariable;
+	}
+	
+	/**
+	 * Gets the variable's name of the Y dimension
+	 * @return
+	 */
+	public String getYDimVariable() {
+		return yDimVariable;
+	}
+	
+	public String getDataStoreName() {
+		return NetCDFProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return NetCDFProvider.DESCRIPTION;
+	}
+	
+	public void selectNextInstant() {
+		int i = getFieldTime() + 1;
+		if(i < getTimeListLength()) {
+			setDynValue(NetCDFDataParameters.FIELD_TIME, i);
+		}
+	}
+	
+	public void selectPrevInstant() {
+		int i = getFieldTime() - 1;
+		if(i >= 0) {
+			setDynValue(NetCDFDataParameters.FIELD_TIME, i);
+		}
+	}
+	
+	public void goTo(int position) {
+		if(position < getTimeListLength() && position >= 0) {
+			setDynValue(NetCDFDataParameters.FIELD_TIME, position);
+		}
+	}
+	
+	public int getFieldTime() {
+		if(hasDynValue(NetCDFDataParameters.FIELD_TIME) && getDynValue(NetCDFDataParameters.FIELD_TIME) != null) {
+			return ((Integer)getDynValue(NetCDFDataParameters.FIELD_TIME)).intValue();
+		}
+		return 0;
+	}
+	
+	public int getFieldLevel() {
+		if(hasDynValue(NetCDFDataParameters.FIELD_LEVEL) && getDynValue(NetCDFDataParameters.FIELD_LEVEL) != null) {
+			return ((Integer)getDynValue(NetCDFDataParameters.FIELD_LEVEL)).intValue();
+		}
+		return 0;
+	}
+	
+	public String getStringVariable() {
+		if(hasDynValue(NetCDFDataParameters.FIELD_VARIABLE)) {
+			return (String)getDynValue(NetCDFDataParameters.FIELD_VARIABLE);
+		}
+		
+		//We will use the first variable in the list
+		
+		try {
+			ArrayList<String[]> vars = getGridVariables();
+			if(vars.size() > 0) {
+				String[] var = vars.get(0);
+				if(var.length > 0) {
+					setFieldVariable(var[0]); 
+					return var[0];
+				}
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
+	public String getStringLevel() {
+		if(!hasDynValue(NetCDFDataParameters.FIELD_LEVEL)) {
+			//We will use the first level in the list
+			setFieldLevel(0);
+		}
+		
+		int index = ((Integer)getDynValue(NetCDFDataParameters.FIELD_LEVEL)).intValue();
+		double[] levelList = getLevelList(getStringVariable());
+		if(levelList == null)
+			return "-1";
+		return levelList[index] + "";
+	}
+	
+	public String getStringTime() {
+		if(!hasDynValue(NetCDFDataParameters.FIELD_TIME)) {
+			setFieldTime(0);
+		}
+		
+		int index = ((Integer)getDynValue(NetCDFDataParameters.FIELD_TIME)).intValue();
+		Date[] timeList = getTimeList(getStringVariable());
+		if(timeList == null)
+			return "-1";
+		return timeList[index].toString();
+	}
+	
+	/**
+	 * Gets the length of the time list
+	 * @return
+	 */
+	private int getTimeListLength() {
+		String var = (String)getDynValue(NetCDFDataParameters.FIELD_VARIABLE);
+		if(var != null) {
+			Date[] dateList = getTimeList(var);
+			if(dateList != null)
+				return dateList.length;
+		}
+		return 0;
+	}
+	
+	public void setFieldVariable(String variable) {
+		setDynValue(NetCDFDataParameters.FIELD_VARIABLE, variable);
+	}
+	
+	public void setFieldTime(int timePosInList) {
+		setDynValue(NetCDFDataParameters.FIELD_TIME, timePosInList);
+	}
+	
+	public void setFieldLevel(int levelPosInList) {
+		setDynValue(NetCDFDataParameters.FIELD_LEVEL, levelPosInList);
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParametersImpl.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/DefaultNetCDFIOLibrary.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/DefaultNetCDFIOLibrary.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/DefaultNetCDFIOLibrary.java	(revision 20991)
@@ -0,0 +1,44 @@
+/* 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.netcdf.io;
+
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+/**
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class DefaultNetCDFIOLibrary extends AbstractLibrary {	
+	
+	@Override
+	protected void doInitialize() throws LibraryException {
+		//RasterLibrary.wakeUp();
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		//NetCDFServerExplorerParameters.registerDynClass();
+		NetCDFDataParametersImpl.registerDynClass();
+		NetCDFProvider.register();
+		//NetCDFWriter.register();
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/DefaultNetCDFIOLibrary.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFProvider.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFProvider.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFProvider.java	(revision 20991)
@@ -0,0 +1,826 @@
+/* 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.netcdf.io;
+
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+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.dataset.Buffer;
+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.InvalidSourceException;
+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.parameter.RasterFileStoreParameters;
+import org.gvsig.fmap.dal.coverage.store.props.ColorInterpretation;
+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.provider.TileServer;
+import org.gvsig.raster.impl.DefaultRasterManager;
+import org.gvsig.raster.impl.buffer.SpiRasterQuery;
+import org.gvsig.raster.impl.datastruct.DefaultNoData;
+import org.gvsig.raster.impl.datastruct.ExtentImpl;
+import org.gvsig.raster.impl.provider.AbstractRasterProvider;
+import org.gvsig.raster.impl.provider.RasterProvider;
+import org.gvsig.raster.impl.provider.tile.FileTileServer;
+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.tools.ToolsLocator;
+
+import ucar.ma2.Array;
+import ucar.ma2.DataType;
+import ucar.ma2.InvalidRangeException;
+import ucar.ma2.Range;
+import ucar.nc2.dt.GridDatatype;
+import ucar.nc2.dt.grid.GridDataset;
+import ucar.unidata.geoloc.ProjectionRect;
+/**
+ * Data provider for NetCDF files with raster data
+ *
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFProvider extends AbstractRasterProvider {
+	public static String                     NAME                     = "NetCDF Raster";
+	public static String                     DESCRIPTION              = "NetCDF Raster file";
+	public final String                      METADATA_DEFINITION_NAME = NAME;
+	private Extent                           viewRequest              = null;
+	private TileServer                       tileServer               = null;
+	private boolean                          open                     = false;
+
+    private GridDataset                      gridNetCDF               = null;
+    private List<GridDatatype>               gridList                 = null;
+    private GridDatatype                     selectedGridDataType     = null;
+    private DataStoreTransparency            fileTransparency         = null;
+    private static final Logger              logger                   = LoggerFactory.getLogger(NetCDFProvider.class);
+    protected static String[]                formatList               = null;
+
+	public static void register() {
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator.getDataManager();
+		RasterLocator.getManager().getProviderServices().registerFileProvidersTiled(NetCDFProvider.class);
+		registerFormats();
+
+		if (dataman != null && !dataman.getStoreProviders().contains(NAME)) {
+			dataman.registerStoreProvider(NAME,
+					NetCDFProvider.class, NetCDFDataParametersImpl.class);
+		}
+
+
+		/*if (!dataman.getExplorerProviders().contains(NetCDFFilesystemServerExplorer.NAME)) {
+			dataman.registerExplorerProvider(NetCDFFilesystemServerExplorer.NAME, NetCDFFilesystemServerExplorer.class, NetCDFServerExplorerParameters.class);
+		}*/
+
+		if(DALFileLocator.getFilesystemServerExplorerManager() != null)
+			DALFileLocator.getFilesystemServerExplorerManager().registerProvider(
+					NAME, DESCRIPTION,
+					NetCDFFilesystemServerExplorer.class);
+
+
+		dataman.registerStoreFactory(NAME, DefaultStoreFactory.class);
+	}
+
+	private static void registerFormats() {
+		formatList      = new String[] {"nc", "nc4"};
+		for (int i = 0; i < formatList.length; i++)
+			RasterLocator.getManager().getProviderServices().addFormat(formatList[i], NetCDFProvider.class);
+	}
+
+	public String[] getFormatList() {
+		return formatList;
+	}
+
+	/**
+	 * Returns true if the extension is supported and false if doesn't
+	 * @param ext
+	 * @return
+	 */
+	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 NetCDFProvider() {
+	}
+
+	/**
+	 * Opens the dataset.
+	 * @param proj Projection
+	 * @param fName File name
+	 * @throws NotSupportedExtensionException
+     * @deprecated use {@link #NetCDFProvider(URI)}, this constructor will be removed in gvSIG 2.5
+	 */
+	public NetCDFProvider(String params) throws NotSupportedExtensionException, OpenException {
+		super(params);
+        logger.info("Deprecated use of NetCDFProvider constructor");
+		if(params instanceof String) {
+			NetCDFDataParameters p = new NetCDFDataParametersImpl();
+			URI uriObj;
+            try {
+                uriObj = new URI((String)params);
+            } catch (URISyntaxException e) {
+                throw new OpenException("Can't create URI from "+(String)params, e);
+            }
+			p.setURI(uriObj);
+			super.init(p, null, ToolsLocator.getDynObjectManager()
+					.createDynObject(
+							MetadataLocator.getMetadataManager().getDefinition(
+									DataStore.METADATA_DEFINITION_NAME)));
+			init(p, null);
+		}
+	}
+
+    /**
+     * Opens the dataset.
+     * @param proj Projection
+     * @param fName File name
+     * @throws NotSupportedExtensionException
+     */
+    public NetCDFProvider(URI uri) throws NotSupportedExtensionException, OpenException {
+        super(uri);
+        NetCDFDataParameters p = new NetCDFDataParametersImpl();
+        p.setURI(uri);
+        super.init(
+            p,
+            null,
+            ToolsLocator.getDynObjectManager().createDynObject(
+                MetadataLocator.getMetadataManager().getDefinition(DataStore.METADATA_DEFINITION_NAME)));
+        init(p, null);
+    }
+
+    public NetCDFProvider (NetCDFDataParameters params,
+			DataStoreProviderServices storeServices) throws NotSupportedExtensionException, OpenException {
+		super(params, storeServices, ToolsLocator.getDynObjectManager()
+				.createDynObject(
+						MetadataLocator.getMetadataManager().getDefinition(
+								DataStore.METADATA_DEFINITION_NAME)));
+		init(params, storeServices);
+	}
+
+	/**
+	 * Build file references
+	 * @param proj Projection
+	 * @param param Load parameters
+	 * @throws NotSupportedExtensionException
+	 */
+	public void init (NetCDFDataParameters params,
+			DataStoreProviderServices storeServices) throws NotSupportedExtensionException, OpenException {
+
+		if(((RasterFileStoreParameters)params).getFile().exists()) {
+			String fileName = ((RasterFileStoreParameters)params).getFile().getAbsolutePath();
+            try {
+            	gridNetCDF = GridDataset.open(fileName);
+            	gridList = gridNetCDF.getGrids();
+            	if(gridList.size() == 0)
+            		throw new OpenException("There is not a grid variable", null);
+            	selectedGridDataType = gridList.get(0);
+                //netCDFFile = NetcdfFile.open(((RasterFileStoreParameters)params).getFile().getAbsolutePath());
+            } catch (IOException e) {
+                throw new OpenException("Imposible to read the file", e);
+            }
+
+            /*List<Variable> variableList = netCDFFile.getVariables();
+            Iterator<Variable> it = variableList.iterator();
+            while(it.hasNext()) {
+            	Variable var = it.next();
+            	System.out.println("===>>" + var.getName());
+            }*/
+
+			setParam(storeServices, params);
+			reloadMetadataFromGrid();
+
+			noData = new DefaultNoData(Double.NaN, Double.NaN, fileName);
+			load();
+		} else
+			setParam(storeServices, params);
+
+		super.init();
+		selectSubdataset(getId(0, 0, 0));
+		try {
+			loadFromRmf(getRmfBlocksManager());
+		} catch (ParsingException e) {
+			//No lee desde rmf
+		}
+		open = true;
+	}
+
+	/**
+	 * Reloads metadata using the selected grid
+	 */
+	private void reloadMetadataFromGrid() {
+		//wktProjection = null;
+		//CrsWkt crs = new CrsWkt(wktProjection);
+		//IProjection proj = CRSFactory.getCRS("EPSG:23030");
+
+		/*LatLonRect gcs = selectedGridDataType.getCoordinateSystem().getLatLonBoundingBox();
+		getColorInterpretation();
+		double scaleX = gcs.getWidth() / selectedGridDataType.getXDimension().getLength();
+		double scaleY = gcs.getHeight() / selectedGridDataType.getYDimension().getLength();
+		ownTransformation = new AffineTransform(
+				scaleX, 0,
+				0, -scaleY,
+				gcs.getLonMin(),
+				gcs.getLatMax());*/
+
+		ProjectionRect pRect = selectedGridDataType.getCoordinateSystem().getBoundingBox();
+		double scaleX = pRect.getWidth() / selectedGridDataType.getXDimension().getLength();
+		double scaleY = pRect.getHeight() / selectedGridDataType.getYDimension().getLength();
+		ownTransformation = new AffineTransform(
+				scaleX, 0,
+				0, -scaleY,
+				pRect.getMinX(),
+				pRect.getMaxY());
+		externalTransformation = (AffineTransform)ownTransformation.clone();
+		bandCount = 1; //One variable is always shown
+		setDataType();
+	}
+
+	/**
+	 * @param dataType The dataType to set.
+	 */
+	private void setDataType() {
+		DataType dt = selectedGridDataType.getDataType();
+		int type = Buffer.TYPE_UNDEFINED;
+		if(dt.name() == DataType.BYTE.name()) {
+			type = Buffer.TYPE_BYTE;
+		}
+		if(dt.name() == DataType.SHORT.name()) {
+			type = Buffer.TYPE_SHORT;
+		}
+		if(dt.name() == DataType.INT.name()) {
+			type = Buffer.TYPE_INT;
+		}
+		if(dt.name() == DataType.DOUBLE.name()) {
+			type = Buffer.TYPE_DOUBLE;
+		}
+		if(dt.name() == DataType.FLOAT.name()) {
+			type = Buffer.TYPE_FLOAT;
+		}
+		if(dt.name() == DataType.LONG.name()) {
+			type = Buffer.TYPE_DOUBLE;
+		}
+
+		int[] dtype = new int[getBandCount()];
+		for (int i = 0; i < dtype.length; i++)
+			dtype[i] = type;
+		setDataType(dtype);
+	}
+
+	public RasterProvider load() {
+		return this;
+	}
+
+	public boolean isOpen() {
+		return open;
+	}
+
+	public void close() {
+		try {
+			gridNetCDF.close();
+		} catch (IOException e) {
+			logger.error("Error closing file", e);
+		}
+	}
+
+    public URI translateURI(URI uri) {
+        return uri;
+    }
+
+	/**
+	 * 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);
+	}
+
+	public Extent getView() {
+		return viewRequest;
+	}
+
+	public double getWidth() {
+		return selectedGridDataType.getXDimension().getLength();
+	}
+
+	public double getHeight() {
+		return selectedGridDataType.getYDimension().getLength();
+	}
+
+	public Object readBlock(int pos, int blockHeight, double scale)
+		throws InvalidSetViewException, FileNotOpenException, RasterDriverException, ProcessInterruptedException {
+		NetCDFDataParameters p = (NetCDFDataParameters)param;
+		if(pos < 0)
+			throw new InvalidSetViewException("Request out of grid");
+
+		if((pos + blockHeight) > getHeight())
+			blockHeight = Math.abs(((int)getHeight()) - pos);
+
+		Buffer buf = DefaultRasterManager.getInstance().createBuffer(getDataType()[0], (int)getWidth(), blockHeight, 1, true);
+		try {
+			int time = p.getFieldTime();
+			int level = getLevelValue();
+			Range rangeY = new Range(pos, pos + blockHeight - 1, 1);
+			Range rangeX = new Range(0, (int)(getWidth() - 1), 1);
+			GridDatatype dt = selectedGridDataType.makeSubset(null, null, null, null /*getTime(1), getLevel(1)*/, rangeY, rangeX);
+			Array values = dt.readDataSlice(time, level, -1, -1);
+			return arrayValuesToBuffer(values, buf, rangeX.length(), rangeY.length(), null);
+		} catch (IOException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		} catch (InvalidRangeException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		}
+	}
+
+	public Object getData(int x, int y, int band)throws InvalidSetViewException, FileNotOpenException, RasterDriverException {
+		NetCDFDataParameters p = (NetCDFDataParameters)param;
+		if(x < 0 || y < 0 || x >= getWidth() || y >= getHeight())
+			throw new InvalidSetViewException("Request out of grid");
+		try {
+			int strideX = 1;
+			int strideY = 1;
+			Range rangeY = new Range((int)(getHeight() - y), (int)(getHeight() - y), strideY);
+			Range rangeX = new Range(x, x, strideX);
+
+			selectSubdataset();
+			int time = p.getFieldTime();
+			int level = getLevelValue();
+			GridDatatype dt = selectedGridDataType.makeSubset(null, null, null, null, rangeY, rangeX);
+			Array values = dt.readDataSlice(time, level, -1, -1);
+			Object data = null;
+
+			if(getDataType()[0] == Buffer.TYPE_BYTE) {
+				data = new java.lang.Integer(values.getByte(0));
+			}
+
+			if(getDataType()[0] == Buffer.TYPE_SHORT) {
+				data = new java.lang.Integer(values.getShort(0));
+			}
+
+			if(getDataType()[0] == Buffer.TYPE_INT) {
+				data = new java.lang.Integer(values.getInt(0));
+			}
+
+			if(getDataType()[0] == Buffer.TYPE_FLOAT) {
+				data = new java.lang.Float(values.getFloat(0));
+			}
+			if(getDataType()[0] == Buffer.TYPE_DOUBLE) {
+				data = new java.lang.Double(values.getDouble(0));
+			}
+			return data;
+		} catch (IOException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		} catch (InvalidRangeException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		}
+	}
+
+	@Override
+	public void loadBuffer(SpiRasterQuery query)
+			throws ProcessInterruptedException, RasterDriverException {
+		NetCDFDataParameters p = (NetCDFDataParameters)param;
+		setView(query.getAdjustedRequestBoundingBox());
+
+		Point2D ul = new Point2D.Double(viewRequest.getULX(), viewRequest.getULY());
+		Point2D lr = new Point2D.Double(viewRequest.getLRX(), viewRequest.getLRY());
+		ul = worldToRaster(ul);
+		lr = worldToRaster(lr);
+		ul.setLocation(ul.getX() < 0 ? 0 : ul.getX(), ul.getY() < 0 ? 0 : ul.getY());
+		lr.setLocation(lr.getX() < 0 ? 0 : lr.getX(), lr.getY() < 0 ? 0 : lr.getY());
+		ul.setLocation(ul.getX() >= getWidth() ? getWidth() - 1 : ul.getX(), ul.getY() >= getHeight() ? getHeight() - 1 : ul.getY());
+		lr.setLocation(lr.getX() >= getWidth() ? getWidth() - 1 : lr.getX(), lr.getY() >= getHeight() ? getHeight() - 1 : lr.getY());
+
+		adjustPoints(ul, lr);
+
+		//int width = Math.abs(((int)lr.getX()) - ((int)ul.getX()));
+		//int height = Math.abs(((int)lr.getY()) - ((int)ul.getY()));
+		try {
+			int strideX = 1;
+			int strideY = 1;
+			Range rangeY = new Range((int)(getHeight() - lr.getY()), (int)(getHeight() - ul.getY() - 1), strideY <= 0 ? 1 : strideY);
+			Range rangeX = new Range((int)ul.getX(), (int)(lr.getX() - 1), strideX <= 0 ? 1 : strideX);
+
+			selectSubdataset();
+			int time = p.getFieldTime();
+			int level = getLevelValue();
+			GridDatatype dt = selectedGridDataType.makeSubset(null, null, null, null /*getTime(strideX), getLevel(strideX)*/, rangeY, rangeX);
+			Array values = dt.readDataSlice(time, level, -1, -1);
+			Rectangle2D r = query.getBufferForProviders().getDataExtent();
+			Buffer rasterBuf = arrayValuesToBuffer(
+					values,
+					query.getBufferForProviders(),
+					rangeX.length(),
+					rangeY.length(),
+					query.getBandList());
+			rasterBuf.setDataExtent(r);
+			query.setBufferResult(rasterBuf);
+		} catch (IOException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		} catch (InvalidRangeException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		}
+
+	}
+
+
+	/*public Buffer getWindow(Extent extent, BandList bandList, Buffer rasterBuf, TaskStatus status)
+		throws ProcessInterruptedException, RasterDriverException {
+		NetCDFDataParameters p = (NetCDFDataParameters)param;
+		setView(extent);
+
+		Point2D ul = new Point2D.Double(viewRequest.getULX(), viewRequest.getULY());
+		Point2D lr = new Point2D.Double(viewRequest.getLRX(), viewRequest.getLRY());
+		ul = worldToRaster(ul);
+		lr = worldToRaster(lr);
+		ul.setLocation(ul.getX() < 0 ? 0 : ul.getX(), ul.getY() < 0 ? 0 : ul.getY());
+		lr.setLocation(lr.getX() < 0 ? 0 : lr.getX(), lr.getY() < 0 ? 0 : lr.getY());
+		ul.setLocation(ul.getX() > getWidth() ? getWidth() : ul.getX(), ul.getY() > getHeight() ? getHeight() : ul.getY());
+		lr.setLocation(lr.getX() > getWidth() ? getWidth() : lr.getX(), lr.getY() > getHeight() ? getHeight() : lr.getY());
+
+		adjustPoints(ul, lr);
+
+		try {
+			int strideX = 1;
+			int strideY = 1;
+			Range rangeY = new Range((int)(getHeight() - lr.getY()), (int)(getHeight() - ul.getY() - 1), strideY);
+			Range rangeX = new Range((int)ul.getX(), (int)(lr.getX() - 1), strideX);
+
+			selectSubdataset();
+			int time = p.getFieldTime();
+			int level = getLevelValue();
+			GridDatatype dt = selectedGridDataType.makeSubset(null, null, null, null , rangeY, rangeX);
+			Array values = dt.readDataSlice(time, level, -1, -1);
+			rasterBuf = arrayValuesToBuffer(values, rasterBuf, rangeX.length(), rangeY.length(), bandList);
+		} catch (IOException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		} catch (InvalidRangeException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		}
+
+		return rasterBuf;
+	}*/
+
+	/*public Buffer getWindow(Extent extent, int bufWidth, int bufHeight,
+			BandList bandList, Buffer rasterBuf, boolean adjustToExtent, TaskStatus status) throws ProcessInterruptedException, RasterDriverException {
+		NetCDFDataParameters p = (NetCDFDataParameters)param;
+		setView(extent);
+
+		Point2D ul = new Point2D.Double(viewRequest.getULX(), viewRequest.getULY());
+		Point2D lr = new Point2D.Double(viewRequest.getLRX(), viewRequest.getLRY());
+		ul = worldToRaster(ul);
+		lr = worldToRaster(lr);
+		ul.setLocation(ul.getX() < 0 ? 0 : ul.getX(), ul.getY() < 0 ? 0 : ul.getY());
+		lr.setLocation(lr.getX() < 0 ? 0 : lr.getX(), lr.getY() < 0 ? 0 : lr.getY());
+		ul.setLocation(ul.getX() >= getWidth() ? getWidth() - 1 : ul.getX(), ul.getY() >= getHeight() ? getHeight() - 1 : ul.getY());
+		lr.setLocation(lr.getX() >= getWidth() ? getWidth() - 1 : lr.getX(), lr.getY() >= getHeight() ? getHeight() - 1 : lr.getY());
+
+		adjustPoints(ul, lr);
+
+		int width = Math.abs(((int)lr.getX()) - ((int)ul.getX()));
+		int height = Math.abs(((int)lr.getY()) - ((int)ul.getY()));
+
+		try {
+			int strideX = width / rasterBuf.getWidth();
+			int strideY = height / rasterBuf.getHeight();
+			Range rangeY = new Range((int)(getHeight() - lr.getY()), (int)(getHeight() - ul.getY() - 1), strideY <= 0 ? 1 : strideY);
+			Range rangeX = new Range((int)ul.getX(), (int)(lr.getX() - 1), strideX <= 0 ? 1 : strideX);
+
+			selectSubdataset();
+			int time = p.getFieldTime();
+			int level = getLevelValue();
+			GridDatatype dt = selectedGridDataType.makeSubset(null, null, null, null , rangeY, rangeX);
+			Array values = dt.readDataSlice(time, level, -1, -1);
+			rasterBuf = arrayValuesToBuffer(values, rasterBuf, rangeX.length(), rangeY.length(), bandList);
+		} catch (IOException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		} catch (InvalidRangeException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		}
+
+		return rasterBuf;
+	}*/
+
+	/*public Buffer getWindow(int x, int y, int w, int h,
+			BandList bandList, Buffer rasterBuf, TaskStatus status) throws ProcessInterruptedException, RasterDriverException {
+		try {
+			NetCDFDataParameters p = (NetCDFDataParameters)param;
+			int strideX = 1;
+			int strideY = 1;
+			Range rangeY = new Range((int)(h - y), (int)(h - y - 1), strideY);
+			Range rangeX = new Range((int)x, (int)(x + w - 1), strideX);
+
+			selectSubdataset();
+			int time = p.getFieldTime();
+			int level = getLevelValue();
+			GridDatatype dt = selectedGridDataType.makeSubset(null, null, null, null, rangeY, rangeX);
+			Array values = dt.readDataSlice(time, level, -1, -1);
+			rasterBuf = arrayValuesToBuffer(values, rasterBuf, rangeX.length(), rangeY.length(), bandList);
+		} catch (IOException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		} catch (InvalidRangeException e) {
+			throw new RasterDriverException("Error reading a slice", e);
+		}
+
+		return rasterBuf;
+	}*/
+
+	/**
+	 * Gets the Range of the selected time or null if there is not a selected time
+	 * @param strideX
+	 * @return
+	 * @throws InvalidRangeException
+	 */
+	@SuppressWarnings("unused")
+	private Range getTime(int strideX) throws InvalidRangeException {
+		NetCDFDataParameters p = (NetCDFDataParameters)param;
+		int time = p.getFieldTime();
+		return new Range(time, time, strideX);
+	}
+
+	/*private int getTimeValue() {
+		int time = 0;
+		if(param.hasDynValue(NetCDFDataParameters.FIELD_TIME))
+			time = ((Integer)param.getDynValue(NetCDFDataParameters.FIELD_TIME)).intValue();
+		return time;
+	}*/
+
+	/**
+	 * Gets the Range of the selected level or null if there is not a selected level
+	 * @param strideX
+	 * @return
+	 * @throws InvalidRangeException
+	 */
+	@SuppressWarnings("unused")
+	private Range getLevel(int strideX) throws InvalidRangeException {
+		int level = getLevelValue();
+		return new Range(level, level, strideX);
+	}
+
+	private int getLevelValue() {
+		int level = 0;
+		if(param.hasDynValue(NetCDFDataParameters.FIELD_LEVEL) && param.getDynValue(NetCDFDataParameters.FIELD_LEVEL) != null)
+			level = ((Integer)param.getDynValue(NetCDFDataParameters.FIELD_LEVEL)).intValue();
+		return level;
+	}
+
+
+	/**
+	 * Selects the GridDataType using the selected variable in the parameters
+	 */
+	public void selectSubdataset() {
+		if(param.hasDynValue(NetCDFDataParameters.FIELD_VARIABLE)) {
+			NetCDFDataParameters p = (NetCDFDataParameters)param;
+			String variable = (String)param.getDynValue(NetCDFDataParameters.FIELD_VARIABLE);
+			if(variable != null) {
+				for (int j = 0; j < gridList.size(); j++) {
+					if(gridList.get(j).getName().compareTo(variable) == 0) {
+						selectedGridDataType = gridList.get(j);
+						reloadMetadataFromGrid();
+						super.selectSubdataset(getId(j, getLevelValue(), p.getFieldTime()));
+					}
+				}
+			}
+		}
+	}
+
+	/**
+	 * Gets the identifier of a subdataset
+	 * @param grid
+	 * @param level
+	 * @param time
+	 * @return
+	 */
+	private String getId(int grid, int level, int time) {
+		return grid + "-" + level + "-" +  time;
+	}
+
+	/**
+	 * Loads a Buffer object from an netCDF Array.
+	 * @param values
+	 * @param rasterBuf
+	 * @param w
+	 * @param h
+	 * @return
+	 */
+	private Buffer arrayValuesToBuffer(Array values, Buffer rasterBuf, int w, int h, BandList bandList) {
+		Buffer buf = null;
+		boolean resampling = false;
+
+		if((rasterBuf.getWidth() * rasterBuf.getHeight()) != values.getSize()) {
+			buf = DefaultRasterManager.getInstance().createBuffer(getDataType()[0], w, h, rasterBuf.getBandCount(), true);
+			resampling = true;
+		} else
+			buf = rasterBuf;
+
+		int[] drawableBands = bandList != null ? bandList.getBufferBandToDraw(new File(getURIOfFirstProvider()).getAbsolutePath(), 0) : new int[1];
+		if(drawableBands == null || (drawableBands.length == 1 && drawableBands[0] == -1))
+			return rasterBuf;
+
+		if(getDataType()[0] == Buffer.TYPE_BYTE) {
+			for (int i = 0; i < values.getSize(); i++) {
+				int[] rc = getColAndRow(i, buf);
+				for (int iBands = 0; iBands < drawableBands.length; iBands++)
+					buf.setElem(rc[0], rc[1], drawableBands[iBands], values.getByte(i));
+			}
+		}
+
+		if(getDataType()[0] == Buffer.TYPE_SHORT) {
+			for (int i = 0; i < values.getSize(); i++) {
+				int[] rc = getColAndRow(i, buf);
+				for (int iBands = 0; iBands < drawableBands.length; iBands++)
+					buf.setElem(rc[0], rc[1], drawableBands[iBands], values.getShort(i));
+			}
+		}
+
+		if(getDataType()[0] == Buffer.TYPE_INT) {
+			for (int i = 0; i < values.getSize(); i++) {
+				int[] rc = getColAndRow(i, buf);
+				for (int iBands = 0; iBands < drawableBands.length; iBands++)
+					buf.setElem(rc[0], rc[1], drawableBands[iBands], values.getInt(i));
+			}
+		}
+
+		if(getDataType()[0] == Buffer.TYPE_FLOAT) {
+			for (int i = 0; i < values.getSize(); i++) {
+				int[] rc = getColAndRow(i, buf);
+				for (int iBands = 0; iBands < drawableBands.length; iBands++)
+					buf.setElem(rc[0], rc[1], drawableBands[iBands], values.getFloat(i));
+			}
+		}
+
+		if(getDataType()[0] == Buffer.TYPE_DOUBLE) {
+			for (int i = 0; i < values.getSize(); i++) {
+				int[] rc = getColAndRow(i, buf);
+				for (int iBands = 0; iBands < drawableBands.length; iBands++)
+					buf.setElem(rc[0], rc[1], drawableBands[iBands], values.getDouble(i));
+			}
+		}
+		if(resampling) {
+			try {
+				Buffer result = null;
+				result = buf.getAdjustedWindow(rasterBuf.getWidth(), rasterBuf.getHeight(), Buffer.INTERPOLATION_NearestNeighbour);
+				if(result != buf)
+					buf.dispose();
+				return result;
+			} catch (ProcessInterruptedException e) {
+				return buf;
+			}
+		}
+		return buf;
+	}
+
+	/**
+	 * Calculates the row and column number for the position i in the
+	 * array of data
+	 * @param i
+	 * @param buf
+	 * @return
+	 */
+	private int[] getColAndRow(int i, Buffer buf) {
+		int auxRow = (int)(i / buf.getWidth());
+		return new int[]{
+				(int)buf.getHeight() - auxRow - 1,
+				i - (auxRow * buf.getWidth())
+				};
+	}
+
+	private void adjustPoints(Point2D ul, Point2D lr) {
+		double a = (ul.getX() - (int)ul.getX());
+		double b = (ul.getY() - (int)ul.getY());
+		ul.setLocation(	(a > 0.95 || a < 0.05) ? Math.round(ul.getX()) : ul.getX(),
+						(b > 0.95 || b < 0.05) ? Math.round(ul.getY()) : ul.getY());
+		lr.setLocation(	(a > 0.95 || a < 0.05) ? Math.round(lr.getX()) : lr.getX(),
+						(b > 0.95 || b < 0.05) ? Math.round(lr.getY()) : lr.getY());
+	}
+
+	public int getBlockSize(){
+		return 0;
+	}
+
+	public ColorInterpretation getColorInterpretation() {
+		if(super.getColorInterpretation() == null) {
+			setColorInterpretation(new DataStoreColorInterpretation(new String[]{ColorInterpretation.GRAY_BAND}));
+		}
+		return super.getColorInterpretation();
+	}
+
+	public DataStoreTransparency getTransparency() {
+		if(fileTransparency == null)
+			fileTransparency = new DataStoreTransparency(getColorInterpretation());
+		return fileTransparency;
+	}
+
+	/**
+	 * 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() {
+		return false;
+	}
+
+	public void setAffineTransform(AffineTransform t){
+		super.setAffineTransform(t);
+	}
+
+	public int getOverviewCount(int band) throws BandAccessException, RasterDriverException {
+		if(band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		return 0;
+	}
+
+	public int getOverviewWidth(int band, int overview) throws BandAccessException, RasterDriverException {
+		if (band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		return 0;
+	}
+
+	public int getOverviewHeight(int band, int overview) throws BandAccessException, RasterDriverException {
+		if (band >= getBandCount())
+			throw new BandAccessException("Wrong band");
+		return 0;
+	}
+
+	public boolean isOverviewsSupported() {
+		return true;
+	}
+
+	public boolean isReproyectable() {
+		return true;
+	}
+
+	public String getProviderName() {
+		return NAME;
+	}
+
+	public void setStatus(RasterProvider provider) {
+		if(provider instanceof NetCDFProvider) {
+			//Not implemented yet
+		}
+	}
+
+	public boolean isTimeSupported() {
+		return true;
+	}
+
+	public TileServer getTileServer() {
+		if(tileServer == null) {
+			DefaultRasterStore store = new DefaultRasterStore();
+			store.setProvider(this);
+			tileServer = new FileTileServer(store);
+		}
+		return tileServer;
+	}
+
+    public void addFile(File file) throws InvalidSourceException {
+        // Do nothing
+    }
+
+    public void removeFile(File file) {
+        // Do nothing
+    }
+}
\ No newline at end of file

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFProvider.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFServerExplorerParameters.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFServerExplorerParameters.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFServerExplorerParameters.java	(revision 20991)
@@ -0,0 +1,113 @@
+/* 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.netcdf.io;
+
+import org.gvsig.fmap.dal.DataServerExplorerParameters;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynField;
+import org.gvsig.tools.dynobject.DynObjectManager;
+
+
+/**
+ * Parameters for the NetCDF explorer
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFServerExplorerParameters extends FilesystemServerExplorerParameters
+implements DataServerExplorerParameters {
+	public static final String            PARAMS_NAME         = "NetCDFRasterServerExplorerParameters";
+	protected static DynClass             DYNCLASS            = null;
+	private static final String           FIELD_ROOT          = "root";
+	private static DelegatedDynObject     delegatedDynObject  = null;
+
+	public NetCDFServerExplorerParameters() {
+		super();
+		initialize();
+	}
+
+	protected void initialize() {
+		delegatedDynObject = (DelegatedDynObject) ToolsLocator
+				.getDynObjectManager().createDynObject(
+						DYNCLASS);
+	}
+	
+	public static DynClass registerDynClass() {
+		DynObjectManager dynman = ToolsLocator.getDynObjectManager();
+		DynClass dynClass = dynman.get(PARAMS_NAME);
+		DynField field;
+		if (dynClass == null) {
+			dynClass = dynman.add(PARAMS_NAME);
+			
+			field = dynClass.addDynFieldString(FIELD_ROOT);
+            field.setDescription("Root directory path of the explorer");
+            field.setMandatory(false);
+            field.setClassOfValue(String.class); 
+
+			field = dynClass.addDynFieldString("initialpath");
+            field.setDescription("Initial path of the explorer");
+            field.setMandatory(false);
+            field.setClassOfValue(String.class);
+            DYNCLASS = dynClass;
+		}
+		return dynClass;
+	}
+
+	public void setRoot(String path) {
+		this.setDynValue(FIELD_ROOT, path);
+	}
+
+	public String getRoot() {
+		return (String) this.getDynValue(FIELD_ROOT);
+	}
+
+	public void setInitialpath(String path) {
+		this.setDynValue("initialpath", path);
+	}
+
+	public String getInitialpath() {
+		return (String) this.getDynValue("initialpath");
+	}
+
+	public String getExplorerName() {
+		return NetCDFFilesystemServerExplorer.NAME;
+	}
+
+	public String getDataStoreName() {
+		return NetCDFProvider.NAME;
+	}
+	
+	public String getDescription() {
+		return NetCDFProvider.DESCRIPTION;
+	}
+
+	protected DelegatedDynObject getDelegatedDynObject() {
+		return delegatedDynObject;
+	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFServerExplorerParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFFilesystemServerExplorer.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFFilesystemServerExplorer.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFFilesystemServerExplorer.java	(revision 20991)
@@ -0,0 +1,149 @@
+/* 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.netcdf.io;
+
+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.RemoveException;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderServices;
+import org.gvsig.fmap.dal.spi.DataServerExplorerProviderServices;
+
+public class NetCDFFilesystemServerExplorer extends AbstractFilesystemServerExplorerProvider implements FilesystemServerExplorerProvider {
+	public static final String NAME       = NetCDFProvider.NAME;
+	
+	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 NetCDFProvider.NAME;
+	}
+
+	public boolean accept(File pathname) {
+		return RasterLocator.getManager().getProviderServices().isExtensionSupported(
+				pathname.getAbsolutePath(), 
+				NetCDFProvider.class);
+	}
+
+	public String getDescription() {
+		return NetCDFProvider.DESCRIPTION;
+	}
+
+	public DataStoreParameters getParameters(File file) throws DataException {
+		DataManager manager = DALLocator.getDataManager();
+		NetCDFDataParameters params = (NetCDFDataParameters) manager
+				.createStoreParameters(this.getDataStoreProviderName());
+		params.setFile(file);
+		return params;
+	}
+	
+	public int getMode() {
+		return DataServerExplorer.MODE_RASTER;
+	}
+
+	public DataServerExplorerProviderServices getServerExplorerProviderServices() {
+		return null;
+	}
+
+	public boolean add(String provider, NewDataStoreParameters parameters,
+			boolean overwrite) throws DataException {
+		// TODO Auto-generated method stub
+		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 List<?> getDataStoreProviderNames() {
+		return null;
+	}
+
+	public DataServerExplorerParameters getParameters() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getProviderName() {
+		return NetCDFProvider.NAME;
+	}
+
+	public List<?> list() throws DataException {
+		return null;
+	}
+
+	public List<?> list(int mode) throws DataException {
+		return null;
+	}
+
+	public void dispose() {
+		
+	}
+
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFFilesystemServerExplorer.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFWriter.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFWriter.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFWriter.java	(revision 20991)
@@ -0,0 +1,372 @@
+/* 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.netcdf.io;
+
+
+
+/**
+ * Writer for netCDF format
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public class NetCDFWriter /*extends DefaultRasterWriter*/ {
+
+//	public static void register() {
+//		DefaultProviderServices pInfo = (DefaultProviderServices)RasterLocator.getManager().getProviderServices();
+//		ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
+//		ExtensionPoint point = extensionPoints.get("RasterWriter");
+//
+//		point.append("nc", "", NetCDFWriter.class);
+//		WriteFileFormatFeatures features = new WriteFileFormatFeatures("NetCDF", "nc", new int[] { -1 }, new int[] { 0, 1, 2, 3, 4, 5 }, NetCDFWriter.class);
+//		pInfo.getFileFeature().put("nc", features);
+//	}
+//	
+//	private boolean							write             = true; //Cuando est� a true se puede escribir en la imagen de salida. Si est� a false el proceso es interrumpido
+//	private int 							dataType          = RasterBuffer.TYPE_UNDEFINED;
+//	private NetcdfFileWriteable             ncfile            = null; 
+//	private String                          bandPrefix        = "band_";
+//	/**
+//	 * Loads the driver parameters.
+//	 */
+//	public void loadParams(String ident) {
+//		WriteFileFormatFeatures wfff = (WriteFileFormatFeatures)pInfo.getFileFeature().get(ident);
+//		wfff.loadParams();
+//		driverParams = (ParamsImpl)wfff.getParams();
+//	}
+//
+//	/**
+//	 * Constructor para la obtenci�n de par�metros del driver
+//	 * @param fileName
+//	 */
+//	public NetCDFWriter(String fileName) {
+//		ident = fileUtil.getExtensionFromFileName(fileName);
+//		driver = ((WriteFileFormatFeatures)pInfo.getFileFeature().get(ident)).getDriverName();
+//
+//		loadParams(ident);
+//	}
+//
+//	/**
+//	 * NetCDFWriter constructor
+//	 * @param dataWriter       	Objeto servidor de datos para el driver de escritura
+//	 * @param outFilename      	Fichero de salida
+//	 * @param blockSize        	Tama�o de bloque
+//	 * @param Extent           	extent
+//	 * @param compresion	   	Compresi�n si la tiene
+//	 * @param outSizeX		  	Tama�o de salida en X
+//	 * @param outSizeY			Tama�o de salida en Y
+//	 * @param dataType			Tipo de dato
+//	 * @throws GdalException
+//	 * @throws IOException
+//	 */
+//	public NetCDFWriter (DataServerWriter dataWriter,
+//			String outFileName,
+//			Integer nBands,
+//			AffineTransform at,
+//			Integer outSizeX,
+//			Integer outSizeY,
+//			Integer dataType,
+//			Params params,
+//			IProjection proj) throws GdalException, IOException {
+//		this(dataWriter, outFileName, nBands, at, outSizeX, outSizeY, dataType, params, proj, new Boolean(true));
+//	}
+//
+//	/**
+//	 * NetCDFWriter constructor
+//	 * @param dataWriter       	Objeto servidor de datos para el driver de escritura
+//	 * @param outFilename      	Fichero de salida
+//	 * @param blockSize        	Tama�o de bloque
+//	 * @param Extent           	extent
+//	 * @param compresion	   	Compresi�n si la tiene
+//	 * @param outSizeX		  	Tama�o de salida en X
+//	 * @param outSizeY			Tama�o de salida en Y
+//	 * @param dataType			Tipo de dato
+//	 * @param geo				Flag que dice si se salva con georreferenciaci�n o sin ella
+//	 * @throws GdalException
+//	 * @throws IOException
+//	 */
+//	public NetCDFWriter (DataServerWriter dataWriter,
+//			String outFileName,
+//			Integer nBands,
+//			AffineTransform at,
+//			Integer outSizeX,
+//			Integer outSizeY,
+//			Integer dataType,
+//			Params params,
+//			IProjection proj,
+//			Boolean geo)throws GdalException, IOException {
+//
+//		this.proj = proj;
+//		ident = outFileName.toLowerCase().substring(outFileName.lastIndexOf(".") + 1);
+//		driver = ((WriteFileFormatFeatures)pInfo.getFileFeature().get(ident)).getDriverName();
+//		this.dataType = dataType.intValue();
+//		this.at = at;
+//		percent = 0;
+//
+//		this.dataWriter = dataWriter;
+//		this.outFileName = outFileName;
+//
+//		this.sizeWindowX = outSizeX.intValue();
+//		this.sizeWindowY = outSizeY.intValue();
+//
+//		if ((sizeWindowX < 0) || (sizeWindowY < 0))
+//			throw new IOException("Tama�o del fichero de salida erroneo.");
+//
+//		this.nBands = nBands.intValue();
+//
+//		//Calculamos la georeferenciaci�n a partir del extend pasado por el cliente.
+//
+//		/*LatLonPoint p1 = new LatLonPointImpl(at.getTranslateY(), at.getTranslateX());
+//		Point2D p = rasterToWorld(new Point2D.Double(outSizeX, outSizeY), at); 
+//		LatLonPoint p2 = new LatLonPointImpl(at.getTranslateY() - p.getY() , at.getTranslateX() + p.getX());
+//		boundingBox = new LatLonRect(p1, p2);*/
+//		
+//		ncfile = NetcdfFileWriteable.createNew(outFileName, false);
+//		
+//		/*Dimension latDim = ncfile.addDimension("La1", 1);
+//		Dimension lonDim = ncfile.addDimension("Lo1", 1);*/
+//		
+//		Dimension latDim = ncfile.addDimension("y_dim", sizeWindowY);
+//		Dimension lonDim = ncfile.addDimension("x_dim", sizeWindowX);
+//		
+//		ArrayList<Dimension> dims = new ArrayList<Dimension>();
+//		dims.add(latDim);
+//		dims.add(lonDim);
+//		
+//		for (int i = 0; i < nBands; i++) {
+//			switch(dataType) {
+//			case RasterBuffer.TYPE_BYTE:
+//				ncfile.addVariable(bandPrefix + i, ucar.ma2.DataType.CHAR, dims);
+//				break;
+//			case RasterBuffer.TYPE_SHORT:
+//				ncfile.addVariable(bandPrefix + i, ucar.ma2.DataType.SHORT, dims);
+//				break;
+//			case RasterBuffer.TYPE_INT:
+//				ncfile.addVariable(bandPrefix + i, ucar.ma2.DataType.INT, dims);
+//				break;
+//			case RasterBuffer.TYPE_FLOAT:
+//				ncfile.addVariable(bandPrefix + i, ucar.ma2.DataType.FLOAT, dims);
+//				break;
+//			case RasterBuffer.TYPE_DOUBLE:
+//				ncfile.addVariable(bandPrefix + i, ucar.ma2.DataType.DOUBLE, dims);
+//				break;
+//			}
+//		}
+//		
+//		/*String outRmf = outFileName.substring(0, outFileName.lastIndexOf("."));
+//		if(geo.booleanValue())
+//			rasterUtil.saveGeoInfo(outRmf, at, new Point2D.Double(sizeWindowX, sizeWindowY));*/
+//
+//		if(params == null)
+//			loadParams(ident);
+//		else
+//			if(params instanceof ParamsImpl)
+//				this.driverParams = (ParamsImpl)params;
+//	}
+//	
+//	/**
+//	 * 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, AffineTransform at) {
+//		Point2D p = new Point2D.Double();
+//		at.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, AffineTransform at) {
+//		Point2D p = new Point2D.Double();
+//		try {
+//			at.inverseTransform(pt, p);
+//		} catch (NoninvertibleTransformException e) {
+//			return pt;
+//		}
+//		return p;
+//	}
+//	
+//	public void setDates(String[] dates) {
+//		for (int i = 0; i < dates.length; i++) {
+//			
+//		}
+//	}
+//
+//	/**
+//	 * A�ade la proyecci�n Wkt con la que salvar.
+//	 * @param wkt
+//	 * @throws GdalException
+//	 */
+//	public void setWkt(String wkt) {
+//		
+//	}
+//
+//	/**
+//	 * Asigna el tipo de driver con el que se salvar� la imagen
+//	 * @param drvType        Tipo de driver
+//	 */
+//	public void setDriverType(String drvType) {
+//		this.driver = drvType;
+//	}
+//
+//	
+//	/**
+//	 * Realiza la funci�n de compresi�n a partir de un GeoRasterFile.
+//	 * @throws IOException
+//	 */
+//	public void fileWrite() throws IOException, ProcessInterruptedException {
+//	}
+//
+//	/**
+//	 * Realiza una copia en el formato especificado.
+//	 * @throws IOException
+//	 */
+//	public static void createCopy(GdalDriver driverDst, String dst, String src,
+//			boolean bstrict, String[] params) throws IOException, GdalException {
+//		if (dst == null || src == null)
+//			throw new IOException("No se ha asignado un fichero de entrada.");
+//
+//		
+//	}
+//
+//	/**
+//	 * Realiza la escritura de datos con los datos que le pasa el cliente.
+//	 * @throws IOException
+//	 * @throws RmfSerializerException
+//	 */
+//	public void dataWrite() throws IOException, ProcessInterruptedException,
+//	OutOfMemoryError {
+//		if (ncfile == null)
+//			throw new IOException("No se ha obtenido un objeto de entrada para la escritura valido.");
+//
+//		ncfile.create();
+//		int[] origin = new int[2];
+//		try {
+//			for (int iBand = 0; iBand < nBands; iBand++) {
+//				switch(dataType) {
+//				case RasterBuffer.TYPE_BYTE:
+//					ArrayByte b = new ArrayByte.D2(sizeWindowY, sizeWindowX);
+//					dataWriter.setBand(iBand);
+//					byte[][] valueb = dataWriter.readByteData(sizeWindowX, sizeWindowY);
+//					for (int i = 0; i < b.getSize(); i++) {
+//						b.setByte(i, valueb[0][i]);
+//					}
+//					ncfile.write(bandPrefix + iBand, origin, b);
+//					break;
+//				case RasterBuffer.TYPE_SHORT:
+//					ArrayShort s = new ArrayShort.D2(sizeWindowY, sizeWindowX);
+//					dataWriter.setBand(iBand);
+//					short[][] values = dataWriter.readShortData(sizeWindowX, sizeWindowY);
+//					for (int i = 0; i < s.getSize(); i++) {
+//						s.setDouble(i, values[0][i]);
+//					}
+//					ncfile.write(bandPrefix + iBand, origin, s);
+//					break;
+//				case RasterBuffer.TYPE_INT:
+//					ArrayInt in = new ArrayInt.D2(sizeWindowY, sizeWindowX);
+//					dataWriter.setBand(iBand);
+//					int[][] valuei = dataWriter.readIntData(sizeWindowX, sizeWindowY);
+//					for (int i = 0; i < in.getSize(); i++) {
+//						in.setDouble(i, valuei[0][i]);
+//					}
+//					ncfile.write(bandPrefix + iBand, origin, in);
+//					break;
+//				case RasterBuffer.TYPE_FLOAT:
+//					ArrayFloat f = new ArrayFloat.D2(sizeWindowY, sizeWindowX);
+//					dataWriter.setBand(iBand);
+//					float[][] valuef = dataWriter.readFloatData(sizeWindowX, sizeWindowY);
+//					for (int i = 0; i < f.getSize(); i++) {
+//						f.setFloat(i, valuef[0][i]);
+//					}
+//					ncfile.write(bandPrefix + iBand, origin, f);
+//					break;
+//				case RasterBuffer.TYPE_DOUBLE:
+//					ArrayDouble d = new ArrayDouble.D2(sizeWindowY, sizeWindowX);
+//					dataWriter.setBand(iBand);
+//					double[][] valued = dataWriter.readDoubleData(sizeWindowX, sizeWindowY);
+//					for (int i = 0; i < d.getSize(); i++) {
+//						d.setDouble(i, valued[0][i]);
+//					}
+//					ncfile.write(bandPrefix + iBand, origin, d);
+//					break;
+//				}
+//			}
+//		} catch (InvalidRangeException e) {
+//			new IOException(e.getMessage());
+//		}
+//	}
+//
+//
+//	/**
+//	 * Cancela el salvado de datos.
+//	 * @throws GdalException
+//	 */
+//	public void writeClose() {
+//		try {
+//			ncfile.close();
+//		} catch (IOException e) {
+//			e.printStackTrace();
+//		}
+//	}
+//
+//	/**
+//	 * Cancela el salvado de datos.
+//	 */
+//	public void writeCancel() {
+//		write = false;
+//	}
+//
+//	/**
+//	 * Obtiene el valor a la variable write que estar� a true cuando se est� escribiendo
+//	 *  o puede escribirse la imagen de salida. El cancelar la operaci�n de escritura
+//	 * pondr� esta variable a false deteniendose la escritura y cerrandose el dataset
+//	 * de salida.
+//	 * @return True si puede escribirse y false si no puede
+//	 */
+//	public boolean isWrite() {
+//		return write;
+//	}
+//
+//	/**
+//	 * Asigna el valor a la variable write que estar� a true cuando se est� escribiendo
+//	 *  o puede escribirse la imagen de salida. El cancelar la operaci�n de escritura
+//	 * pondr� esta variable a false deteniendose la escritura y cerrandose el dataset
+//	 * de salida.
+//	 * @param write Variable booleana. True si puede escribirse y false si no puede
+//	 */
+//	public void setWrite(boolean write) {
+//		this.write = write;
+//	}
+//
+//	/**
+//	 * Asigna los par�metros del driver modificados por el cliente.
+//	 * @param Params
+//	 */
+//	public void setParams(Params params) {
+//		if(params instanceof ParamsImpl)
+//			this.driverParams = (ParamsImpl)params;
+//		else 
+//			return;
+//	}
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFWriter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParameters.java
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParameters.java	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParameters.java	(revision 20991)
@@ -0,0 +1,119 @@
+/* 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.netcdf.io;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+
+import org.gvsig.fmap.dal.coverage.store.parameter.MultiDimensionalStoreParameters;
+
+import ucar.nc2.Variable;
+
+/**
+ * Parameters for the NetCDF provider
+ * @author Nacho Brodin (nachobrodin@gmail.com)
+ */
+public interface NetCDFDataParameters extends MultiDimensionalStoreParameters {
+	public static final String            FIELD_VARIABLE             = "GridVariable";
+	public static final String            FIELD_TIME                 = "Time";
+	public static final String            FIELD_LEVEL                = "Level";
+	public static final String            FIELD_XDIM                 = "XDim";
+	public static final String            FIELD_YDIM                 = "YDim";
+	
+	/**
+	 * Gets the list of grids
+	 * @return A list of pair of values. The first element of one pair is the variable's name 
+	 * and the second its description
+	 * @throws IOException 
+	 */
+	public ArrayList<Variable> getVariables() throws IOException;
+	
+	/**
+	 * Gets the list of grids
+	 * @return A list of pair of values. The first element of one pair is the variable's name 
+	 * and the second its description
+	 * @throws IOException 
+	 */
+	public ArrayList<String[]> getGridVariables() throws IOException;
+	
+	/**
+	 * Gets the list of dates
+	 * @param var
+	 * @return
+	 */
+	public Date[] getTimeList(String var);
+
+	/**
+	 * Gets the number of levels of one variable
+	 * @param var
+	 * @return
+	 */
+	public double[] getLevelList(String var);
+	
+	/**
+	 * Gets the variable's name of the X dimension
+	 * @return
+	 */
+	public String getXDimVariable();
+	
+	/**
+	 * Gets the variable's name of the Y dimension
+	 * @return
+	 */
+	public String getYDimVariable();
+	
+	public void selectNextInstant();
+	
+	public void selectPrevInstant();
+	
+	public void goTo(int position);
+	
+	public int getFieldTime();
+	
+	/**
+	 * Gets the level selected in the list of levels of the selected variable
+	 * @return
+	 */
+	public int getFieldLevel();
+	
+	public String getStringVariable();
+	
+	public String getStringLevel();
+	
+	public String getStringTime();
+	
+	public void setFieldVariable(String variable);
+	
+	public void setFieldTime(int timePosInList);
+	
+	public void setFieldLevel(int levelPosInList);
+
+	public void setFile(File file);
+}

Property changes on: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/java/org/gvsig/raster/netcdf/io/NetCDFDataParameters.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 20991)
@@ -0,0 +1 @@
+org.gvsig.raster.netcdf.io.DefaultNetCDFIOLibrary
Index: org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/pom.xml
===================================================================
--- org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/pom.xml	(revision 0)
+++ org.gvsig.raster.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/pom.xml	(revision 20991)
@@ -0,0 +1,109 @@
+<?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.netcdf.io</artifactId>
+	<packaging>jar</packaging>
+	<name>org.gvsig.raster.netcdf.io</name>
+	<parent>
+		<groupId>org.gvsig</groupId>
+		<artifactId>org.gvsig.raster.netcdf</artifactId>
+		<version>2.2.223</version>
+	</parent>
+	<dependencies>
+		<dependency>
+			<groupId>essi-unidata</groupId>
+			<artifactId>netcdf-java</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.raster.cache.lib.api</artifactId>
+            <scope>compile</scope>
+		</dependency>
+		<!--<dependency>
+			<groupId>org.gvsig</groupId>
+			<artifactId>org.gvsig.jproj</artifactId>
+			<classifier>${native_classifier}</classifier>
+			<type>tar.gz</type>
+            <scope>runtime</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.netcdf/tags/org.gvsig.raster.netcdf-2.2.223/org.gvsig.raster.netcdf.io/pom.xml
___________________________________________________________________
Added: svn:mime-type
   + text/plain


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

.classpath

.settings

.project



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


