comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 1124:28a595b32980

Set the 'typ' attribute of lines and polygons in barrier shapefiles while shapefile creation. flys-artifacts/trunk@2633 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 01 Sep 2011 12:47:01 +0000
parents be9bb260b835
children 6b9877a9f6c1
comparison
equal deleted inserted replaced
1123:be9bb260b835 1124:28a595b32980
302 FeatureCollection[] fcs = splitLinesAndPolygons(features); 302 FeatureCollection[] fcs = splitLinesAndPolygons(features);
303 303
304 File shapeLines = new File(dir, WSPLGEN_BARRIERS_LINES); 304 File shapeLines = new File(dir, WSPLGEN_BARRIERS_LINES);
305 File shapePolys = new File(dir, WSPLGEN_BARRIERS_POLY); 305 File shapePolys = new File(dir, WSPLGEN_BARRIERS_POLY);
306 306
307 Object[][] obj = new Object[][] {
308 new Object[] { "typ", String.class }
309 };
310
307 boolean l = GeometryUtils.writeShapefile( 311 boolean l = GeometryUtils.writeShapefile(
308 shapeLines, 312 shapeLines,
309 GeometryUtils.buildFeatureType("lines", srs, LineString.class), 313 GeometryUtils.buildFeatureType("lines", srs, LineString.class, obj),
310 fcs[0]); 314 fcs[0]);
311 315
312 if (l) { 316 if (l) {
313 logger.debug( 317 logger.debug(
314 "Successfully created barrier line shapefile. " + 318 "Successfully created barrier line shapefile. " +
316 job.addLin(shapeLines.getAbsolutePath()); 320 job.addLin(shapeLines.getAbsolutePath());
317 } 321 }
318 322
319 boolean p = GeometryUtils.writeShapefile( 323 boolean p = GeometryUtils.writeShapefile(
320 shapePolys, 324 shapePolys,
321 GeometryUtils.buildFeatureType("polygons", srs, Polygon.class), 325 GeometryUtils.buildFeatureType("polygons", srs, Polygon.class, obj),
322 fcs[1]); 326 fcs[1]);
323 327
324 if (p) { 328 if (p) {
325 logger.debug( 329 logger.debug(
326 "Successfully created barrier polygon shapefile. " + 330 "Successfully created barrier polygon shapefile. " +

http://dive4elements.wald.intevation.org