Changeset 10748 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2016-08-06T19:21:33+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r10716 r10748 712 712 synchronized (selectionLock) { 713 713 for (PrimitiveId o : osm) { 714 changed = changed | this. __toggleSelected(o);714 changed = changed | this.dotoggleSelected(o); 715 715 } 716 716 if (changed) { … … 731 731 } 732 732 733 private boolean __toggleSelected(PrimitiveId primitiveId) {733 private boolean dotoggleSelected(PrimitiveId primitiveId) { 734 734 OsmPrimitive primitive = getPrimitiveByIdChecked(primitiveId); 735 735 if (primitive == null) -
trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
r10001 r10748 134 134 } 135 135 136 boolean remove _content(T o) {136 boolean removeContent(T o) { 137 137 // If two threads try to remove item at the same time from different buckets of this QBLevel, 138 138 // it might happen that one thread removes bucket but don't remove parent because it still sees … … 147 147 } 148 148 if (this.canRemove()) { 149 this.remove _from_parent();149 this.removeFromParent(); 150 150 } 151 151 return ret; … … 158 158 * is a dead end. 159 159 */ 160 void __split() {160 void doSplit() { 161 161 List<T> tmpcontent = content; 162 162 content = null; … … 165 165 int idx = o.getBBox().getIndex(level); 166 166 if (idx == -1) { 167 __add_content(o);167 doAddContent(o); 168 168 } else { 169 169 getChild(idx).doAdd(o); … … 173 173 } 174 174 175 boolean __add_content(T o) {175 boolean doAddContent(T o) { 176 176 // The split_lock will keep two concurrent calls from overwriting content 177 177 if (content == null) { … … 190 190 } 191 191 192 private void search _contents(BBox searchBbox, List<T> result) {192 private void searchContents(BBox searchBbox, List<T> result) { 193 193 /* 194 194 * It is possible that this was created in a split … … 219 219 } 220 220 221 QBLevel<T> next_sibling() {221 QBLevel<T> findNextSibling() { 222 222 return (parent == null) ? null : parent.firstSiblingOf(this); 223 223 } … … 229 229 QBLevel<T> nextSibling() { 230 230 QBLevel<T> next = this; 231 QBLevel<T> sibling = next. next_sibling();231 QBLevel<T> sibling = next.findNextSibling(); 232 232 // Walk back up the tree to find the next sibling node. 233 233 // It may be either a leaf or branch. … … 237 237 break; 238 238 } 239 sibling = next. next_sibling();239 sibling = next.findNextSibling(); 240 240 } 241 241 return sibling; … … 289 289 } 290 290 } 291 __add_content(o);291 doAddContent(o); 292 292 if (isLeaf() && content.size() > MAX_OBJECTS_PER_LEVEL && level < QuadTiling.NR_LEVELS) { 293 __split();293 doSplit(); 294 294 } 295 295 } … … 307 307 308 308 if (this.hasContent()) { 309 search _contents(searchBbox, result);309 searchContents(searchBbox, result); 310 310 } 311 311 … … 330 330 } 331 331 332 int index _of(QBLevel<T> findThis) {332 int indexOf(QBLevel<T> findThis) { 333 333 QBLevel<T>[] children = getChildren(); 334 334 for (int i = 0; i < QuadTiling.TILES_PER_LEVEL; i++) { … … 359 359 } 360 360 361 void remove _from_parent() {361 void removeFromParent() { 362 362 if (parent == null) 363 363 return; … … 378 378 379 379 if (parent.canRemove()) { 380 parent.remove _from_parent();380 parent.removeFromParent(); 381 381 } 382 382 } … … 461 461 searchCache = null; // Search cache might point to one of removed buckets 462 462 QBLevel<T> bucket = root.findBucket(t.getBBox()); 463 if (bucket.remove _content(t)) {463 if (bucket.removeContent(t)) { 464 464 size--; 465 465 return true; … … 564 564 contentIndex--; 565 565 T object = peek(); 566 currentNode.remove _content(object);566 currentNode.removeContent(object); 567 567 } 568 568 } … … 607 607 // of the nodes which is a parent of the search cache 608 608 while (tmp != null) { 609 tmp.search _contents(searchBbox, ret);609 tmp.searchContents(searchBbox, ret); 610 610 tmp = tmp.parent; 611 611 } -
trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
r10469 r10748 416 416 if (parameters.get(Param.es.key) != null) { 417 417 double es = parseDouble(parameters, Param.es.key); 418 return Ellipsoid.create _a_es(a, es);418 return Ellipsoid.createAes(a, es); 419 419 } 420 420 if (parameters.get(Param.rf.key) != null) { 421 421 double rf = parseDouble(parameters, Param.rf.key); 422 return Ellipsoid.create _a_rf(a, rf);422 return Ellipsoid.createArf(a, rf); 423 423 } 424 424 if (parameters.get(Param.f.key) != null) { 425 425 double f = parseDouble(parameters, Param.f.key); 426 return Ellipsoid.create _a_f(a, f);426 return Ellipsoid.createAf(a, f); 427 427 } 428 428 if (parameters.get(Param.b.key) != null) { 429 429 double b = parseDouble(parameters, Param.b.key); 430 return Ellipsoid.create _a_b(a, b);430 return Ellipsoid.createAb(a, b); 431 431 } 432 432 } -
trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
r10680 r10748 17 17 * Airy 1830 18 18 */ 19 public static final Ellipsoid Airy = Ellipsoid.create _a_b(6377563.396, 6356256.910);19 public static final Ellipsoid Airy = Ellipsoid.createAb(6377563.396, 6356256.910); 20 20 21 21 /** 22 22 * Modified Airy 1849 23 23 */ 24 public static final Ellipsoid AiryMod = Ellipsoid.create _a_b(6377340.189, 6356034.446);24 public static final Ellipsoid AiryMod = Ellipsoid.createAb(6377340.189, 6356034.446); 25 25 26 26 /** … … 28 28 * same as GRS67 Modified 29 29 */ 30 public static final Ellipsoid AustSA = Ellipsoid.create _a_rf(6378160.0, 298.25);30 public static final Ellipsoid AustSA = Ellipsoid.createArf(6378160.0, 298.25); 31 31 32 32 /** 33 33 * Bessel 1841 ellipsoid 34 34 */ 35 public static final Ellipsoid Bessel1841 = Ellipsoid.create _a_rf(6377397.155, 299.1528128);35 public static final Ellipsoid Bessel1841 = Ellipsoid.createArf(6377397.155, 299.1528128); 36 36 37 37 /** 38 38 * Bessel 1841 (Namibia) 39 39 */ 40 public static final Ellipsoid BesselNamibia = Ellipsoid.create _a_rf(6377483.865, 299.1528128);40 public static final Ellipsoid BesselNamibia = Ellipsoid.createArf(6377483.865, 299.1528128); 41 41 42 42 /** 43 43 * Clarke 1866 ellipsoid 44 44 */ 45 public static final Ellipsoid Clarke1866 = Ellipsoid.create _a_b(6378206.4, 6356583.8);45 public static final Ellipsoid Clarke1866 = Ellipsoid.createAb(6378206.4, 6356583.8); 46 46 47 47 /** 48 48 * Clarke 1880 (modified) 49 49 */ 50 public static final Ellipsoid Clarke1880 = Ellipsoid.create _a_rf(6378249.145, 293.4663);50 public static final Ellipsoid Clarke1880 = Ellipsoid.createArf(6378249.145, 293.4663); 51 51 52 52 /** 53 53 * Clarke 1880 IGN (French national geographic institute) 54 54 */ 55 public static final Ellipsoid ClarkeIGN = Ellipsoid.create _a_b(6378249.2, 6356515.0);55 public static final Ellipsoid ClarkeIGN = Ellipsoid.createAb(6378249.2, 6356515.0); 56 56 57 57 /** 58 58 * Everest (Sabah & Sarawak) 59 59 */ 60 public static final Ellipsoid EverestSabahSarawak = Ellipsoid.create _a_rf(6377298.556, 300.8017);60 public static final Ellipsoid EverestSabahSarawak = Ellipsoid.createArf(6377298.556, 300.8017); 61 61 62 62 /** 63 63 * GRS67 ellipsoid 64 64 */ 65 public static final Ellipsoid GRS67 = Ellipsoid.create _a_rf(6378160.0, 298.247167427);65 public static final Ellipsoid GRS67 = Ellipsoid.createArf(6378160.0, 298.247167427); 66 66 67 67 /** 68 68 * GRS80 ellipsoid 69 69 */ 70 public static final Ellipsoid GRS80 = Ellipsoid.create _a_rf(6378137.0, 298.257222101);70 public static final Ellipsoid GRS80 = Ellipsoid.createArf(6378137.0, 298.257222101); 71 71 72 72 /** … … 75 75 * Proj.4 code: intl 76 76 */ 77 public static final Ellipsoid Hayford = Ellipsoid.create _a_rf(6378388.0, 297.0);77 public static final Ellipsoid Hayford = Ellipsoid.createArf(6378388.0, 297.0); 78 78 79 79 /** 80 80 * Helmert 1906 81 81 */ 82 public static final Ellipsoid Helmert = Ellipsoid.create _a_rf(6378200.0, 298.3);82 public static final Ellipsoid Helmert = Ellipsoid.createArf(6378200.0, 298.3); 83 83 84 84 /** 85 85 * Krassowsky 1940 ellipsoid 86 86 */ 87 public static final Ellipsoid Krassowsky = Ellipsoid.create _a_rf(6378245.0, 298.3);87 public static final Ellipsoid Krassowsky = Ellipsoid.createArf(6378245.0, 298.3); 88 88 89 89 /** 90 90 * WGS66 ellipsoid 91 91 */ 92 public static final Ellipsoid WGS66 = Ellipsoid.create _a_rf(6378145.0, 298.25);92 public static final Ellipsoid WGS66 = Ellipsoid.createArf(6378145.0, 298.25); 93 93 94 94 /** 95 95 * WGS72 ellipsoid 96 96 */ 97 public static final Ellipsoid WGS72 = Ellipsoid.create _a_rf(6378135.0, 298.26);97 public static final Ellipsoid WGS72 = Ellipsoid.createArf(6378135.0, 298.26); 98 98 99 99 /** 100 100 * WGS84 ellipsoid 101 101 */ 102 public static final Ellipsoid WGS84 = Ellipsoid.create _a_rf(6378137.0, 298.257223563);102 public static final Ellipsoid WGS84 = Ellipsoid.createArf(6378137.0, 298.257223563); 103 103 104 104 /** … … 162 162 * @return the new ellipsoid 163 163 */ 164 public static Ellipsoid create _a_b(double a, double b) {164 public static Ellipsoid createAb(double a, double b) { 165 165 double e2 = (a*a - b*b) / (a*a); 166 166 double e = Math.sqrt(e2); … … 176 176 * @return the new ellipsoid 177 177 */ 178 public static Ellipsoid create _a_es(double a, double es) {178 public static Ellipsoid createAes(double a, double es) { 179 179 double b = a * Math.sqrt(1.0 - es); 180 180 double e = Math.sqrt(es); … … 190 190 * @return the new ellipsoid 191 191 */ 192 public static Ellipsoid create _a_f(double a, double f) {192 public static Ellipsoid createAf(double a, double f) { 193 193 double b = a * (1.0 - f); 194 194 double e2 = f * (2 - f); … … 205 205 * @return the new ellipsoid 206 206 */ 207 public static Ellipsoid create _a_rf(double a, double rf) {208 return create _a_f(a, 1.0 / rf);207 public static Ellipsoid createArf(double a, double rf) { 208 return createAf(a, 1.0 / rf); 209 209 } 210 210 -
trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java
r10378 r10748 137 137 * @throws RuntimeException if the itteration does not converge. 138 138 */ 139 protected final double inv _mlfn(double arg) {139 protected final double invMlfn(double arg) { 140 140 double s, t, phi, k = 1.0/(1.0 - e2); 141 141 int i; -
trunk/src/org/openstreetmap/josm/data/projection/proj/CassiniSoldner.java
r9555 r10748 79 79 @Override 80 80 public double[] invproject(double x, double y) { 81 double ph1 = inv _mlfn(ml0 + y);81 double ph1 = invMlfn(ml0 + y); 82 82 double tn = Math.tan(ph1); 83 83 double t = tn * tn; -
trunk/src/org/openstreetmap/josm/data/projection/proj/Sinusoidal.java
r9955 r10748 43 43 return new double[]{north, east / cos(north)}; 44 44 } else { 45 final double phi = inv _mlfn(north);45 final double phi = invMlfn(north); 46 46 double s = abs(phi); 47 47 final double lambda; -
trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
r10250 r10748 156 156 @Override 157 157 public double[] invproject(double x, double y) { 158 double phi = inv _mlfn(ml0 + y);158 double phi = invMlfn(ml0 + y); 159 159 160 160 if (Math.abs(phi) >= Math.PI/2) {
Note:
See TracChangeset
for help on using the changeset viewer.