Changeset 31027 in osm for applications/editors/josm/plugins
- Timestamp:
- 2015-02-19T21:52:40+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/seachart
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/jrender/src/jrender/Jrender.java
r30894 r31027 33 33 import render.ChartContext; 34 34 import render.Renderer; 35 import render.Rules; 35 36 import s57.S57map; 36 37 import s57.S57map.Feature; … … 154 155 } 155 156 } else if (ln.contains("</osm")) { 157 map.mapDone(); 156 158 inOsm = false; 157 159 break; … … 167 169 type = (token.split("[\"\']")[1]); 168 170 } else if (token.matches("^role=.+")) { 169 role = (token.split("[\"\']")[1]); 171 String str[] = token.split("[\"\']"); 172 if (str.length > 1) { 173 role = (token.split("[\"\']")[1]); 174 } 170 175 } 171 176 } … … 193 198 inOsm = true; 194 199 map = new S57map(); 200 map.addNode(1, maxlat, minlon); 201 map.addNode(2, minlat, minlon); 202 map.addNode(3, minlat, maxlon); 203 map.addNode(4, maxlat, maxlon); 204 map.bounds.minlat = Math.toRadians(minlat); 205 map.bounds.maxlat = Math.toRadians(maxlat); 206 map.bounds.minlon = Math.toRadians(minlon); 207 map.bounds.maxlon = Math.toRadians(maxlon); 195 208 } 196 209 } 197 210 198 img = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB); 211 /* img = new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB); 199 212 Renderer.reRender(img.createGraphics(), 12, 1, map, context); 200 213 ByteArrayOutputStream bos = new ByteArrayOutputStream(); … … 202 215 empty = bos.size(); 203 216 tile(zoom, 1, 0, 0); 204 205 for (int z = 12; z <= 18; z++) { 217 */ 218 // for (int z = 12; z <= 18; z++) { 219 int z = 9; 206 220 DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation(); 207 221 Document document = domImpl.createDocument("http://www.w3.org/2000/svg", "svg", null); 208 222 SVGGraphics2D svgGenerator = new SVGGraphics2D(document); 209 svgGenerator.setSVGCanvasSize(new Dimension(256, 256)); 210 svgGenerator.setClip(0, 0, 256, 256); 211 svgGenerator.translate(-256, -256); 212 Renderer.reRender(svgGenerator, z, 1, map, context); 223 svgGenerator.setBackground(Rules.Bwater); 224 svgGenerator.clearRect(0, 0, 2048, 2048); 225 svgGenerator.setSVGCanvasSize(new Dimension(2048, 2048)); 226 svgGenerator.setClip(0, 0, 2048, 2048); 227 // svgGenerator.translate(-2048, -2048); 228 Renderer.reRender(svgGenerator, z, 0.05, map, context); 213 229 svgGenerator.stream(dstdir + "tst_" + z + ".svg"); 214 } 230 // } 215 231 } 216 232 … … 281 297 send = new ArrayList<String>(); 282 298 deletes = new HashMap<String, Boolean>(); 283 BufferedReader in = new BufferedReader(new FileReader(srcdir + xtile + "-" + ytile + "-" + zoom+ ".osm"));299 BufferedReader in = new BufferedReader(new FileReader(srcdir + zoom + "-" + xtile + "-" + ytile + ".osm")); 284 300 String ln; 285 301 while ((ln = in.readLine()) != null) { -
applications/editors/josm/plugins/seachart/src/render/Renderer.java
r31014 r31027 16 16 import java.util.*; 17 17 18 import render.Rules.*; 18 19 import s57.S57val.*; 19 20 import s57.S57map; 21 import s57.S57obj.Obj; 20 22 import s57.S57map.*; 21 23 import symbols.Areas; … … 45 47 g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP); 46 48 g2.setStroke(new BasicStroke(0, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER)); 47 Rules.rules(); 49 Rules.rules(RuleSet.BASE); 48 50 } 49 51 } … … 267 269 } 268 270 } 271 if ((style.fill != null) && (feature.geom.prim == Pflag.AREA)) { 272 g2.setPaint(style.fill); 273 g2.fill(p); 274 } 269 275 if (style.line != null) { 270 276 if (style.dash != null) { … … 276 282 g2.setStroke(new BasicStroke((float) (style.width * sScale), BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 1, dash, 0)); 277 283 } else { 278 g2.setStroke(new BasicStroke((float) (style.width * sScale), BasicStroke.CAP_ BUTT, BasicStroke.JOIN_ROUND));284 g2.setStroke(new BasicStroke((float) (style.width * sScale), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); 279 285 } 280 286 g2.setPaint(style.line); 281 287 g2.draw(p); 282 }283 if (style.fill != null) {284 g2.setPaint(style.fill);285 g2.fill(p);286 288 } 287 289 } -
applications/editors/josm/plugins/seachart/src/render/Rules.java
r31014 r31027 27 27 28 28 public class Rules { 29 30 public enum RuleSet { ALL, BASE, SEAMARK } 29 31 30 32 public static final Color Yland = new Color(0xdcb820); … … 65 67 } 66 68 67 static String getName( Feature feature) {69 static String getName() { 68 70 AttVal<?> name = feature.atts.get(Att.OBJNAM); 69 71 if (name == null) { … … 87 89 public static void addName(Feature feature, int z, Font font, Color colour, Delta delta) { 88 90 if (Renderer.zoom >= z) { 89 String name = getName( feature);91 String name = getName(); 90 92 if (name != null) { 91 93 Renderer.labelText(feature, name, font, colour, delta); … … 175 177 } 176 178 177 public static void rules () { 178 ArrayList<Feature> objects; 179 if ((objects = Renderer.map.features.get(Obj.LNDARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 180 if ((objects = Renderer.map.features.get(Obj.LAKARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 181 if ((objects = Renderer.map.features.get(Obj.RIVBNK)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 182 if ((objects = Renderer.map.features.get(Obj.RIVERS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) waterways(feature); 183 if ((objects = Renderer.map.features.get(Obj.CANALS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) waterways(feature); 184 if ((objects = Renderer.map.features.get(Obj.DOCARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 185 if ((objects = Renderer.map.features.get(Obj.DEPARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 186 if ((objects = Renderer.map.features.get(Obj.COALNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 187 if ((objects = Renderer.map.features.get(Obj.SLCONS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) shoreline(feature); 188 if ((objects = Renderer.map.features.get(Obj.PIPSOL)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) pipelines(feature); 189 if ((objects = Renderer.map.features.get(Obj.CBLSUB)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) cables(feature); 190 if ((objects = Renderer.map.features.get(Obj.PIPOHD)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) pipelines(feature); 191 if ((objects = Renderer.map.features.get(Obj.CBLOHD)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) cables(feature); 192 if ((objects = Renderer.map.features.get(Obj.TSEZNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 193 if ((objects = Renderer.map.features.get(Obj.TSSCRS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 194 if ((objects = Renderer.map.features.get(Obj.TSSRON)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 195 if ((objects = Renderer.map.features.get(Obj.TSELNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 196 if ((objects = Renderer.map.features.get(Obj.TSSLPT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 197 if ((objects = Renderer.map.features.get(Obj.TSSBND)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 198 if ((objects = Renderer.map.features.get(Obj.ISTZNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) separation(feature); 199 if ((objects = Renderer.map.features.get(Obj.SNDWAV)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 200 if ((objects = Renderer.map.features.get(Obj.OSPARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 201 if ((objects = Renderer.map.features.get(Obj.FAIRWY)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 202 if ((objects = Renderer.map.features.get(Obj.DRGARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 203 if ((objects = Renderer.map.features.get(Obj.RESARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 204 if ((objects = Renderer.map.features.get(Obj.SPLARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 205 if ((objects = Renderer.map.features.get(Obj.SEAARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 206 if ((objects = Renderer.map.features.get(Obj.OBSTRN)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) obstructions(feature); 207 if ((objects = Renderer.map.features.get(Obj.UWTROC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) obstructions(feature); 208 if ((objects = Renderer.map.features.get(Obj.MARCUL)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) areas(feature); 209 if ((objects = Renderer.map.features.get(Obj.RECTRC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) transits(feature); 210 if ((objects = Renderer.map.features.get(Obj.NAVLNE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) transits(feature); 211 if ((objects = Renderer.map.features.get(Obj.HRBFAC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) harbours(feature); 212 if ((objects = Renderer.map.features.get(Obj.ACHARE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) harbours(feature); 213 if ((objects = Renderer.map.features.get(Obj.ACHBRT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) harbours(feature); 214 if ((objects = Renderer.map.features.get(Obj.BERTHS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) harbours(feature); 215 if ((objects = Renderer.map.features.get(Obj.LOKBSN)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) locks(feature); 216 if ((objects = Renderer.map.features.get(Obj.LKBSPT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) locks(feature); 217 if ((objects = Renderer.map.features.get(Obj.GATCON)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) locks(feature); 218 if ((objects = Renderer.map.features.get(Obj.DISMAR)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) distances(feature); 219 if ((objects = Renderer.map.features.get(Obj.HULKES)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) ports(feature); 220 if ((objects = Renderer.map.features.get(Obj.CRANES)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) ports(feature); 221 if ((objects = Renderer.map.features.get(Obj.LNDMRK)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) landmarks(feature); 222 if ((objects = Renderer.map.features.get(Obj.BUISGL)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) harbours(feature); 223 if ((objects = Renderer.map.features.get(Obj.MORFAC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) moorings(feature); 224 if ((objects = Renderer.map.features.get(Obj.NOTMRK)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) notices(feature); 225 if ((objects = Renderer.map.features.get(Obj.SMCFAC)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) marinas(feature); 226 if ((objects = Renderer.map.features.get(Obj.BRIDGE)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) bridges(feature); 227 if ((objects = Renderer.map.features.get(Obj.PILPNT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) lights(feature); 228 if ((objects = Renderer.map.features.get(Obj.RDOCAL)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) callpoint(feature); 229 if ((objects = Renderer.map.features.get(Obj.LITMIN)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) lights(feature); 230 if ((objects = Renderer.map.features.get(Obj.LITMAJ)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) lights(feature); 231 if ((objects = Renderer.map.features.get(Obj.LIGHTS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) lights(feature); 232 if ((objects = Renderer.map.features.get(Obj.SISTAT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 233 if ((objects = Renderer.map.features.get(Obj.SISTAW)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 234 if ((objects = Renderer.map.features.get(Obj.CGUSTA)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 235 if ((objects = Renderer.map.features.get(Obj.RDOSTA)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 236 if ((objects = Renderer.map.features.get(Obj.RADSTA)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 237 if ((objects = Renderer.map.features.get(Obj.RTPBCN)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 238 if ((objects = Renderer.map.features.get(Obj.RSCSTA)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 239 if ((objects = Renderer.map.features.get(Obj.PILBOP)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) stations(feature); 240 if ((objects = Renderer.map.features.get(Obj.WTWGAG)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) gauges(feature); 241 if ((objects = Renderer.map.features.get(Obj.OFSPLF)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) platforms(feature); 242 if ((objects = Renderer.map.features.get(Obj.WRECKS)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) wrecks(feature); 243 if ((objects = Renderer.map.features.get(Obj.LITVES)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) floats(feature); 244 if ((objects = Renderer.map.features.get(Obj.LITFLT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) floats(feature); 245 if ((objects = Renderer.map.features.get(Obj.BOYINB)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) floats(feature); 246 if ((objects = Renderer.map.features.get(Obj.BOYLAT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) buoys(feature); 247 if ((objects = Renderer.map.features.get(Obj.BOYCAR)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) buoys(feature); 248 if ((objects = Renderer.map.features.get(Obj.BOYISD)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) buoys(feature); 249 if ((objects = Renderer.map.features.get(Obj.BOYSAW)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) buoys(feature); 250 if ((objects = Renderer.map.features.get(Obj.BOYSPP)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) buoys(feature); 251 if ((objects = Renderer.map.features.get(Obj.BOYWTW)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) buoys(feature); 252 if ((objects = Renderer.map.features.get(Obj.BCNLAT)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) beacons(feature); 253 if ((objects = Renderer.map.features.get(Obj.BCNCAR)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) beacons(feature); 254 if ((objects = Renderer.map.features.get(Obj.BCNISD)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) beacons(feature); 255 if ((objects = Renderer.map.features.get(Obj.BCNSAW)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) beacons(feature); 256 if ((objects = Renderer.map.features.get(Obj.BCNSPP)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) beacons(feature); 257 if ((objects = Renderer.map.features.get(Obj.BCNWTW)) != null) for (Feature feature : objects) if (feature.reln == Rflag.MASTER) beacons(feature); 258 } 259 260 private static void areas(Feature feature) { 261 String name = getName(feature); 179 static Feature feature; 180 static ArrayList<Feature> objects; 181 static RuleSet ruleset; 182 static boolean testObject(Obj obj) { 183 return ((objects = Renderer.map.features.get(obj)) != null); 184 } 185 186 static boolean testFeature(Feature f) { 187 return ((feature = f).reln == Rflag.MASTER); 188 } 189 190 public static void rules (RuleSet set) { 191 ruleset = set; 192 if ((set == RuleSet.ALL) || (set == RuleSet.BASE)) { 193 if (testObject(Obj.LNDARE)) for (Feature f : objects) if (testFeature(f)) areas(); 194 if (testObject(Obj.BUAARE)) for (Feature f : objects) if (testFeature(f)) areas(); 195 if (testObject(Obj.HRBFAC)) for (Feature f : objects) if (testFeature(f)) areas(); 196 if (testObject(Obj.HRBBSN)) for (Feature f : objects) if (testFeature(f)) areas(); 197 if (testObject(Obj.LOKBSN)) for (Feature f : objects) if (testFeature(f)) areas(); 198 if (testObject(Obj.LKBSPT)) for (Feature f : objects) if (testFeature(f)) areas(); 199 if (testObject(Obj.LAKARE)) for (Feature f : objects) if (testFeature(f)) areas(); 200 if (testObject(Obj.RIVBNK)) for (Feature f : objects) if (testFeature(f)) areas(); 201 if (testObject(Obj.RIVERS)) for (Feature f : objects) if (testFeature(f)) waterways(); 202 if (testObject(Obj.CANALS)) for (Feature f : objects) if (testFeature(f)) waterways(); 203 if (testObject(Obj.DEPARE)) for (Feature f : objects) if (testFeature(f)) areas(); 204 if (testObject(Obj.COALNE)) for (Feature f : objects) if (testFeature(f)) areas(); 205 if (testObject(Obj.ROADWY)) for (Feature f : objects) if (testFeature(f)) highways(); 206 if (testObject(Obj.RAILWY)) for (Feature f : objects) if (testFeature(f)) highways(); 207 } 208 if (testObject(Obj.SLCONS)) for (Feature f : objects) if (testFeature(f)) shoreline(); 209 if ((set == RuleSet.ALL) || (set == RuleSet.SEAMARK)) { 210 if (testObject(Obj.PIPSOL)) for (Feature f : objects) if (testFeature(f)) pipelines(); 211 if (testObject(Obj.CBLSUB)) for (Feature f : objects) if (testFeature(f)) cables(); 212 if (testObject(Obj.PIPOHD)) for (Feature f : objects) if (testFeature(f)) pipelines(); 213 if (testObject(Obj.CBLOHD)) for (Feature f : objects) if (testFeature(f)) cables(); 214 if (testObject(Obj.TSEZNE)) for (Feature f : objects) if (testFeature(f)) separation(); 215 if (testObject(Obj.TSSCRS)) for (Feature f : objects) if (testFeature(f)) separation(); 216 if (testObject(Obj.TSSRON)) for (Feature f : objects) if (testFeature(f)) separation(); 217 if (testObject(Obj.TSELNE)) for (Feature f : objects) if (testFeature(f)) separation(); 218 if (testObject(Obj.TSSLPT)) for (Feature f : objects) if (testFeature(f)) separation(); 219 if (testObject(Obj.TSSBND)) for (Feature f : objects) if (testFeature(f)) separation(); 220 if (testObject(Obj.ISTZNE)) for (Feature f : objects) if (testFeature(f)) separation(); 221 if (testObject(Obj.SNDWAV)) for (Feature f : objects) if (testFeature(f)) areas(); 222 if (testObject(Obj.OSPARE)) for (Feature f : objects) if (testFeature(f)) areas(); 223 if (testObject(Obj.FAIRWY)) for (Feature f : objects) if (testFeature(f)) areas(); 224 if (testObject(Obj.DRGARE)) for (Feature f : objects) if (testFeature(f)) areas(); 225 if (testObject(Obj.RESARE)) for (Feature f : objects) if (testFeature(f)) areas(); 226 if (testObject(Obj.SPLARE)) for (Feature f : objects) if (testFeature(f)) areas(); 227 if (testObject(Obj.SEAARE)) for (Feature f : objects) if (testFeature(f)) areas(); 228 if (testObject(Obj.OBSTRN)) for (Feature f : objects) if (testFeature(f)) obstructions(); 229 if (testObject(Obj.UWTROC)) for (Feature f : objects) if (testFeature(f)) obstructions(); 230 if (testObject(Obj.MARCUL)) for (Feature f : objects) if (testFeature(f)) areas(); 231 if (testObject(Obj.RECTRC)) for (Feature f : objects) if (testFeature(f)) transits(); 232 if (testObject(Obj.NAVLNE)) for (Feature f : objects) if (testFeature(f)) transits(); 233 if (testObject(Obj.HRBFAC)) for (Feature f : objects) if (testFeature(f)) harbours(); 234 if (testObject(Obj.ACHARE)) for (Feature f : objects) if (testFeature(f)) harbours(); 235 if (testObject(Obj.ACHBRT)) for (Feature f : objects) if (testFeature(f)) harbours(); 236 if (testObject(Obj.BERTHS)) for (Feature f : objects) if (testFeature(f)) harbours(); 237 if (testObject(Obj.DISMAR)) for (Feature f : objects) if (testFeature(f)) distances(); 238 if (testObject(Obj.HULKES)) for (Feature f : objects) if (testFeature(f)) ports(); 239 if (testObject(Obj.CRANES)) for (Feature f : objects) if (testFeature(f)) ports(); 240 if (testObject(Obj.LNDMRK)) for (Feature f : objects) if (testFeature(f)) landmarks(); 241 if (testObject(Obj.BUISGL)) for (Feature f : objects) if (testFeature(f)) harbours(); 242 if (testObject(Obj.MORFAC)) for (Feature f : objects) if (testFeature(f)) moorings(); 243 if (testObject(Obj.NOTMRK)) for (Feature f : objects) if (testFeature(f)) notices(); 244 if (testObject(Obj.SMCFAC)) for (Feature f : objects) if (testFeature(f)) marinas(); 245 if (testObject(Obj.BRIDGE)) for (Feature f : objects) if (testFeature(f)) bridges(); 246 if (testObject(Obj.PILPNT)) for (Feature f : objects) if (testFeature(f)) lights(); 247 if (testObject(Obj.RDOCAL)) for (Feature f : objects) if (testFeature(f)) callpoint(); 248 if (testObject(Obj.LITMIN)) for (Feature f : objects) if (testFeature(f)) lights(); 249 if (testObject(Obj.LITMAJ)) for (Feature f : objects) if (testFeature(f)) lights(); 250 if (testObject(Obj.LIGHTS)) for (Feature f : objects) if (testFeature(f)) lights(); 251 if (testObject(Obj.SISTAT)) for (Feature f : objects) if (testFeature(f)) stations(); 252 if (testObject(Obj.SISTAW)) for (Feature f : objects) if (testFeature(f)) stations(); 253 if (testObject(Obj.CGUSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 254 if (testObject(Obj.RDOSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 255 if (testObject(Obj.RADSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 256 if (testObject(Obj.RTPBCN)) for (Feature f : objects) if (testFeature(f)) stations(); 257 if (testObject(Obj.RSCSTA)) for (Feature f : objects) if (testFeature(f)) stations(); 258 if (testObject(Obj.PILBOP)) for (Feature f : objects) if (testFeature(f)) stations(); 259 if (testObject(Obj.WTWGAG)) for (Feature f : objects) if (testFeature(f)) gauges(); 260 if (testObject(Obj.OFSPLF)) for (Feature f : objects) if (testFeature(f)) platforms(); 261 if (testObject(Obj.WRECKS)) for (Feature f : objects) if (testFeature(f)) wrecks(); 262 if (testObject(Obj.LITVES)) for (Feature f : objects) if (testFeature(f)) floats(); 263 if (testObject(Obj.LITFLT)) for (Feature f : objects) if (testFeature(f)) floats(); 264 if (testObject(Obj.BOYINB)) for (Feature f : objects) if (testFeature(f)) floats(); 265 if (testObject(Obj.BOYLAT)) for (Feature f : objects) if (testFeature(f)) buoys(); 266 if (testObject(Obj.BOYCAR)) for (Feature f : objects) if (testFeature(f)) buoys(); 267 if (testObject(Obj.BOYISD)) for (Feature f : objects) if (testFeature(f)) buoys(); 268 if (testObject(Obj.BOYSAW)) for (Feature f : objects) if (testFeature(f)) buoys(); 269 if (testObject(Obj.BOYSPP)) for (Feature f : objects) if (testFeature(f)) buoys(); 270 if (testObject(Obj.BOYWTW)) for (Feature f : objects) if (testFeature(f)) buoys(); 271 if (testObject(Obj.BCNLAT)) for (Feature f : objects) if (testFeature(f)) beacons(); 272 if (testObject(Obj.BCNCAR)) for (Feature f : objects) if (testFeature(f)) beacons(); 273 if (testObject(Obj.BCNISD)) for (Feature f : objects) if (testFeature(f)) beacons(); 274 if (testObject(Obj.BCNSAW)) for (Feature f : objects) if (testFeature(f)) beacons(); 275 if (testObject(Obj.BCNSPP)) for (Feature f : objects) if (testFeature(f)) beacons(); 276 if (testObject(Obj.BCNWTW)) for (Feature f : objects) if (testFeature(f)) beacons(); 277 } 278 } 279 280 private static void areas() { 281 String name = getName(); 262 282 switch (feature.type) { 283 case BUAARE: 284 Renderer.lineVector(feature, new LineStyle(new Color(0x40000000, true))); 285 break; 263 286 case COALNE: 264 287 Renderer.lineVector(feature, new LineStyle(Color.black, 10)); … … 270 293 } 271 294 break; 272 case DOCARE:273 295 case LAKARE: 274 296 case RIVBNK: 275 Renderer.lineVector(feature, new LineStyle(Bwater)); 297 Renderer.lineVector(feature, new LineStyle(Bwater, 10, Bwater)); 276 298 break; 277 299 case DRGARE: … … 291 313 if (Renderer.zoom >= 14) 292 314 Renderer.lineVector(feature, new LineStyle(new Color(0x40ffffff, true))); 315 } 316 break; 317 case LKBSPT: 318 case LOKBSN: 319 case HRBBSN: 320 Renderer.lineVector(feature, new LineStyle(Color.black, 10, Bwater)); 321 break; 322 case HRBFAC: 323 if (feature.objs.get(Obj.HRBBSN) != null) { 324 Renderer.lineVector(feature, new LineStyle(Color.black, 10, Bwater)); 293 325 } 294 326 break; … … 384 416 } 385 417 386 private static void beacons( Feature feature) {418 private static void beacons() { 387 419 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BCNLAT) || (feature.type == Obj.BCNCAR)))) { 388 420 BcnSHP shape = (BcnSHP)getAttEnum(feature, feature.type, 0, Att.BCNSHP); … … 427 459 } 428 460 429 private static void buoys( Feature feature) {461 private static void buoys() { 430 462 if ((Renderer.zoom >= 14) || ((Renderer.zoom >= 12) && ((feature.type == Obj.BOYLAT) || (feature.type == Obj.BOYCAR)))) { 431 463 BoySHP shape = (BoySHP) getAttEnum(feature, feature.type, 0, Att.BOYSHP); … … 451 483 } 452 484 453 private static void bridges( Feature feature) {485 private static void bridges() { 454 486 if (Renderer.zoom >= 16) { 455 487 double verclr, verccl, vercop, horclr; … … 490 522 } 491 523 492 private static void cables( Feature feature) {524 private static void cables() { 493 525 if ((Renderer.zoom >= 16) && (feature.geom.length < 2)) { 494 526 if (feature.type == Obj.CBLSUB) { … … 512 544 } 513 545 514 private static void callpoint( Feature feature) {546 private static void callpoint() { 515 547 if (Renderer.zoom >= 14) { 516 548 Symbol symb = Harbours.CallPoint2; … … 531 563 } 532 564 533 private static void distances( Feature feature) {565 private static void distances() { 534 566 if (Renderer.zoom >= 14) { 535 567 if (!testAttribute(feature, Obj.DISMAR, 0, Att.CATDIS, CatDIS.DIS_NONI)) { … … 574 606 } 575 607 576 private static void floats( Feature feature) {608 private static void floats() { 577 609 switch (feature.type) { 578 610 case LITVES: … … 593 625 } 594 626 595 private static void gauges( Feature feature) {627 private static void gauges() { 596 628 if (Renderer.zoom >= 14) { 597 629 Renderer.symbol(feature, Harbours.TideGauge); … … 600 632 } 601 633 602 private static void harbours( Feature feature) {603 String name = getName( feature);634 private static void harbours() { 635 String name = getName(); 604 636 switch (feature.type) { 605 637 case ACHBRT: … … 717 749 } 718 750 719 private static void landmarks(Feature feature) { 751 private static void highways() { 752 switch (feature.type) { 753 case ROADWY: 754 ArrayList<CatROD> cat = (ArrayList<CatROD>) (getAttList(feature, Obj.ROADWY, 0, Att.CATROD)); 755 if (cat.size() > 0) { 756 switch (cat.get(0)) { 757 case ROD_MWAY: 758 Renderer.lineVector(feature, new LineStyle(Color.black, 20)); 759 break; 760 case ROD_MAJR: 761 Renderer.lineVector(feature, new LineStyle(Color.black, 15)); 762 break; 763 case ROD_MINR: 764 Renderer.lineVector(feature, new LineStyle(Color.black, 10)); 765 break; 766 default: 767 Renderer.lineVector(feature, new LineStyle(Color.black, 5)); 768 } 769 } else { 770 Renderer.lineVector(feature, new LineStyle(Color.black, 5)); 771 } 772 break; 773 case RAILWY: 774 Renderer.lineVector(feature, new LineStyle(Color.gray, 10)); 775 Renderer.lineVector(feature, new LineStyle(Color.black, 10, new float[] { 30, 30 })); 776 break; 777 default: 778 } 779 } 780 781 private static void landmarks() { 720 782 ArrayList<CatLMK> cats = (ArrayList<CatLMK>) getAttList(feature, feature.type, 0, Att.CATLMK); 721 783 Symbol catSym = Landmarks.Shapes.get(cats.get(0)); … … 734 796 } 735 797 736 private static void lights( Feature feature) {798 private static void lights() { 737 799 switch (feature.type) { 738 800 case LITMAJ: … … 764 826 } 765 827 766 private static void locks(Feature feature) { 767 } 768 769 private static void marinas(Feature feature) { 828 private static void marinas() { 770 829 if (Renderer.zoom >= 16) { 771 830 ArrayList<Symbol> symbols = new ArrayList<Symbol>(); … … 778 837 } 779 838 780 private static void moorings( Feature feature) {839 private static void moorings() { 781 840 switch ((CatMOR) getAttEnum(feature, feature.type, 0, Att.CATMOR)) { 782 841 case MOR_DLPN: … … 804 863 } 805 864 806 private static void notices( Feature feature) {865 private static void notices() { 807 866 if (Renderer.zoom >= 14) { 808 867 double dx = 0.0, dy = 0.0; … … 871 930 } 872 931 873 private static void obstructions( Feature feature) {932 private static void obstructions() { 874 933 if ((Renderer.zoom >= 12) && (feature.type == Obj.OBSTRN)) { 875 934 switch ((CatOBS) getAttEnum(feature, feature.type, 0, Att.CATOBS)) { … … 899 958 } 900 959 901 private static void pipelines( Feature feature) {960 private static void pipelines() { 902 961 if ((Renderer.zoom >= 16) && (feature.geom.length < 2)) { 903 962 if (feature.type == Obj.PIPSOL) { … … 921 980 } 922 981 923 private static void platforms( Feature feature) {982 private static void platforms() { 924 983 ArrayList<CatOFP> cats = (ArrayList<CatOFP>) getAttList(feature, Obj.OFSPLF, 0, Att.CATOFP); 925 984 if ((CatOFP) cats.get(0) == CatOFP.OFP_FPSO) … … 931 990 } 932 991 933 private static void ports( Feature feature) {992 private static void ports() { 934 993 if (Renderer.zoom >= 14) { 935 994 if (feature.type == Obj.CRANES) { … … 945 1004 } 946 1005 947 private static void separation( Feature feature) {1006 private static void separation() { 948 1007 switch (feature.type) { 949 1008 case TSEZNE: … … 973 1032 } 974 1033 975 private static void shoreline(Feature feature) { 976 if (Renderer.zoom >= 12) { 977 switch ((CatSLC) getAttEnum(feature, feature.type, 0, Att.CATSLC)) { 978 case SLC_TWAL: 979 WatLEV lev = (WatLEV) getAttEnum(feature, feature.type, 0, Att.WATLEV); 980 if (lev == WatLEV.LEV_CVRS) { 981 Renderer.lineVector(feature, new LineStyle(Color.black, 10, new float[] { 40, 40 }, null)); 1034 private static void shoreline() { 1035 if ((ruleset == RuleSet.ALL) || (ruleset == RuleSet.BASE)) { 1036 Renderer.lineVector(feature, new LineStyle(Color.black, 10, Yland)); 1037 } 1038 if ((ruleset == RuleSet.ALL) || (ruleset == RuleSet.SEAMARK)) { 1039 if (Renderer.zoom >= 12) { 1040 switch ((CatSLC) getAttEnum(feature, feature.type, 0, Att.CATSLC)) { 1041 case SLC_TWAL: 1042 WatLEV lev = (WatLEV) getAttEnum(feature, feature.type, 0, Att.WATLEV); 1043 if (lev == WatLEV.LEV_CVRS) { 1044 Renderer.lineVector(feature, new LineStyle(Color.black, 10, new float[] { 40, 40 }, null)); 1045 if (Renderer.zoom >= 15) 1046 Renderer.lineText(feature, "(covers)", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, 80); 1047 } else { 1048 Renderer.lineVector(feature, new LineStyle(Color.black, 10, null, null)); 1049 } 982 1050 if (Renderer.zoom >= 15) 983 Renderer.lineText(feature, "(covers)", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, 80); 984 } else { 985 Renderer.lineVector(feature, new LineStyle(Color.black, 10, null, null)); 986 } 987 if (Renderer.zoom >= 15) 988 Renderer.lineText(feature, "Training Wall", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -30); 989 break; 990 case SLC_SWAY: 991 Renderer.lineVector(feature, new LineStyle(Color.black, 2, null, new Color(0xffe000))); 992 if ((Renderer.zoom >= 16) && feature.objs.containsKey(Obj.SMCFAC)) { 993 ArrayList<Symbol> symbols = new ArrayList<Symbol>(); 994 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(feature, Obj.SMCFAC, 0, Att.CATSCF); 995 for (CatSCF scf : scfs) { 996 symbols.add(Facilities.Cats.get(scf)); 997 } 998 Renderer.cluster(feature, symbols); 999 } 1000 break; 1001 default: 1002 break; 1003 } 1004 } 1005 } 1006 1007 private static void stations(Feature feature) { 1051 Renderer.lineText(feature, "Training Wall", new Font("Arial", Font.PLAIN, 80), Color.black, 0.5, -30); 1052 break; 1053 case SLC_SWAY: 1054 Renderer.lineVector(feature, new LineStyle(Color.black, 2, null, new Color(0xffe000))); 1055 if ((Renderer.zoom >= 16) && feature.objs.containsKey(Obj.SMCFAC)) { 1056 ArrayList<Symbol> symbols = new ArrayList<Symbol>(); 1057 ArrayList<CatSCF> scfs = (ArrayList<CatSCF>) getAttList(feature, Obj.SMCFAC, 0, Att.CATSCF); 1058 for (CatSCF scf : scfs) { 1059 symbols.add(Facilities.Cats.get(scf)); 1060 } 1061 Renderer.cluster(feature, symbols); 1062 } 1063 break; 1064 default: 1065 break; 1066 } 1067 } 1068 } 1069 } 1070 1071 private static void stations() { 1008 1072 if (Renderer.zoom >= 14) { 1009 1073 String str = ""; … … 1109 1173 } 1110 1174 1111 private static void transits( Feature feature) {1175 private static void transits() { 1112 1176 if (Renderer.zoom >= 14) { 1113 1177 if (feature.type == Obj.RECTRC) Renderer.lineVector (feature, new LineStyle(Color.black, 10, null, null)); … … 1116 1180 if (Renderer.zoom >= 15) { 1117 1181 String str = ""; 1118 String name = getName( feature);1182 String name = getName(); 1119 1183 if (name != null) 1120 1184 str += name + " "; … … 1128 1192 } 1129 1193 1130 private static void waterways( Feature feature) {1194 private static void waterways() { 1131 1195 Renderer.lineVector(feature, new LineStyle(Bwater, 20)); 1132 1196 } 1133 1197 1134 private static void wrecks( Feature feature) {1198 private static void wrecks() { 1135 1199 if (Renderer.zoom >= 14) { 1136 1200 switch ((CatWRK) getAttEnum(feature, feature.type, 0, Att.CATWRK)) { -
applications/editors/josm/plugins/seachart/src/s57/S57map.java
r31014 r31027 18 18 import s57.S57val; 19 19 import s57.S57val.*; 20 import s57.S57osm; 21 import s57.S57osm.*; 20 22 21 23 public class S57map { … … 482 484 483 485 public void tagsDone(long id) { 484 if (feature.type == Obj.UNKOBJ) { 485 for (OSMtag tag : osmtags) { 486 Obj obj = S57obj.OSMobj(tag.key, tag.val); 487 if (obj != Obj.UNKOBJ) { 488 feature.type = obj; 489 ObjTab objs = feature.objs.get(obj); 490 if (objs == null) { 491 objs = new ObjTab(); 492 feature.objs.put(obj, objs); 493 } 494 AttMap atts = objs.get(0); 495 if (atts == null) { 496 atts = new AttMap(); 497 objs.put(0, atts); 498 } 499 AttVal<?> attval = S57val.OSMatt(tag.key, tag.val); 500 if (attval.att != Att.UNKATT) { 501 atts.put(attval.att, attval); 502 } 503 break; 504 } 486 for (OSMtag tag : osmtags) { 487 KeyVal kv = S57osm.OSMtag(tag.key, tag.val); 488 if (kv.obj != Obj.UNKOBJ) { 489 if (feature.type == Obj.UNKOBJ) { 490 feature.type = kv.obj; 491 } 492 ObjTab objs = feature.objs.get(kv.obj); 493 if (objs == null) { 494 objs = new ObjTab(); 495 feature.objs.put(kv.obj, objs); 496 } 497 AttMap atts = objs.get(0); 498 if (atts == null) { 499 atts = new AttMap(); 500 objs.put(0, atts); 501 } 502 if (kv.att != Att.UNKATT) { 503 atts.put(kv.att, new AttVal(kv.att, kv.conv, kv.val)); 504 } 505 break; 505 506 } 506 507 } … … 594 595 nedge.last = first; 595 596 switch (lext) { 596 case NE:597 597 case N: 598 if (( fext != Ext.NE) &&(fext != Ext.N)) {598 if ((lext == fext) || (fext != Ext.N)) { 599 599 nedge.nodes.add(1L); 600 if ((fext != Ext. NW) && (fext != Ext.W)) {600 if ((fext != Ext.W)) { 601 601 nedge.nodes.add(2L); 602 if ((fext != Ext.S W) && (fext != Ext.S)) {602 if ((fext != Ext.S)) { 603 603 nedge.nodes.add(3L); 604 if ((fext != Ext. SE) && (fext != Ext.W)) {604 if ((fext != Ext.W)) { 605 605 nedge.nodes.add(4L); 606 606 } … … 609 609 } 610 610 break; 611 case NW:612 611 case W: 613 if (( fext != Ext.NW) &&(fext != Ext.W)) {612 if ((lext == fext) || (fext != Ext.W)) { 614 613 nedge.nodes.add(2L); 615 if ((fext != Ext.S W) && (fext != Ext.S)) {614 if ((fext != Ext.S)) { 616 615 nedge.nodes.add(3L); 617 if ((fext != Ext. SE) && (fext != Ext.E)) {616 if ((fext != Ext.E)) { 618 617 nedge.nodes.add(4L); 619 if ( (fext != Ext.NE) &&(fext != Ext.N)) {618 if ( (fext != Ext.N)) { 620 619 nedge.nodes.add(1L); 621 620 } … … 624 623 } 625 624 break; 626 case SW:627 625 case S: 628 if (( fext != Ext.SW) &&(fext != Ext.S)) {626 if ((lext == fext) || (fext != Ext.S)) { 629 627 nedge.nodes.add(3L); 630 if ((fext != Ext. SE) && (fext != Ext.E)) {628 if ((fext != Ext.E)) { 631 629 nedge.nodes.add(4L); 632 if ((fext != Ext.N E) && (fext != Ext.N)) {630 if ((fext != Ext.N)) { 633 631 nedge.nodes.add(1L); 634 if ((fext != Ext. NW) && (fext != Ext.W)) {632 if ((fext != Ext.W)) { 635 633 nedge.nodes.add(2L); 636 634 } … … 639 637 } 640 638 break; 641 case SE:642 639 case E: 643 if (( fext != Ext.SE) &&(fext != Ext.E)) {640 if ((lext == fext) || (fext != Ext.E)) { 644 641 nedge.nodes.add(4L); 645 if ((fext != Ext.N E) && (fext != Ext.N)) {642 if ((fext != Ext.N)) { 646 643 nedge.nodes.add(1L); 647 if ((fext != Ext. NW) && (fext != Ext.W)) {644 if ((fext != Ext.W)) { 648 645 nedge.nodes.add(2L); 649 if ((fext != Ext.S W) && (fext != Ext.S)) {646 if ((fext != Ext.S)) { 650 647 nedge.nodes.add(3L); 651 648 } … … 661 658 features.get(Obj.LNDARE).add(land); 662 659 } 660 return; 663 661 } 664 662 665 663 // Utility methods 666 664 667 enum Ext {I, N, NW, W, SW, S, SE, E, NE } 665 enum Ext {I, N, W, S, E } 666 class Xnode { 667 double lat; 668 double lon; 669 Ext ext; 670 } 668 671 Ext outsideBounds(long ref) { 669 672 Snode node = nodes.get(ref); 670 673 if (node.lat >= bounds.maxlat) { 671 if (node.lon <= bounds.minlon) {672 return Ext.NW;673 } else if (node.lon >= bounds.maxlon) {674 return Ext.NE;675 }676 674 return Ext.N; 677 675 } 678 676 if (node.lat <= bounds.minlat) { 679 if (node.lon <= bounds.minlon) {680 return Ext.SW;681 } else if (node.lon >= bounds.maxlon) {682 return Ext.SE;683 }684 677 return Ext.S; 685 678 } 686 679 if (node.lon >= bounds.maxlon) { 687 if (node.lat <= bounds.minlat) {688 return Ext.SE;689 } else if (node.lat >= bounds.maxlat) {690 return Ext.NE;691 }692 680 return Ext.E; 693 681 } 694 682 if (node.lon <= bounds.minlon) { 695 if (node.lat <= bounds.minlat) {696 return Ext.SW;697 } else if (node.lat >= bounds.maxlat) {698 return Ext.NW;699 }700 683 return Ext.W; 701 684 } … … 904 887 int ec; 905 888 long lastref; 906 889 907 890 public GeomIterator(Geom g) { 908 891 geom = g; -
applications/editors/josm/plugins/seachart/src/s57/S57obj.java
r31014 r31027 178 178 } 179 179 180 private static final HashMap<String, Obj> OSMtags = new HashMap<String, Obj>();181 static {182 OSMtags.put("natural=coastline", Obj.COALNE); OSMtags.put("natural=water", Obj.LAKARE);183 OSMtags.put("waterway=riverbank", Obj.RIVBNK); OSMtags.put("waterway=river", Obj.RIVERS); OSMtags.put("waterway=canal", Obj.CANALS);184 OSMtags.put("wetland=tidalflat", Obj.DEPARE);185 }186 187 public static Obj OSMobj(String key, String val) {188 Obj obj = OSMtags.get(key + "=" + val);189 if (obj != null) {190 return obj;191 }192 return Obj.UNKOBJ;193 }194 195 180 } -
applications/editors/josm/plugins/seachart/src/s57/S57val.java
r31014 r31027 1242 1242 } 1243 1243 1244 static class KeyVal {1245 Att key;1246 Object val;1247 KeyVal(Att k, Object v) {1248 key = k;1249 val = v;1250 }1251 }1252 1253 private static final HashMap<String, KeyVal> OSMtags = new HashMap<String, KeyVal>();1254 static {1255 OSMtags.put("wetland=tidalflat", new KeyVal(Att.DRVAL2, (double)0));1256 }1257 1258 public static AttVal OSMatt(String key, String val) {1259 KeyVal att = OSMtags.get(key + "=" + val);1260 if (att != null) {1261 return new AttVal(att.key, Conv.F, att.val);1262 }1263 return new AttVal(Att.UNKATT, Conv.A, null);1264 }1265 1266 1244 } -
applications/editors/josm/plugins/seachart/src/seachart/ChartImage.java
r30992 r31027 68 68 g2.setBackground(Rules.Bwater); 69 69 g2.clearRect(rect.x, rect.y, rect.width, rect.height); 70 Renderer.reRender(g2, zoom, Math.pow(2, (zoom-12)), SeachartAction.map, this); 70 71 g2.setPaint(Color.black); 71 72 g2.setFont(new Font("Arial", Font.BOLD, 20)); 72 73 g2.drawString(("Z" + zoom), (rect.x + rect.width - 40), (rect.y + rect.height - 10)); 73 Renderer.reRender(g2, zoom, Math.pow(2, (zoom-12)), SeachartAction.map, this);74 74 } 75 75
Note:
See TracChangeset
for help on using the changeset viewer.