Mercurial > mxd2map
changeset 135:a4ab239509f1
Updated the default values and reader error handling.
line wrap: on
line diff
--- a/ChangeLog Wed Jun 22 12:01:28 2011 +0200 +++ b/ChangeLog Wed Jun 22 13:55:22 2011 +0200 @@ -1,3 +1,21 @@ +2011-06-22 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/reader/ArrowMarkerSymbolReader.java, + src/java/de/intevation/mxd/reader/CartoLineSymbolReader.java, + src/java/de/intevation/mxd/reader/CharacterMarkerSymbolReader.java, + src/java/de/intevation/mxd/reader/FeatureLayerReader.java, + src/java/de/intevation/mxd/reader/GdbRasterCatalogLayerReader.java, + src/java/de/intevation/mxd/reader/HashLineSymbolReader.java, + src/java/de/intevation/mxd/reader/LineFillSymbolReader.java, + src/java/de/intevation/mxd/reader/MarkerFillSymbolReader.java, + src/java/de/intevation/mxd/reader/PictureLineSymbolReader.java, + src/java/de/intevation/mxd/reader/PictureMarkerSymbolReader.java, + src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java, + src/java/de/intevation/mxd/reader/SimpleLineSymbolReader.java, + src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java, + src/java/de/intevation/mxd/reader/SimpleRendererReader.java: + Updated the default values and reader error handling. + 2011-06-22 Raimund Renkert <raimund.renkert@intevation.de> * src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java:
--- a/src/java/de/intevation/mxd/reader/ArrowMarkerSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/ArrowMarkerSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -87,12 +87,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -101,8 +96,7 @@ String.valueOf(symbol.getAngle())); } catch(IOException ioe) { - logger.warn("Could not read angle. Setting angle to 0."); - symbolElement.setAttribute("angle", "0"); + logger.warn("Could not read angle."); } try { @@ -121,8 +115,7 @@ String.valueOf(symbol.getXOffset())); } catch(IOException ioe) { - logger.warn("Could not read x-offset. Setting x-offset to 0."); - symbolElement.setAttribute("x_offset", "0"); + logger.warn("Could not read x-offset."); } try { @@ -131,8 +124,7 @@ String.valueOf(symbol.getYOffset())); } catch(IOException ioe) { - logger.warn("Could not read y-offset. Setting y-offset to 0."); - symbolElement.setAttribute("y_offset", "0"); + logger.warn("Could not read y-offset."); } try { @@ -151,8 +143,7 @@ String.valueOf(symbol.getLength())); } catch(IOException ioe) { - logger.warn("Could not read length. Setting length to 1."); - symbolElement.setAttribute("length", "1"); + logger.warn("Could not read length."); } try { @@ -161,8 +152,7 @@ String.valueOf(symbol.getWidth())); } catch(IOException ioe) { - logger.warn("Could not read width. Setting width to 1."); - symbolElement.setAttribute("width", "1"); + logger.warn("Could not read width."); } symbolElement.setAttribute("style", "arrow"); symbolElement.setAttribute("type", "marker");
--- a/src/java/de/intevation/mxd/reader/CartoLineSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/CartoLineSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -95,25 +95,19 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency"); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } int cap; + String capStyle = ""; try { cap = symbol.getCap(); } catch(IOException ioe) { logger.warn( - "Could not read line cap." + - " Setting line cap to \"butt\""); + "Could not read line cap."); cap = -1; } - String capStyle = "butt"; switch(cap) { case esriLineCapStyle.esriLCSRound: capStyle = "round"; break; case esriLineCapStyle.esriLCSSquare: capStyle = "square"; break; @@ -122,6 +116,7 @@ int join; + String joinStyle = ""; try { join = symbol.getJoin(); } @@ -131,14 +126,17 @@ " Setting line join to \"bevel\"."); join = -1; } - String joinStyle = "bevel"; switch(join) { case esriLineJoinStyle.esriLJSRound: joinStyle = "round"; break; case esriLineJoinStyle.esriLJSMitre: joinStyle = "miter"; break; default: break; } - symbolElement.setAttribute("cap", capStyle); - symbolElement.setAttribute("join", joinStyle); + if(!capStyle.equals("")) { + symbolElement.setAttribute("cap", capStyle); + } + if (!joinStyle.equals("")) { + symbolElement.setAttribute("join", joinStyle); + } try { symbolElement.setAttribute( @@ -146,10 +144,7 @@ String.valueOf(symbol.getLineStartOffset())); } catch(IOException ioe) { - logger.warn( - "Could not read line start offset." + - " Setting line start offset to 0."); - symbolElement.setAttribute("linestart", "0"); + logger.warn("Could not read line start offset."); } try { @@ -158,10 +153,7 @@ String.valueOf(symbol.getMiterLimit())); } catch(IOException ioe) { - logger.warn( - "Could not read miter limit. " + - " Setting miter limit to 0."); - symbolElement.setAttribute("miterlimit", "0"); + logger.warn("Could not read miter limit."); } try { @@ -170,8 +162,7 @@ String.valueOf(symbol.getOffset())); } catch(IOException ioe) { - logger.warn("Could not read offset. Setting offset to 0."); - symbolElement.setAttribute("offset", "0"); + logger.warn("Could not read offset."); } try { @@ -180,8 +171,7 @@ String.valueOf(symbol.getWidth())); } catch(IOException ioe) { - logger.warn("Could not read width. Setting width to 1."); - symbolElement.setAttribute("width", "1"); + logger.warn("Could not read width."); } //TODO Read further attributes depending on the Mapscript functionality: // Template, MarkerSymbol, LineDecorations
--- a/src/java/de/intevation/mxd/reader/CharacterMarkerSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/CharacterMarkerSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -69,8 +69,7 @@ String.valueOf(symbol.getAngle())); } catch(IOException ioe) { - logger.warn("Could not read angle. Setting angle to 0."); - symbolElement.setAttribute("angle", "0"); + logger.warn("Could not read angle."); } try { @@ -79,8 +78,7 @@ String.valueOf(symbol.getSize())); } catch(IOException ioe) { - logger.warn("Could not read size. Setting size to 1"); - symbolElement.setAttribute("size", "1"); + logger.warn("Could not read size."); } try { @@ -89,8 +87,7 @@ String.valueOf(symbol.getXOffset())); } catch(IOException ioe) { - logger.warn("Could not read x-offset. Setting x-offset to 0."); - symbolElement.setAttribute("x_offset", "0"); + logger.warn("Could not read x-offset."); } try { @@ -99,8 +96,7 @@ String.valueOf(symbol.getYOffset())); } catch(IOException ioe) { - logger.warn("Could not read y-offset. Setting y-offset to 0."); - symbolElement.setAttribute("y_offset", "0"); + logger.warn("Could not read y-offset."); } try { @@ -120,9 +116,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read character." + - " Setting character number to 60"); - symbolElement.setAttribute("char", "60"); + "Could not read character number."); } try { @@ -149,12 +143,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -170,8 +159,8 @@ symbolElement.setAttribute("weight", String.valueOf(f.getWeight())); } catch(IOException ioe) { - logger.warn("Could not read font. Setting font to \"Unknown\"."); - symbolElement.setAttribute("font", "Unknown"); + logger.warn("Could not read font. Setting font to \"FreeSans\"."); + symbolElement.setAttribute("font", "FreeSans"); } symbolElement.setAttribute("style", "char"); symbolElement.setAttribute("type", "marker");
--- a/src/java/de/intevation/mxd/reader/FeatureLayerReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/FeatureLayerReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -75,9 +75,9 @@ } catch(IOException ioe) { logger.warn( - "Could not read name." + - " Setting name to \"default-layer\""); - layerElement.setAttribute("name", "default-layer"); + "Could not read layer name." + + " Stopped reading layer."); + throw new IOException("Error reading layer name."); } try { @@ -85,10 +85,7 @@ String.valueOf(layer.getMinimumScale())); } catch(IOException ioe) { - logger.warn( - "Could not read minimum scale." + - " Setting minimum scale to 0."); - layerElement.setAttribute("min_scale", "0"); + logger.warn("Could not read minimum scale."); } try { @@ -97,9 +94,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read maximum scale." + - " Setting maximum scale to 0."); - layerElement.setAttribute("max_scale", "0"); + "Could not read maximum scale."); } try { @@ -122,10 +117,8 @@ type = layer.getShapeType(); } catch(IOException ioe) { - logger.warn( - "Could not read shape type." + - " Setting shape type to \"none\"."); - type = 0; + logger.warn("Could not read shape type."); + throw new IOException("Error reading shape type."); } switch (type) { case 0: layerElement.setAttribute("type", "none"); break; @@ -140,9 +133,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read definition query." + - " Setting empty definition query."); - layerElement.setAttribute("definition_query", ""); + "Could not read definition query."); } try { IName fcn = layer.getDataSourceName(); @@ -230,7 +221,7 @@ "Could not read layer datasource." + " Stopped reading layer " + layer.getName() + "."); util.removeLayer(layerElement); - return null; + return null; } return layerElement; }
--- a/src/java/de/intevation/mxd/reader/GdbRasterCatalogLayerReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/GdbRasterCatalogLayerReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -68,7 +68,7 @@ "Could not create DOM element for layer." + "Stopped reading layer."); throw new IOException( - this.getClass()+toString() + + this.getClass().toString() + "Error creating dom element"); } @@ -76,10 +76,8 @@ layerElement.setAttribute("name", layer.getName()); } catch(IOException ioe) { - logger.warn( - "Could not read layer name. " + - "Setting layer name to \"default\"."); - layerElement.setAttribute("name", "default"); + logger.warn("Could not read layer name. Stopped reading layer."); + throw new IOException("Error reading layer name."); } try { @@ -87,10 +85,7 @@ String.valueOf(layer.getMinimumScale())); } catch(IOException ioe) { - logger.warn( - "Could not read minimum layer scale." + - "Setting minimum layer scale to 1000"); - layerElement.setAttribute("min_scale", "1000"); + logger.warn("Could not read minimum layer scale."); } try { @@ -98,10 +93,7 @@ String.valueOf(layer.getMaximumScale())); } catch(IOException ioe) { - logger.warn( - "Could not read maximum layer scale." + - "Setting maximum layer scale to 1000000"); - layerElement.setAttribute("max_scale", "1000000"); + logger.warn("Could not read maximum layer scale."); } try { @@ -125,9 +117,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read layer definition query." + - "Setting empty definition query."); - layerElement.setAttribute("definition_query", ""); + "Could not read layer definition query."); } return layerElement; }
--- a/src/java/de/intevation/mxd/reader/HashLineSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/HashLineSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -94,22 +94,18 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } + int cap; try { cap = symbol.getCap(); } catch(IOException ioe) { - logger.warn("Could not read line cap. Setting line cap to \"butt\""); + logger.warn("Could not read line cap."); cap = -1; } - String capStyle = "butt"; + String capStyle = ""; switch(cap) { case esriLineCapStyle.esriLCSRound: capStyle = "round"; break; case esriLineCapStyle.esriLCSSquare: capStyle = "square"; break; @@ -121,29 +117,29 @@ join = symbol.getJoin(); } catch(IOException ioe) { - logger.warn( - "Could not read line join." + - " Setting line join to \"bevel\"."); + logger.warn("Could not read line join."); join = -1; } - String joinStyle = "bevel"; + String joinStyle = ""; switch(join) { case esriLineJoinStyle.esriLJSRound: joinStyle = "round"; break; case esriLineJoinStyle.esriLJSMitre: joinStyle = "miter"; break; default: break; } - symbolElement.setAttribute("cap", capStyle); - symbolElement.setAttribute("join", joinStyle); + if(!capStyle.equals("")) { + symbolElement.setAttribute("cap", capStyle); + } + if(!joinStyle.equals("")) { + symbolElement.setAttribute("join", joinStyle); + } + try { symbolElement.setAttribute( "linestart", String.valueOf(symbol.getLineStartOffset())); } catch(IOException ioe) { - logger.warn( - "Could not read line start offset." + - " Setting line start offset to 0."); - symbolElement.setAttribute("linestart", "0"); + logger.warn("Could not read line start offset."); } try { @@ -152,10 +148,7 @@ String.valueOf(symbol.getMiterLimit())); } catch(IOException ioe) { - logger.warn( - "Could not read miter limit." + - " Setting miter limit to 0."); - symbolElement.setAttribute("miterlimit", "0"); + logger.warn("Could not read miter limit."); } try { @@ -164,8 +157,7 @@ String.valueOf(symbol.getOffset())); } catch(IOException ioe) { - logger.warn("Could not read offset. Setting offset to 0."); - symbolElement.setAttribute("offset", "0"); + logger.warn("Could not read offset."); } try { @@ -174,8 +166,7 @@ String.valueOf(symbol.getWidth())); } catch(IOException ioe) { - logger.warn("Could not read width. Setting width to 1."); - symbolElement.setAttribute("width", "1"); + logger.warn("Could not read width."); } try {
--- a/src/java/de/intevation/mxd/reader/LineFillSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/LineFillSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -81,8 +81,7 @@ String.valueOf(symbol.getOffset())); } catch(IOException ioe) { - logger.warn("Could not read offset. Setting offset to 0."); - symbolElement.setAttribute("offset", "0"); + logger.warn("Could not read offset."); } try { @@ -91,8 +90,7 @@ String.valueOf(symbol.getSeparation())); } catch(IOException ioe) { - logger.warn("Could not read separation. setting separation to 1."); - symbolElement.setAttribute("separation", "1"); + logger.warn("Could not read separation."); } try { @@ -101,8 +99,7 @@ String.valueOf(symbol.getAngle())); } catch(IOException e) { - logger.warn("Could not read angle. Setting angle to 0."); - symbolElement.setAttribute("angle", "0"); + logger.warn("Could not read angle."); } try { @@ -129,14 +126,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute( - "color", - String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -154,7 +144,7 @@ } } catch(Exception e) { - logger.warn("Could not read outline. No fallback defined."); + logger.warn("Could not read outline."); } try { @@ -173,7 +163,7 @@ } } catch(Exception e) { - logger.warn("Could not read line symbol. No fallback defined"); + logger.warn("Could not read line symbol."); } return parent; }
--- a/src/java/de/intevation/mxd/reader/MarkerFillSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/MarkerFillSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -83,8 +83,7 @@ String.valueOf(symbol.getXOffset())); } catch(IOException ioe) { - logger.warn("Could not read x-offset. Setting x-offset to 0"); - symbolElement.setAttribute("xoffset", "0"); + logger.warn("Could not read x-offset."); } try { @@ -93,8 +92,7 @@ String.valueOf(symbol.getYOffset())); } catch(IOException ioe) { - logger.warn("Could not read y-offset. Setting y-offset to 0."); - symbolElement.setAttribute("yoffset", "0"); + logger.warn("Could not read y-offset."); } try { @@ -103,10 +101,7 @@ String.valueOf(symbol.getXSeparation())); } catch(IOException ioe) { - logger.warn( - "Could not read x-separation." + - " Setting x-separation to 0."); - symbolElement.setAttribute("xseparation", "0"); + logger.warn("Could not read x-separation."); } try { @@ -116,9 +111,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read y-separation." + - " Setting y-separation to 0."); - symbolElement.setAttribute("yseparation", "0"); + "Could not read y-separation."); } int style; @@ -126,7 +119,7 @@ style = symbol.getStyle(); } catch(IOException ioe) { - logger.warn("Could not read style. Setting style to \"empty\""); + logger.warn("Could not read style."); style = -1; } switch(style) { @@ -145,7 +138,7 @@ case esriSimpleFillStyle.esriSFSDiagonalCross: symbolElement.setAttribute("fillstyle", "diagonalcross"); break; - default: symbolElement.setAttribute("fillstyle", "empty"); + default: break; } try { @@ -172,12 +165,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color (0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -195,7 +183,7 @@ } } catch(Exception e) { - logger.warn("Could not read outline. No fallback defined."); + logger.warn("Could not read outline."); } try { @@ -213,7 +201,7 @@ } } catch(Exception e) { - logger.warn("Could not read marker symbol. No fallback defined."); + logger.warn("Could not read marker symbol."); } return parent; }
--- a/src/java/de/intevation/mxd/reader/PictureLineSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/PictureLineSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -71,7 +71,7 @@ symbolElement.setAttribute("name", symbol.getNameString()); } catch(IOException ioe) { - logger.warn("Could not read name. Setting name ti \"default\""); + logger.warn("Could not read name. Setting name to \"default\""); symbolElement.setAttribute("name", "default"); } @@ -95,12 +95,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency"); - Color black = new Color (0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -109,8 +104,7 @@ String.valueOf(symbol.getOffset())); } catch(IOException ioe) { - logger.warn("Could not read offset. Setting offset to 0."); - symbolElement.setAttribute("offset", "0"); + logger.warn("Could not read offset."); } try { @@ -119,8 +113,7 @@ String.valueOf(symbol.getXScale())); } catch(IOException ioe) { - logger.warn("Could not read x-scale. Setting x-scale to 0"); - symbolElement.setAttribute("x_scale", "0"); + logger.warn("Could not read x-scale."); } try { @@ -129,8 +122,7 @@ String.valueOf(symbol.getYScale())); } catch(IOException ioe) { - logger.warn("Could not read y-scale. Setting y-scale to 0."); - symbolElement.setAttribute("y_scale", "0"); + logger.warn("Could not read y-scale."); } try { @@ -139,8 +131,7 @@ String.valueOf(symbol.getWidth())); } catch(IOException ioe) { - logger.warn("Could not read width. Setting width to 1."); - symbolElement.setAttribute("width", "1"); + logger.warn("Could not read width."); } symbolElement.setAttribute("type", "line");
--- a/src/java/de/intevation/mxd/reader/PictureMarkerSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/PictureMarkerSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -68,8 +68,7 @@ String.valueOf(symbol.getAngle())); } catch(IOException ioe) { - logger.warn("Could not read angle. Setting angle to 0."); - symbolElement.setAttribute("angle", "0"); + logger.warn("Could not read angle."); } try { @@ -79,7 +78,7 @@ } catch (IOException ioe) { logger.warn("Could not read size. Setting size to 1."); - symbolElement.setAttribute("size", "0"); + symbolElement.setAttribute("size", "1"); } try { @@ -88,8 +87,7 @@ String.valueOf(symbol.getXOffset())); } catch(IOException ioe) { - logger.warn("Could not read x-offset. Setting x-offset to 0"); - symbolElement.setAttribute("x_offset", "0"); + logger.warn("Could not read x-offset."); } try { @@ -98,8 +96,7 @@ String.valueOf(symbol.getYOffset())); } catch(IOException ioe) { - logger.warn("Could not read y-offset. Setting y-offset to 0."); - symbolElement.setAttribute("y_offset", "0"); + logger.warn("Could not read y-offset."); } try { @@ -117,7 +114,7 @@ pElem.importPicture(symbol.getPicture()); } catch(IOException ioe) { - logger.warn("Could not read picture. No fallback defined."); + logger.warn("Could not read picture."); } symbolElement.setAttribute("style", "picture"); symbolElement.setAttribute("type", "marker");
--- a/src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -77,8 +77,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read fill style." + - " Setting fill style to \"empty\""); + "Could not read fill style."); style = -1; } @@ -98,7 +97,7 @@ case esriSimpleFillStyle.esriSFSDiagonalCross: symbolElement.setAttribute("fillstyle", "diagonalcross"); break; - default: symbolElement.setAttribute("fillstyle", "empty"); + default: break; } try { @@ -125,12 +124,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency"); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -148,7 +142,7 @@ } } catch(Exception e) { - logger.warn("Could not read line symbol. No fallback defined."); + logger.warn("Could not read line symbol."); } return symbolElement;
--- a/src/java/de/intevation/mxd/reader/SimpleLineSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/SimpleLineSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -92,20 +92,14 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { symbolElement.setAttribute("width", String.valueOf(symbol.getWidth())); } catch(IOException ioe) { - logger.warn("Could not read width. Setting width to 1."); - symbolElement.setAttribute("width", "1"); + logger.warn("Could not read width."); } int style; @@ -113,9 +107,7 @@ style = symbol.getStyle(); } catch(IOException ioe) { - logger.warn( - "Could not read line style." + - " Setting line style to \"none\"."); + logger.warn("Could not read line style."); style = -1; } switch(style) { @@ -129,7 +121,7 @@ symbolElement.setAttribute("linestyle", "dashdot"); break; case esriSimpleLineStyle.esriSLSDashDotDot: symbolElement.setAttribute("linestyle", "dashdotdot"); break; - default: symbolElement.setAttribute ("linestyle", "none"); + default: break; } symbolElement.setAttribute("type", "line");
--- a/src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/SimpleMarkerSymbolReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -77,10 +77,7 @@ symbolElement.setAttribute("style", "point"); } catch(IOException ioe) { - logger.warn( - "Could not read marker style." + - " Setting marker style to point."); - symbolElement.setAttribute("style", "point"); + logger.warn("Could not read marker style."); } try { @@ -107,12 +104,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read color." + - " Setting color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute("color", String.valueOf(black.getRGB())); - symbolElement.setAttribute("transparency", "-1"); + logger.warn("Could not read color."); } try { @@ -132,9 +124,7 @@ } catch(IOException ioe) { logger.warn( - "Could not read outline size." + - " Setting outline size to 1."); - symbolElement.setAttribute("outline_size", "1"); + "Could not read outline size."); } try { @@ -165,14 +155,7 @@ } } catch(IOException ioe) { - logger.warn( - "Could not read outline color." + - " Setting outline color to black with no transparency."); - Color black = new Color(0, 0, 0); - symbolElement.setAttribute( - "outline_color", - String.valueOf(black.getRGB())); - symbolElement.setAttribute("outline_transparency", "-1"); + logger.warn("Could not read outline color."); } try { @@ -181,8 +164,7 @@ String.valueOf(symbol.getAngle())); } catch(IOException ioe) { - logger.warn("Could not read angle. Setting angle to 0."); - symbolElement.setAttribute("angle", "0"); + logger.warn("Could not read angle."); } try { @@ -191,8 +173,7 @@ symbol.getXOffset() + "," + symbol.getYOffset()); } catch(IOException ioe) { - logger.warn("Could not read offset. Setting offset to 0."); - symbolElement.setAttribute("offset", "0"); + logger.warn("Could not read offset."); } symbolElement.setAttribute("type", "marker");
--- a/src/java/de/intevation/mxd/reader/SimpleRendererReader.java Wed Jun 22 12:01:28 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/SimpleRendererReader.java Wed Jun 22 13:55:22 2011 +0200 @@ -89,10 +89,7 @@ renderer.getDescription()); } catch(IOException ioe) { - logger.warn( - "Could not read description." + - " Setting empty description."); - rendererElement.setAttribute("description", ""); + logger.warn("Could not read description."); } try {