From 9d01b2a0fbd447beb60d248e67fbb3fca3ddd9a4 Mon Sep 17 00:00:00 2001 From: Gianpaolo Coro Date: Wed, 29 May 2013 15:09:17 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/EcologicalEngineGeoSpatialExtension@76477 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../gcube/dataanalysis/geo/retrieval/GeoIntersector.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/dataanalysis/geo/retrieval/GeoIntersector.java b/src/main/java/org/gcube/dataanalysis/geo/retrieval/GeoIntersector.java index 12b4d62..36bfb8c 100644 --- a/src/main/java/org/gcube/dataanalysis/geo/retrieval/GeoIntersector.java +++ b/src/main/java/org/gcube/dataanalysis/geo/retrieval/GeoIntersector.java @@ -32,7 +32,11 @@ public class GeoIntersector { featurer.setScope(scope); this.configDir=cfgDir; } - + + public FeaturesManager getFeaturer(){ + return featurer; + } + public LinkedHashMap getFeaturesInTime(String layerTitle, double x, double y) throws Exception { return getFeaturesInTime(layerTitle, x, y, 0); } @@ -117,7 +121,7 @@ public class GeoIntersector { boolean found = false; for (FeaturedPolygon poly:featuresInTime){ - if (poly.p.covers(po)){ + if (poly!=null && poly.p!=null && poly.p.covers(po)){ // System.out.println(po+" intersected by "+poly.p+ " assigning value "+poly.value); // features.add(poly.value); featuresarray[k] = poly.value;