Mercurial > mxd2map
changeset 98:4696d0769f9c
Write the absolute path to the data source of the layer.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 07 Jun 2011 13:35:02 +0200 |
parents | 18e4f143896b |
children | d6d2a4058ebf 609c234e8e23 |
files | ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jun 06 17:24:43 2011 +0200 +++ b/ChangeLog Tue Jun 07 13:35:02 2011 +0200 @@ -1,3 +1,8 @@ +2011-06-07 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Write the absolute path to the data source of the layer. + 2011-06-06 Raimund Renkert <raimund.renkert@intevation.de> Added polygon writer.
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Mon Jun 06 17:24:43 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Tue Jun 07 13:35:02 2011 +0200 @@ -6,6 +6,8 @@ import org.w3c.dom.Element; import org.w3c.dom.NodeList; +import java.io.File; + import javax.xml.xpath.XPathConstants; import edu.umn.gis.mapscript.mapObj; @@ -176,7 +178,13 @@ } //The layer datasource. - layer.setData(layerElement.getAttribute("data_source")); + String datasource = ""; + if(layerElement.hasAttribute("workspace")) { + datasource = layerElement.getAttribute("workspace"); + datasource += File.separator; + } + datasource += layerElement.getAttribute("data_source"); + layer.setData(datasource); //Write classes. writeClass(layer, layerElement);