Ignore:
Timestamp:
2011-07-01T00:44:06+02:00 (15 years ago)
Author:
pieren
Message:

For v2.2

  • replace deprecated Main.proj by newest Main.getProjection()
  • fix list of raster images (Feuilles) parsing failing after a Cadastre server change/maintenance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r25889 r26228  
    138138        } else {
    139139            if (isRaster) {
    140                 b = new Bounds(Main.proj.eastNorth2latlon(rasterMin), Main.proj.eastNorth2latlon(rasterMax));
     140                b = new Bounds(Main.getProjection().eastNorth2latlon(rasterMin), Main.getProjection().eastNorth2latlon(rasterMax));
    141141                divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.rasterDivider",
    142142                        CadastrePreferenceSetting.DEFAULT_RASTER_DIVIDER)));
     
    158158     */
    159159    private void divideBbox(Bounds b, int factor) {
    160         EastNorth lambertMin = Main.proj.latlon2eastNorth(b.getMin());
    161         EastNorth lambertMax = Main.proj.latlon2eastNorth(b.getMax());
     160        EastNorth lambertMin = Main.getProjection().latlon2eastNorth(b.getMin());
     161        EastNorth lambertMax = Main.getProjection().latlon2eastNorth(b.getMax());
    162162        double minEast = lambertMin.east();
    163163        double minNorth = lambertMin.north();
     
    322322        GeorefImage georefImage =
    323323            new GeorefImage(null,
    324             Main.proj.latlon2eastNorth(bounds.getMin()),
    325             Main.proj.latlon2eastNorth(bounds.getMax()));
     324            Main.getProjection().latlon2eastNorth(bounds.getMin()),
     325            Main.getProjection().latlon2eastNorth(bounds.getMax()));
    326326        for (GeorefImage img : images) {
    327327            if (img.overlap(georefImage))
     
    399399     */
    400400    public void setRasterBounds(Bounds bounds) {
    401         EastNorth rasterCenter = Main.proj.latlon2eastNorth(bounds.getCenter());
    402         EastNorth eaMin = Main.proj.latlon2eastNorth(bounds.getMin());
    403         EastNorth eaMax = Main.proj.latlon2eastNorth(bounds.getMax());
     401        EastNorth rasterCenter = Main.getProjection().latlon2eastNorth(bounds.getCenter());
     402        EastNorth eaMin = Main.getProjection().latlon2eastNorth(bounds.getMin());
     403        EastNorth eaMax = Main.getProjection().latlon2eastNorth(bounds.getMax());
    404404        double rasterSizeX = communeBBox.max.getX() - communeBBox.min.getX();
    405405        double rasterSizeY = communeBBox.max.getY() - communeBBox.min.getY();
Note: See TracChangeset for help on using the changeset viewer.