diff --git a/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java b/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java index 31d51f5..51f0652 100644 --- a/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java +++ b/src/main/java/gov/nasa/cumulus/metadata/aggregator/UMMGranuleFile.java @@ -754,7 +754,9 @@ public JSONObject line2Polygons(JSONObject geometry, String line) { // use the original coordinate array instead of splittedGeos.get(0) // for the original coordinate array is "un-damaged polygons.add(coordinates); - geometry = addPolygons(geometry, polygons); + + boolean addInvalidPolygons = (this.granule.getIsoType() == IsoType.SMAP); + geometry = addPolygons(geometry, polygons, addInvalidPolygons); } else if (dividedSize == 2) { // dont know how to process. Create global bounding box AdapterLogger.LogError(this.className + " split divided to more than 2 geos. Creating global bounding box"); @@ -795,6 +797,10 @@ public JSONObject addGlobalBoundingBox2Geometry(JSONObject geometry) { } public JSONObject addPolygons(JSONObject geometry, ArrayList> inputPolygons) { + return addPolygons(geometry, inputPolygons, false); + } + + public JSONObject addPolygons(JSONObject geometry, ArrayList> inputPolygons, boolean addInvalid) { JSONArray polygons = new JSONArray(); geometry.put("GPolygons", polygons); GeometryFactory geometryFactory = new GeometryFactory(); @@ -812,7 +818,7 @@ public JSONObject addPolygons(JSONObject geometry, ArrayList