Mercurial > dive4elements > river
changeset 8746:e701ef544ffa
Avoid writing defect mapfiles for layers without extent.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 05 Jun 2015 16:53:07 +0200 (2015-06-05) |
parents | 787dff3fd634 |
children | e9d912c97fa8 |
files | artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Thu May 21 16:10:21 2015 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Fri Jun 05 16:53:07 2015 +0200 @@ -306,7 +306,7 @@ mE = GeometryUtils.jtsBoundsToOLBounds(this.maxExtent); } else { log.error("Layer without extent. Probably no geometry at all."); - mE = "0 0 0 0"; + mE = "0 0 1 1"; } Element maxExtent = c.create("maxExtent");
--- a/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Thu May 21 16:10:21 2015 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Fri Jun 05 16:53:07 2015 +0200 @@ -226,6 +226,9 @@ layerinfo.setStyle(style); if(wms.getExtent() != null) { layerinfo.setExtent(GeometryUtils.jtsBoundsToOLBounds(wms.getExtent())); + } else { + log.error("Layer without extent. Probably no geometry at all."); + layerinfo.setExtent("0 0 1 1"); } layerinfo.setConnection(wms.getConnection()); layerinfo.setConnectionType(wms.getConnectionType());