diff flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java @ 1164:0398c2b8dbaf

Do only create WSPLGEN and barrier facets if the WSPLGEN job has been added to the Scheduler and if there are digitized geometries existing. flys-artifacts/trunk@2701 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 12 Sep 2011 11:40:04 +0000
parents c07e9e9c7482
children eb3ab28d1c21
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java	Mon Sep 12 11:30:19 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java	Mon Sep 12 11:40:04 2011 +0000
@@ -155,6 +155,11 @@
         SimpleFeatureType featureType,
         FeatureCollection collection
     ) {
+        if (collection.isEmpty()) {
+            logger.warn("Shapefile is not written - no features given!");
+            return false;
+        }
+
         Transaction transaction = null;
 
         try {

http://dive4elements.wald.intevation.org