comparison flys-artifacts/src/main/java/de/intevation/flys/mapserver/MapfileGenerator.java @ 5087:cbfdd7376009 mapgenfix

ArtifactMapfileGenerator can now generate user shape mapfiles again.
author Christian Lins <christian.lins@intevation.de>
date Mon, 25 Feb 2013 11:51:17 +0100
parents cc50e1b9fc60
children cfc5540a4eec
comparison
equal deleted inserted replaced
5076:cc50e1b9fc60 5087:cbfdd7376009
238 throws FileNotFoundException, IOException 238 throws FileNotFoundException, IOException
239 { 239 {
240 File baseDir = getShapefileBaseDir(); 240 File baseDir = getShapefileBaseDir();
241 File[] artifactDirs = baseDir.listFiles(); 241 File[] artifactDirs = baseDir.listFiles();
242 242
243 logger.debug("getProjectDirs(): found " + artifactDirs.length + " project directories");
243 return artifactDirs; 244 return artifactDirs;
244 } 245 }
245 246
246 247
247 /** 248 /**
255 256
256 for (File dir: dirs) { 257 for (File dir: dirs) {
257 File[] layerFiles = dir.listFiles(new FilenameFilter() { 258 File[] layerFiles = dir.listFiles(new FilenameFilter() {
258 @Override 259 @Override
259 public boolean accept(File directory, String name) { 260 public boolean accept(File directory, String name) {
260 return name.startsWith(MS_PREFIX_BARRIERS) || 261 return name.endsWith(".shp") &&
261 name.startsWith(MS_PREFIX_USER) || 262 (name.startsWith(MS_PREFIX_BARRIERS) ||
262 name.startsWith(MS_PREFIX_WSPLGEN); 263 name.startsWith(MS_PREFIX_USER) ||
264 name.startsWith(MS_PREFIX_WSPLGEN));
263 } 265 }
264 }); 266 });
265 267
266 for (File layer: layerFiles) { 268 for (File layer: layerFiles) {
267 shapes.add(layer); 269 shapes.add(layer);
268 } 270 }
269 } 271 }
270 272
273 logger.debug("searchForLayerShapes(): found " + shapes.size() + " shapefiles");
271 return shapes; 274 return shapes;
272 } 275 }
273 276
274 277
275 /** 278 /**

http://dive4elements.wald.intevation.org