Changeset 21877 in osm for applications/editors/josm/plugins/cadastre-fr/src
- Timestamp:
- 2010-06-21T22:13:44+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
r21516 r21877 496 496 int i = input.indexOf(","); 497 497 int j = input.indexOf(",", i+1); 498 double angle = Double.parseDouble(input.substring(i+1, j)); 499 int k = input.indexOf(",", j+1); 500 double scale_origin = Double.parseDouble(input.substring(j+1, k)); 498 String str = input.substring(i+1, j); 499 @SuppressWarnings("unused") 500 double unknown_yet = tryParseDouble(str); 501 int j_ = input.indexOf(",", j+1); 502 double angle = Double.parseDouble(input.substring(j+1, j_)); 503 int k = input.indexOf(",", j_+1); 504 double scale_origin = Double.parseDouble(input.substring(j_+1, k)); 501 505 int l = input.indexOf(",", k+1); 502 506 double dpi = Double.parseDouble(input.substring(k+1, l)); … … 517 521 wmsLayer.Y0 = Y0; 518 522 } 519 System.out.println("parse georef:"+ angle+","+scale_origin+","+dpi+","+fX+","+523 System.out.println("parse georef:"+unknown_yet+","+angle+","+scale_origin+","+dpi+","+fX+","+ 520 524 fY+","+X0+","+Y0); 525 } 526 } 527 528 private double tryParseDouble(String str) { 529 try { 530 return Double.parseDouble(str); 531 } catch (NumberFormatException e) { 532 return 0; 521 533 } 522 534 }
Note:
See TracChangeset
for help on using the changeset viewer.