From 330dcc45bd6dff4f0648a7cfa80ba2068640d42b Mon Sep 17 00:00:00 2001 From: Gianpaolo Coro Date: Tue, 30 Apr 2013 10:01:41 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@74230 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../geo/test/TestIntersectionNetCDF.java | 17 ++++++++++++ .../geo/test/TestNetCDFMetadataInsert.java | 26 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/main/java/org/gcube/dataanalysis/geo/test/TestIntersectionNetCDF.java create mode 100644 src/main/java/org/gcube/dataanalysis/geo/test/TestNetCDFMetadataInsert.java diff --git a/src/main/java/org/gcube/dataanalysis/geo/test/TestIntersectionNetCDF.java b/src/main/java/org/gcube/dataanalysis/geo/test/TestIntersectionNetCDF.java new file mode 100644 index 0000000..f52a8cb --- /dev/null +++ b/src/main/java/org/gcube/dataanalysis/geo/test/TestIntersectionNetCDF.java @@ -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)); + } + +} diff --git a/src/main/java/org/gcube/dataanalysis/geo/test/TestNetCDFMetadataInsert.java b/src/main/java/org/gcube/dataanalysis/geo/test/TestNetCDFMetadataInsert.java new file mode 100644 index 0000000..562a6fb --- /dev/null +++ b/src/main/java/org/gcube/dataanalysis/geo/test/TestNetCDFMetadataInsert.java @@ -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(); + } +}