changeset 86:e19c5eb43099

Instantiate the mapscript writer before loading the MXD file.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 31 May 2011 15:37:19 +0200
parents 04ea8a4972ff
children 7d4cf2db43f1
files ChangeLog src/java/de/intevation/mxd/Converter.java
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 31 12:44:31 2011 +0200
+++ b/ChangeLog	Tue May 31 15:37:19 2011 +0200
@@ -1,3 +1,10 @@
+2011-05-31  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/Converter.java:
+	  Instantiate the mapscript writer before loading the MXD file.
+	  This is necessary because the ArcGIS-API changes the working directory
+	  while loading the MXD file.
+
 2011-05-31  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/reader/AbstractSymbolReader.java:
--- a/src/java/de/intevation/mxd/Converter.java	Tue May 31 12:44:31 2011 +0200
+++ b/src/java/de/intevation/mxd/Converter.java	Tue May 31 15:37:19 2011 +0200
@@ -102,15 +102,16 @@
             }
 
             IReader reader = new MXDReader();
+            IWriter writer = new MapScriptWriter(maptemplate, mapfile);
+
             reader.init();
             reader.setFilename(mxdfile);
             reader.read();
 
-            IWriter writer = new MapScriptWriter(maptemplate, mapfile);
             writer.write(reader.getMapDocument());
             reader.shutdown();
         }
-        catch(IOException e) {
+        catch(Exception e) {
             e.printStackTrace();
         }
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)