Mercurial > mxd2map
diff src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 172:929e09649b08
Handle unknown projections.
author | vc11884admin@VC11884.win.bsh.de |
---|---|
date | Wed, 06 Jul 2011 15:51:43 +0200 |
parents | b9ee44070056 |
children | 707f13cfba74 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Wed Jul 06 15:17:05 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Wed Jul 06 15:51:43 2011 +0200 @@ -101,8 +101,11 @@ Double.parseDouble(mapNode.getAttribute("extent_max_x")), Double.parseDouble(mapNode.getAttribute("extent_max_y"))); - //Set the units. - map.setProjection("epsg:" + mapNode.getAttribute("projection")); + //Set the units and projection. + int proj = Integer.parseInt(mapNode.getAttribute("projection")); + if(proj != 0) { + map.setProjection("epsg:" + mapNode.getAttribute("projection")); + } String u = mapNode.getAttribute("units"); if(u.equals("feet")) { units = MS_UNITS.MS_FEET;