annotate gnv-artifacts/src/main/java/de/intevation/gnv/raster/DemuxRingsHandler.java @ 646:c8749d83d9b6

Added a configuration section for mapserver relevant stuff. Moved source to write meta files out to an own helper class named MetaWriter. gnv-artifacts/trunk@733 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 04 Mar 2010 16:23:24 +0000
parents f7038820df2e
children 9a828e5a2390
rev   line source
465
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.raster;
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 import java.util.ArrayList;
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4 import java.util.List;
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6 import de.intevation.gnv.raster.Vectorizer.RingsHandler;
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 import de.intevation.gnv.raster.Vectorizer.Edge;
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 /**
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 */
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 public class DemuxRingsHandler
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 implements RingsHandler
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 {
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 protected ArrayList<RingsHandler> handlers;
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 public DemuxRingsHandler() {
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 handlers = new ArrayList<RingsHandler>();
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 }
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 public void addHandler(RingsHandler handler) {
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 handlers.add(handler);
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 }
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 public void handleRings(
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 List<Edge> rings,
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27 int value,
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 int width,
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 int height
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 ) {
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 for (RingsHandler handler: handlers) {
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 handler.handleRings(rings, value, width, height);
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 }
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 }
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 public void clear() {
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 handlers.clear();
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 }
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 }
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org