Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java @ 8527:76a2268942c6
(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.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 17 Feb 2015 12:36:13 +0100 |
parents | e4606eae8ea5 |
children | e701ef544ffa |
comparison
equal
deleted
inserted
replaced
8526:9e66aa006b42 | 8527:76a2268942c6 |
---|---|
299 this.srid = srid; | 299 this.srid = srid; |
300 } | 300 } |
301 | 301 |
302 | 302 |
303 protected void appendMapInformation(Element parent, ElementCreator c) { | 303 protected void appendMapInformation(Element parent, ElementCreator c) { |
304 String mE = GeometryUtils.jtsBoundsToOLBounds(this.maxExtent); | 304 String mE; |
305 if (this.maxExtent != null) { | |
306 mE = GeometryUtils.jtsBoundsToOLBounds(this.maxExtent); | |
307 } else { | |
308 log.error("Layer without extent. Probably no geometry at all."); | |
309 mE = "0 0 0 0"; | |
310 } | |
305 | 311 |
306 Element maxExtent = c.create("maxExtent"); | 312 Element maxExtent = c.create("maxExtent"); |
307 maxExtent.setTextContent(mE); | 313 maxExtent.setTextContent(mE); |
308 | 314 |
309 if(this.initialExtent != null) { | 315 if(this.initialExtent != null) { |