comparison src/java/de/intevation/mxd/reader/MapReader.java @ 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 ef7ca23c4233
children 9f74f4d36822
comparison
equal deleted inserted replaced
56:08913299e34f 57:8da6555f1c12
93 case 10: s_units = "kilometers"; break; 93 case 10: s_units = "kilometers"; break;
94 case 9: s_units = "meters"; break; 94 case 9: s_units = "meters"; break;
95 case 5: s_units = "miles"; break; 95 case 5: s_units = "miles"; break;
96 case 6: s_units = "nauticalmiles"; break; 96 case 6: s_units = "nauticalmiles"; break;
97 case 2: s_units = "points"; break; 97 case 2: s_units = "points"; break;
98 default : s_units = "not supported"; break; 98 default : s_units = "meters"; break;
99 } 99 }
100 mapElement.setAttribute("units", s_units); 100 mapElement.setAttribute("units", s_units);
101 101
102 //TODO: Find out whats the correct scale value. 102 //TODO: Find out whats the correct scale value.
103 mapElement.setAttribute( 103 mapElement.setAttribute(
115 GeographicCoordinateSystem gcs = (GeographicCoordinateSystem)sr; 115 GeographicCoordinateSystem gcs = (GeographicCoordinateSystem)sr;
116 mapElement.setAttribute("projection", gcs.getName()); 116 mapElement.setAttribute("projection", gcs.getName());
117 } 117 }
118 else if(sr instanceof UnknownCoordinateSystem) { 118 else if(sr instanceof UnknownCoordinateSystem) {
119 UnknownCoordinateSystem ucs = (UnknownCoordinateSystem)sr; 119 UnknownCoordinateSystem ucs = (UnknownCoordinateSystem)sr;
120 mapElement.setAttribute("projection", sr.getName()); 120 if (sr.getName().equals("Unknown")) {
121 mapElement.setAttribute ("projection", "EPSG:31467");
122 }
123 else {
124 mapElement.setAttribute("projection", sr.getName());
125 }
121 } 126 }
122 else{ 127 else{
123 throw new IOException("Unknown SpatialReference: " + 128 throw new IOException("Unknown SpatialReference: " +
124 sr.getClass().toString()); 129 sr.getClass().toString());
125 } 130 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)