Changeset 18312 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
- Timestamp:
- 2009-10-27T19:42:44+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r18289 r18312 356 356 357 357 /** 358 * Called by CacheControl when a new cache file is created on disk 358 * Called by CacheControl when a new cache file is created on disk. 359 * Save only primitives to keep cache independent of software changes. 359 360 * @param oos 360 361 * @throws IOException … … 362 363 public void write(ObjectOutputStream oos) throws IOException { 363 364 oos.writeInt(this.serializeFormatVersion); 364 oos.writeObject(this.location); 365 oos.writeObject(this.codeCommune); 365 oos.writeObject(this.location); // String 366 oos.writeObject(this.codeCommune); // String 366 367 oos.writeInt(this.lambertZone); 367 368 oos.writeBoolean(this.isRaster); 368 369 if (this.isRaster) { 369 oos.writeObject(this.rasterMin); 370 oos.writeObject(this.rasterMax); 370 oos.writeDouble(this.rasterMin.getX()); 371 oos.writeDouble(this.rasterMin.getY()); 372 oos.writeDouble(this.rasterMax.getX()); 373 oos.writeDouble(this.rasterMax.getY()); 371 374 oos.writeDouble(this.rasterRatio); 372 375 } 373 oos.writeObject(this.communeBBox); 374 } 375 376 /** 377 * Called by CacheControl when a cache file is read from disk 376 oos.writeObject(this.communeBBox.min.getX()); 377 oos.writeObject(this.communeBBox.min.getY()); 378 oos.writeObject(this.communeBBox.max.getX()); 379 oos.writeObject(this.communeBBox.max.getY()); 380 } 381 382 /** 383 * Called by CacheControl when a cache file is read from disk. 384 * Cache uses only primitives to stay independent of software changes. 378 385 * @param ois 379 386 * @throws IOException … … 392 399 this.setRaster(ois.readBoolean()); 393 400 if (this.isRaster) { 394 this.rasterMin = (EastNorth) ois.readObject(); 395 this.rasterMax = (EastNorth) ois.readObject(); 401 double X = ois.readDouble(); 402 double Y = ois.readDouble(); 403 this.rasterMin = new EastNorth(X, Y); 404 X = ois.readDouble(); 405 Y = ois.readDouble(); 406 this.rasterMax = new EastNorth(X, Y); 396 407 this.rasterRatio = ois.readDouble(); 397 408 } 398 this.communeBBox = (EastNorthBound) ois.readObject(); 409 double minX = ois.readDouble(); 410 double minY = ois.readDouble(); 411 double maxX = ois.readDouble(); 412 double maxY = ois.readDouble(); 413 this.communeBBox = new EastNorthBound(new EastNorth(minX, minY), new EastNorth(maxX, maxY)); 399 414 if (this.lambertZone != currentLambertZone && currentLambertZone != -1) { 400 415 JOptionPane.showMessageDialog(Main.parent, tr("Lambert zone {0} in cache "+
Note:
See TracChangeset
for help on using the changeset viewer.