Gianpaolo Coro 2013-04-30 10:01:41 +00:00
parent 64e69dc433
commit 330dcc45bd
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package org.gcube.dataanalysis.geo.test;
import org.gcube.contentmanagement.lexicalmatcher.utils.AnalysisLogger;
import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration;
import org.gcube.dataanalysis.geo.retrieval.GeoIntersector;
public class TestIntersectionNetCDF {
public static void main(String args[] ) throws Exception{
AnalysisLogger.setLogger("./cfg/"+AlgorithmConfiguration.defaultLoggerFile);
GeoIntersector inters = new GeoIntersector("/gcube/devsec");
System.out.println(inters.getFeaturesInTime("temperature (04091217ruc.nc)", 0.1, 0.1));
}
}

View File

@ -0,0 +1,26 @@
package org.gcube.dataanalysis.geo.test;
import org.gcube.dataanalysis.geo.meta.NetCDFMetadata;
public class TestNetCDFMetadataInsert {
public static void main(String[] args) throws Exception{
NetCDFMetadata metadataInserter = new NetCDFMetadata();
metadataInserter.setGeonetworkUrl("http://geoserver-dev.d4science-ii.research-infrastructures.eu/geonetwork/");
metadataInserter.setGeonetworkUser("admin");
metadataInserter.setGeonetworkPwd("admin");
metadataInserter.setThreddsCatalogUrl("http://thredds.research-infrastructures.eu:8080/thredds/catalog/public/netcdf/catalog.xml");
metadataInserter.setLayerUrl("http://thredds.research-infrastructures.eu:8080/thredds/dodsC/public/netcdf/04091217_ruc.nc");
metadataInserter.setTitle("temperature (04091217ruc.nc)");
metadataInserter.setLayerName("T");
metadataInserter.setSourceFileName("04091217_ruc.nc");
metadataInserter.setAbstractField("T: temperature (degK) from 04091217ruc.nc resident on a THREDDS instance");
metadataInserter.setResolution(0.5);
metadataInserter.setXLeftLow(-180);
metadataInserter.setYLeftLow(-85.5);
metadataInserter.setXRightUpper(180);
metadataInserter.setYRightUpper(85.5);
metadataInserter.insertMetaData();
}
}