Changeset 31982 in osm for applications
- Timestamp:
- 2016-01-13T01:26:13+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/proj4j
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/proj4j/build.xml
r31923 r31982 4 4 <property name="commit.message" value="Commit message"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value=" 7001"/>6 <property name="plugin.main.version" value="9419"/> 7 7 8 8 <property name="plugin.author" value="Josh Doe <josh@joshdoe.com>"/> -
applications/editors/josm/plugins/proj4j/src/org/openstreetmap/josm/plugins/proj4j/Proj4JProjection.java
r31830 r31982 9 9 import org.openstreetmap.josm.data.coor.LatLon; 10 10 import org.openstreetmap.josm.data.projection.Projection; 11 import org.openstreetmap.josm.data.projection.proj.IPolar; 11 12 12 13 public class Proj4JProjection implements Projection { … … 131 132 } 132 133 134 @Override 135 public Bounds getLatLonBoundsBox(ProjectionBounds r) { 136 // Copied from JOSM AbstractProjection 137 Bounds result = new Bounds(eastNorth2latlon(r.getMin())); 138 result.extend(eastNorth2latlon(r.getMax())); 139 final int N = 40; 140 double dEast = (r.maxEast - r.minEast) / N; 141 double dNorth = (r.maxNorth - r.minNorth) / N; 142 for (int i = 0; i <= N; i++) { 143 result.extend(eastNorth2latlon(new EastNorth(r.minEast + i * dEast, r.minNorth))); 144 result.extend(eastNorth2latlon(new EastNorth(r.minEast + i * dEast, r.maxNorth))); 145 result.extend(eastNorth2latlon(new EastNorth(r.minEast, r.minNorth + i * dNorth))); 146 result.extend(eastNorth2latlon(new EastNorth(r.maxEast, r.minNorth + i * dNorth))); 147 } 148 return result; 149 } 133 150 }
Note:
See TracChangeset
for help on using the changeset viewer.