Mercurial > mxd2map
changeset 57:8da6555f1c12
Set the projection "EPSG:31467" and units "METERS" as default values.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 17 May 2011 13:00:10 +0200 |
parents | 08913299e34f |
children | 4e0464c620f0 |
files | ChangeLog src/java/de/intevation/mxd/reader/MapReader.java src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue May 17 11:55:03 2011 +0200 +++ b/ChangeLog Tue May 17 13:00:10 2011 +0200 @@ -1,3 +1,10 @@ +2011-05-17 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/reader/MapReader.java, + src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Set the projection "EPSG:31467" and units "METERS" as default if the + MXD values are unknown. + 2011-05-16 Raimund Renkert <raimund.renkert@intevation.de> * build.xml: Set the classpath for the executabel jar file. The path to
--- a/src/java/de/intevation/mxd/reader/MapReader.java Tue May 17 11:55:03 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/MapReader.java Tue May 17 13:00:10 2011 +0200 @@ -95,7 +95,7 @@ case 5: s_units = "miles"; break; case 6: s_units = "nauticalmiles"; break; case 2: s_units = "points"; break; - default : s_units = "not supported"; break; + default : s_units = "meters"; break; } mapElement.setAttribute("units", s_units); @@ -117,7 +117,12 @@ } else if(sr instanceof UnknownCoordinateSystem) { UnknownCoordinateSystem ucs = (UnknownCoordinateSystem)sr; - mapElement.setAttribute("projection", sr.getName()); + if (sr.getName().equals("Unknown")) { + mapElement.setAttribute ("projection", "EPSG:31467"); + } + else { + mapElement.setAttribute("projection", sr.getName()); + } } else{ throw new IOException("Unknown SpatialReference: " +
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Tue May 17 11:55:03 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Tue May 17 13:00:10 2011 +0200 @@ -127,7 +127,7 @@ msu = MS_UNITS.MS_PIXELS; } else { - msu = MS_UNITS.MS_DD; + msu = MS_UNITS.MS_METERS; } map.setUnits(msu);