[PATCH] (issue1794) Safeguard against layers without extent
Wald Commits
scm-commit at wald.intevation.org
Tue Feb 17 12:37:01 CET 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1424172973 -3600
# Node ID 76a2268942c63c74970ef614236276f7ea536e0f
# Parent 9e66aa006b4231eb2ec62b3f067935d6351651f7
(issue1794) Safeguard against layers without extent.
Just create a broken layer but don't create a syntax error in a mapfile.
The syntax error pulls down the whole user wms while this just creates
one broken layer.
diff -r 9e66aa006b42 -r 76a2268942c6 artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Fri Jan 30 15:21:35 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Tue Feb 17 12:36:13 2015 +0100
@@ -301,7 +301,13 @@
protected void appendMapInformation(Element parent, ElementCreator c) {
- String mE = GeometryUtils.jtsBoundsToOLBounds(this.maxExtent);
+ String mE;
+ if (this.maxExtent != null) {
+ mE = GeometryUtils.jtsBoundsToOLBounds(this.maxExtent);
+ } else {
+ log.error("Layer without extent. Probably no geometry at all.");
+ mE = "0 0 0 0";
+ }
Element maxExtent = c.create("maxExtent");
maxExtent.setTextContent(mE);
More information about the Dive4Elements-commits
mailing list