comparison gnv-artifacts/src/main/java/de/intevation/gnv/raster/JTSMultiPolygonProducer.java @ 495:6e8364e766fa

Generate JTS geometries of "Horizontalschnitte" correctly. gnv-artifacts/trunk@572 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 19 Jan 2010 14:06:10 +0000
parents f7038820df2e
children 4080b57dcb52
comparison
equal deleted inserted replaced
494:292f0c8d356c 495:6e8364e766fa
113 do { 113 do {
114 vertices.add(new Coordinate( 114 vertices.add(new Coordinate(
115 m1*(current.a % width) + b1, 115 m1*(current.a % width) + b1,
116 m2*(current.a / width) + b2)); 116 m2*(current.a / width) + b2));
117 } 117 }
118 while ((current = current.next) != head); 118 while ((current = current.prev) != head);
119 vertices.add(new Coordinate( 119 vertices.add(new Coordinate(
120 m1*(head.a % width) + b1, 120 m1*(head.a % width) + b1,
121 m2*(head.a / width) + b2)); 121 m2*(head.a / width) + b2));
122 122
123 Coordinate [] coordinates = 123 Coordinate [] coordinates =
138 138
139 if (shell == null) { 139 if (shell == null) {
140 log.error("polygon has no shell"); 140 log.error("polygon has no shell");
141 return; 141 return;
142 } 142 }
143
144 log.debug("polygon has a shell");
143 145
144 Polygon polygon = geometryFactory.createPolygon( 146 Polygon polygon = geometryFactory.createPolygon(
145 shell, 147 shell,
146 holes.toArray(new LinearRing[holes.size()])); 148 holes.toArray(new LinearRing[holes.size()]));
147 149

http://dive4elements.wald.intevation.org