- Timestamp:
- 2018-04-15T23:58:36+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/projection/AbstractProjection.java
r12820 r13640 120 120 LatLon ll = datum.fromWGS84(new LatLon(toConvert)); 121 121 double[] en = proj.project(Utils.toRadians(ll.lat()), Utils.toRadians(LatLon.normalizeLon(ll.lon() - lon0 - pm))); 122 return new EastNorth((ellps.a * k0 * en[0] + x0) / toMeter, (ellps.a * k0 * en[1] + y0) / toMeter); 122 return new EastNorth( 123 (ellps.a * k0 * en[0] + x0) / toMeter, 124 (ellps.a * k0 * en[1] + y0) / toMeter); 123 125 } 124 126 … … 134 136 Bounds bounds = getWorldBoundsLatLon(); 135 137 return new LatLon(Utils.clamp(ll.lat(), bounds.getMinLat(), bounds.getMaxLat()), 136 Utils.clamp(ll.lon(), bounds.getMinLon(), bounds.getMaxLon()));138 Utils.clamp(ll.lon(), bounds.getMinLon(), bounds.getMaxLon())); 137 139 } 138 140 139 141 private LatLon eastNorth2latlon(EastNorth en, DoubleUnaryOperator normalizeLon) { 140 double[] latlonRad = proj.invproject((en.east() * toMeter - x0) / ellps.a / k0, (en.north() * toMeter - y0) / ellps.a / k0); 142 double[] latlonRad = proj.invproject( 143 (en.east() * toMeter - x0) / ellps.a / k0, 144 (en.north() * toMeter - y0) / ellps.a / k0); 141 145 double lon = Utils.toDegrees(latlonRad[1]) + lon0 + pm; 142 146 LatLon ll = new LatLon(Utils.toDegrees(latlonRad[0]), normalizeLon.applyAsDouble(lon)); … … 160 164 for (int chunk = minChunk; chunk <= maxChunk; chunk++) { 161 165 ret.put(new ProjectionBounds(Math.max(area.minEast, minEast + chunk * dEast), area.minNorth, 162 Math.min(area.maxEast, maxEast + chunk * dEast), area.maxNorth),166 Math.min(area.maxEast, maxEast + chunk * dEast), area.maxNorth), 163 167 new ShiftedProjecting(this, new EastNorth(-chunk * dEast, 0))); 164 168 } -
trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
r13639 r13640 23 23 * <p> 24 24 * This implementation provides transforms for two cases of the lambert conic conformal projection: 25 * < p>25 * </p> 26 26 * <ul> 27 27 * <li>{@code Lambert_Conformal_Conic_1SP} (EPSG code 9801)</li> … … 33 33 * The {@code "standard_parallel_2"} parameter is optional and will be given the same value 34 34 * as {@code "standard_parallel_1"} if not set (creating a 1 standard parallel projection). 35 * < p>35 * </p> 36 36 * <b>References:</b> 37 37 * <ul> -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r13105 r13640 25 25 26 26 import org.openstreetmap.josm.data.coor.LatLon; 27 import org.openstreetmap.josm.data.osm.IPrimitive; 27 28 import org.openstreetmap.josm.data.osm.Node; 28 29 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 555 556 * @param env the environment 556 557 * @return the area of a closed way or multipolygon in square meters or {@code null} 557 * @see Geometry#computeArea( OsmPrimitive)558 * @see Geometry#computeArea(IPrimitive) 558 559 */ 559 560 public static Float areasize(final Environment env) { // NO_UCD (unused code)
Note:
See TracChangeset
for help on using the changeset viewer.