264 lines
14 KiB
Java
264 lines
14 KiB
Java
package org.gcube.dataanalysis.geo.batch;
|
|
|
|
import org.gcube.dataanalysis.geo.meta.GenericLayerMetadata;
|
|
import org.opengis.metadata.identification.TopicCategory;
|
|
|
|
public class GeothermalDataMetadataInsertDev {
|
|
|
|
static String geonetworkurl = "http://geonetwork.geothermaldata.d4science.org/geonetwork";
|
|
static String geoserverurl = "http://geoserver-dev.d4science-ii.research-infrastructures.eu/geoserver";
|
|
/*
|
|
static String geonetworkurl = "http://geonetwork.d4science.org/geonetwork/";
|
|
static String geoserverurl = "http://geoserver.d4science-ii.research-infrastructures.eu/geoserver";
|
|
*/
|
|
//static String geoserverurl = "http://geoserver-dev.d4science-ii.research-infrastructures.eu/geoserver";
|
|
|
|
static String user = "admin";
|
|
static String password = "d4science2014";
|
|
// static String workspace= "timeseriesgisdb";
|
|
//Temperature Isoline at 3 km depth
|
|
//Surface Heat Flow Map of Italy
|
|
//Temperature Isoline at 2 km depth
|
|
// Temperature Isoline at 1 km depth
|
|
//Temperature map at 1 km depth
|
|
//Surface Heat Flow Contour Map of Italy
|
|
//Temperature map at 2 km depth
|
|
//Temperature map at 3 km depth
|
|
|
|
public static void main(String[] args) throws Exception{
|
|
TemperatureIsolineat3kmdepth();
|
|
SurfaceHeatFlowMapofItaly();
|
|
TemperatureIsolineat2kmdepth();
|
|
TemperatureIsolineat1kmdepth();
|
|
Temperaturemapat1kmdepth();
|
|
SurfaceHeatFlowContourMapofItaly();
|
|
Temperaturemapat2kmdepth();
|
|
Temperaturemapat3kmdepth();
|
|
}
|
|
|
|
private static void TemperatureIsolineat3kmdepth() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Temperature Isoline at 3 km depth");
|
|
metadataInserter.setAbstractField("Temperature map at 3km depth (below ground level) of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:iso_3000");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:iso_3000&styles=&bbox=7.59535694122314,36.5945739746094,17.2513008117676,46.1617622375488&width=512&height=507&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:iso_3000&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
private static void SurfaceHeatFlowMapofItaly() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Surface Heat Flow Map of Italy");
|
|
metadataInserter.setAbstractField("Surface Heat Flow Contour Map of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:hf_1");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:hf_1&styles=&bbox=6.66010808944702,36.571231842041,18.6017723083496,47.099250793457&width=512&height=451&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:hf_1&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
|
|
private static void TemperatureIsolineat2kmdepth() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Temperature Isoline at 2 km depth");
|
|
metadataInserter.setAbstractField("Temperature Isoline at 2 km depth (below ground level) of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:iso_2000");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.1.0&request=GetMap&layers=IGG:iso_2000&styles=&bbox=7.53796720504761,36.6590042114258,17.1645240783691,46.0757904052734&width=512&height=500&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:iso_2000&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
private static void TemperatureIsolineat1kmdepth() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Temperature Isoline at 1 km depth");
|
|
metadataInserter.setAbstractField("Temperature Isoline at 1 km depth (below ground level) of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:iso_1000");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:iso_1000&styles=&bbox=7.40797662734985,36.7031669616699,17.1524467468262,46.1305541992188&width=512&height=495&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:iso_1000&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
private static void Temperaturemapat1kmdepth() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Temperature map at 1 km depth");
|
|
metadataInserter.setAbstractField("Temperature map at 1km depth (below ground level) of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:area_temp_1000");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:area_temp_1000&styles=&bbox=6.62688943789748,36.6438921370804,18.5206117399977,47.0919540445501&width=512&height=449&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:area_temp_1000&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
private static void SurfaceHeatFlowContourMapofItaly() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Surface Heat Flow Contour Map of Italy");
|
|
metadataInserter.setAbstractField("Surface Heat Flow Contour Map of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:heat_flow_1");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:heat_flow_1&styles=&bbox=6.699791431427,36.5742835998535,18.6017723083496,47.0844573974609&width=512&height=452&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:heat_flow_1&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
private static void Temperaturemapat2kmdepth() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Temperature map at 2 km depth");
|
|
metadataInserter.setAbstractField("Temperature map at 2km depth (below ground level) of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:area_temp_2000");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:area_temp_2000&styles=&bbox=6.6268892288208,36.6438903808594,18.5206127166748,47.0919570922852&width=512&height=449&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:area_temp_2000&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
private static void Temperaturemapat3kmdepth() throws Exception{
|
|
GenericLayerMetadata metadataInserter = new GenericLayerMetadata();
|
|
metadataInserter.setGeonetworkUrl(geonetworkurl);
|
|
metadataInserter.setGeonetworkUser(user);
|
|
metadataInserter.setGeonetworkPwd(password);
|
|
metadataInserter.setResolution(0);
|
|
metadataInserter.setXLeftLow(6.62397);
|
|
metadataInserter.setYLeftLow(36.64916);
|
|
metadataInserter.setXRightUpper(18.51444);
|
|
metadataInserter.setYRightUpper(47.09458);
|
|
|
|
metadataInserter.setTitle("Temperature map at 3 km depth");
|
|
metadataInserter.setAbstractField("Temperature map at 3km depth (below ground level) of Italy");
|
|
metadataInserter.setCustomTopics("geothermal energy","map","Italy","Energy resources","EGIP","D4Science");
|
|
metadataInserter.setCategoryTypes("_"+TopicCategory.CLIMATOLOGY_METEOROLOGY_ATMOSPHERE.name()+"_"+"_"+TopicCategory.ENVIRONMENT.name()+"_");
|
|
metadataInserter.setResolution(0);
|
|
|
|
metadataInserter.setLayerName("IGG:area_temp_3000");
|
|
|
|
String [] urls = {
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/wms?service=WMS&version=1.3.0&request=GetMap&layers=IGG:area_temp_3000&styles=&bbox=6.6268892288208,36.5945739746094,18.5206127166748,47.0919570922852&width=512&height=451&crs=EPSG:4326&format=application/openlayers",
|
|
"http://repoigg.services.iit.cnr.it/geoserver/IGG/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=IGG:area_temp_3000&srsName=urn:x-ogc:def:crs:EPSG:4326"
|
|
};
|
|
String [] protocols = {"WMS","WFS"};
|
|
|
|
metadataInserter.customMetaDataInsert(urls,protocols);
|
|
}
|
|
|
|
}
|