git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@111691 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9f342ae60d
commit
7c779c0634
|
@ -102,7 +102,7 @@ public class GeoNetworkInspector {
|
|||
}
|
||||
|
||||
if (link == null)
|
||||
System.out.println("NO GEOSERVER LINK WAS FOUND ACCORDING TO THE CRITERION");
|
||||
AnalysisLogger.getLogger().debug("NO GEOSERVER LINK WAS FOUND ACCORDING TO THE CRITERION");
|
||||
|
||||
return link;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public class GeoNetworkInspector {
|
|||
|
||||
}
|
||||
if (link == null)
|
||||
System.out.println("NO ONLINE LINK WAS FOUND ACCORDING TO THE CRITERION :" + criterion);
|
||||
AnalysisLogger.getLogger().debug("NO ONLINE LINK WAS FOUND ACCORDING TO THE CRITERION :" + criterion);
|
||||
return link;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ public class GeoNetworkInspector {
|
|||
}
|
||||
|
||||
public String getLayerName(Metadata meta) {
|
||||
AnalysisLogger.getLogger().debug("Retrieving Layer Name");
|
||||
AnalysisLogger.getLogger().debug("Retrieving Layer Name from WMS");
|
||||
String wmslink = getWMSLink(meta);
|
||||
String layer = null;
|
||||
|
||||
|
@ -250,6 +250,7 @@ public class GeoNetworkInspector {
|
|||
}
|
||||
else
|
||||
{
|
||||
AnalysisLogger.getLogger().debug("Trying with WFS link");
|
||||
String wfslink = getWFSLink(meta);
|
||||
String [] finders = {"typename=", "TYPENAME=","typeName=","TypeName"};
|
||||
if (wfslink != null) {
|
||||
|
@ -276,6 +277,7 @@ public class GeoNetworkInspector {
|
|||
}
|
||||
}
|
||||
}
|
||||
AnalysisLogger.getLogger().debug("Returning layer "+layer);
|
||||
return layer;
|
||||
}
|
||||
|
||||
|
@ -498,7 +500,7 @@ public class GeoNetworkInspector {
|
|||
meta = checkForMetadatabyTitle(GeoNetworkInspector.treatTitleForGN(layerUUIDorTitle), layerUUIDorTitle);
|
||||
} catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
AnalysisLogger.getLogger().debug("Layer does not exist "+e.getLocalizedMessage());
|
||||
AnalysisLogger.getLogger().debug("Layer does not exist: "+e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,13 +72,14 @@ public class MatrixExtractor {
|
|||
connector = new Table(configuration, resolution);
|
||||
currentconnector = connector;
|
||||
} else {
|
||||
try{
|
||||
meta = gnInspector.getGNInfobyUUIDorName(layerTitle);
|
||||
}catch(Exception e){
|
||||
|
||||
try {
|
||||
meta = gnInspector.getGNInfobyUUIDorName(layerTitle);
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
// if the layer is not on GeoNetwork
|
||||
if (meta == null) {
|
||||
AnalysisLogger.getLogger().debug("Forcing setting of the meta");
|
||||
String[] urls = { layerTitle };
|
||||
String[] protocols = { "HTTP" };
|
||||
meta = new GenericLayerMetadata().createBasicMeta(urls, protocols);
|
||||
|
@ -204,7 +205,7 @@ public class MatrixExtractor {
|
|||
AnalysisLogger.getLogger().debug("Bounding box: (" + x1 + "," + x2 + ";" + y1 + "," + y2 + ")");
|
||||
|
||||
List<Tuple<Double>> tuples = VectorOperations.generateCoordinateTripletsInBoundingBox(x1, x2, y1, y2, z, xResolution, yResolution);
|
||||
|
||||
|
||||
if (log) {
|
||||
AnalysisLogger.getLogger().debug("MatrixExtractor->Building the points grid according to YRes:" + yResolution + " and XRes:" + xResolution);
|
||||
}
|
||||
|
@ -214,10 +215,10 @@ public class MatrixExtractor {
|
|||
currentTuples = tuples;
|
||||
// AnalysisLogger.getLogger().debug("Elapsed:"+(System.currentTimeMillis()-t0));
|
||||
double[][] slice = VectorOperations.vectorToMatix(currentTimeValues, x1, x2, y1, y2, xResolution, yResolution);
|
||||
|
||||
if (log){
|
||||
|
||||
if (log) {
|
||||
AnalysisLogger.getLogger().debug("Taken " + currentTimeValues.size() + " values");
|
||||
AnalysisLogger.getLogger().debug("MatrixExtractor->Reassigned:" + (slice.length* slice[0].length));
|
||||
AnalysisLogger.getLogger().debug("MatrixExtractor->Reassigned:" + (slice.length * slice[0].length));
|
||||
}
|
||||
// applyNearestNeighbor();
|
||||
|
||||
|
|
|
@ -35,14 +35,16 @@ public class TestMapsComparison {
|
|||
// String layertitle2 = "4e5c1bbf-f5ce-4b66-a67c-14d7d9920aa0";
|
||||
// String layertitle = "38b2eb74-1c07-4569-8a81-36ac2f973146";
|
||||
|
||||
String layertitle = "http://geoserver.d4science-ii.research-infrastructures.eu/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=lluidiamaculata20121218223748535cet&format=json&maxfeatures=1";
|
||||
String layertitle2 = "http://geoserver.d4science-ii.research-infrastructures.eu/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=lluidiamaculata20121218223748535cet&format=json&maxfeatures=1";
|
||||
//String layertitle = "http://geoserver.d4science-ii.research-infrastructures.eu/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=lluidiamaculata20121218223748535cet&format=json&maxfeatures=1";
|
||||
//String layertitle2 = "http://geoserver.d4science-ii.research-infrastructures.eu/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=lluidiamaculata20121218223748535cet&format=json&maxfeatures=1";
|
||||
|
||||
String layertitle = "http://geoserver-dev4.d4science.org/geoserver/aquamaps/ows?service=wfs&version=1.1.0&REQUEST=GetFeature&srsName=urn:x-ogc:def:crs:EPSG:4326&TYPENAME=aquamaps:llatimeriachalumnae20130717140243002cest&format=json&maxfeatures=1";
|
||||
String layertitle2 = "http://geoserver-dev4.d4science.org/geoserver/aquamaps/ows?service=wfs&version=1.1.0&REQUEST=GetFeature&srsName=urn:x-ogc:def:crs:EPSG:4326&TYPENAME=aquamaps:llatimeriachalumnae20130717140243002cest&format=json&maxfeatures=1";
|
||||
|
||||
|
||||
AnalysisLogger.setLogger(cfg+AlgorithmConfiguration.defaultLoggerFile);
|
||||
AlgorithmConfiguration config = new AlgorithmConfiguration();
|
||||
config.setConfigPath(cfg);
|
||||
config.setGcubeScope("/gcube/devsec/devVRE");
|
||||
config.setGcubeScope("/gcube/devsec");
|
||||
config.setPersistencePath("./");
|
||||
|
||||
config.setParam("DatabaseUserName","gcube");
|
||||
|
|
Loading…
Reference in New Issue