Changeset 31982 in osm for applications


Ignore:
Timestamp:
2016-01-13T01:26:13+01:00 (9 years ago)
Author:
donvip
Message:

[josm_proj4j] update to JOSM 9419

Location:
applications/editors/josm/plugins/proj4j
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/proj4j/build.xml

    r31923 r31982  
    44    <property name="commit.message" value="Commit message"/>
    55    <!-- 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"/>
    77       
    88    <property name="plugin.author" value="Josh Doe &lt;josh@joshdoe.com&gt;"/>
  • applications/editors/josm/plugins/proj4j/src/org/openstreetmap/josm/plugins/proj4j/Proj4JProjection.java

    r31830 r31982  
    99import org.openstreetmap.josm.data.coor.LatLon;
    1010import org.openstreetmap.josm.data.projection.Projection;
     11import org.openstreetmap.josm.data.projection.proj.IPolar;
    1112
    1213public class Proj4JProjection implements Projection {
     
    131132        }
    132133
     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    }
    133150}
Note: See TracChangeset for help on using the changeset viewer.