diff --git a/src/main/groovy/au/org/ala/spatial/intersect/SimpleShapeFile.groovy b/src/main/groovy/au/org/ala/spatial/intersect/SimpleShapeFile.groovy index 5e63c59..05f1d32 100644 --- a/src/main/groovy/au/org/ala/spatial/intersect/SimpleShapeFile.groovy +++ b/src/main/groovy/au/org/ala/spatial/intersect/SimpleShapeFile.groovy @@ -274,8 +274,14 @@ class SimpleShapeFile implements Serializable { static ArrayList parsePolygon(String polygon) { ArrayList regions = new ArrayList() for (String p : polygon.split("\\),( )*\\(")) { + //remove return/space that immediately occur after ',' + p = p.replaceAll('[\\n]+', '') + //remove space that immediately occur after ',' + p = p.replaceAll(',[\\s]+', ',').trim() + regions.add(SimpleRegion.parseSimpleRegion(p)) } + return regions } diff --git a/src/main/groovy/au/org/ala/spatial/process/Classification.groovy b/src/main/groovy/au/org/ala/spatial/process/Classification.groovy index 0965259..54e58a6 100644 --- a/src/main/groovy/au/org/ala/spatial/process/Classification.groovy +++ b/src/main/groovy/au/org/ala/spatial/process/Classification.groovy @@ -27,7 +27,7 @@ import org.apache.commons.io.FileUtils class Classification extends SlaveProcess { void start() { - + taskLog("Classification is about to start") //list of layers List layers = getInput('layer').toString().split(',') def envnameslist = new String[layers.size()] diff --git a/src/main/groovy/au/org/ala/spatial/process/SlaveProcess.groovy b/src/main/groovy/au/org/ala/spatial/process/SlaveProcess.groovy index 07c226f..9322b39 100644 --- a/src/main/groovy/au/org/ala/spatial/process/SlaveProcess.groovy +++ b/src/main/groovy/au/org/ala/spatial/process/SlaveProcess.groovy @@ -1114,6 +1114,7 @@ class SlaveProcess { } RegionEnvelope processArea(AreaInput area) { + log.info("Parsing WKT ") def wkt = getAreaWkt(area) def region = null @@ -1123,7 +1124,7 @@ class SlaveProcess { } else { region = SimpleShapeFile.parseWKT(wkt) } - + log.info("Check BBox: " + region?.bounding_box) new RegionEnvelope(region, envelope) }