comparison 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
comparison
equal deleted inserted replaced
170:b9ee44070056 172:929e09649b08
99 Double.parseDouble(mapNode.getAttribute("extent_min_x")), 99 Double.parseDouble(mapNode.getAttribute("extent_min_x")),
100 Double.parseDouble(mapNode.getAttribute("extent_min_y")), 100 Double.parseDouble(mapNode.getAttribute("extent_min_y")),
101 Double.parseDouble(mapNode.getAttribute("extent_max_x")), 101 Double.parseDouble(mapNode.getAttribute("extent_max_x")),
102 Double.parseDouble(mapNode.getAttribute("extent_max_y"))); 102 Double.parseDouble(mapNode.getAttribute("extent_max_y")));
103 103
104 //Set the units. 104 //Set the units and projection.
105 map.setProjection("epsg:" + mapNode.getAttribute("projection")); 105 int proj = Integer.parseInt(mapNode.getAttribute("projection"));
106 if(proj != 0) {
107 map.setProjection("epsg:" + mapNode.getAttribute("projection"));
108 }
106 String u = mapNode.getAttribute("units"); 109 String u = mapNode.getAttribute("units");
107 if(u.equals("feet")) { 110 if(u.equals("feet")) {
108 units = MS_UNITS.MS_FEET; 111 units = MS_UNITS.MS_FEET;
109 } 112 }
110 else if(u.equals("inches")) { 113 else if(u.equals("inches")) {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)