Ignore:
Timestamp:
2013-08-01T15:45:24+02:00 (13 years ago)
Author:
pieren
Message:

Fix transparency issue on new raster images. Temporary disable georeferences parsing not working on new cadastre WMS. Workaround on address help tool when switching to full screen.

File:
1 edited

Legend:

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

    r29525 r29801  
    508508
    509509    private void parseGeoreferences(WMSLayer wmsLayer, String input) {
    510         if (input.lastIndexOf(cBBoxCommunStart) != -1) {
    511             input = input.substring(input.lastIndexOf(cBBoxCommunStart));
    512             input = input.substring(input.indexOf(cBBoxCommunEnd)+cBBoxCommunEnd.length());
    513             int i = input.indexOf(",");
    514             int j = input.indexOf(",", i+1);
    515             String str = input.substring(i+1, j);
    516             double unknown_yet = tryParseDouble(str);
    517             int j_ = input.indexOf(",", j+1);
    518             double angle = Double.parseDouble(input.substring(j+1, j_));
    519             int k = input.indexOf(",", j_+1);
    520             double scale_origin = Double.parseDouble(input.substring(j_+1, k));
    521             int l = input.indexOf(",", k+1);
    522             double dpi = Double.parseDouble(input.substring(k+1, l));
    523             int m = input.indexOf(",", l+1);
    524             double fX = Double.parseDouble(input.substring(l+1, m));
    525             int n = input.indexOf(",", m+1);
    526             double fY = Double.parseDouble(input.substring(m+1, n));
    527             int o = input.indexOf(",", n+1);
    528             double X0 = Double.parseDouble(input.substring(n+1, o));
    529             int p = input.indexOf(",", o+1);
    530             double Y0 = Double.parseDouble(input.substring(o+1, p));
    531             if (X0 != 0.0 && Y0 != 0) {
    532                 wmsLayer.setAlreadyGeoreferenced(true);
    533                 wmsLayer.fX = fX;
    534                 wmsLayer.fY = fY;
    535                 wmsLayer.angle = angle;
    536                 wmsLayer.X0 = X0;
    537                 wmsLayer.Y0 = Y0;
    538             }
    539             System.out.println("parse georef:"+unknown_yet+","+angle+","+scale_origin+","+dpi+","+fX+","+
    540                     fY+","+X0+","+Y0);
    541         }
     510        /* commented since cadastre WMS changes mid july 2013
     511         * until new GeoBox coordinates parsing is solved */
     512//        if (input.lastIndexOf(cBBoxCommunStart) != -1) {
     513//            input = input.substring(input.lastIndexOf(cBBoxCommunStart));
     514//            input = input.substring(input.indexOf(cBBoxCommunEnd)+cBBoxCommunEnd.length());
     515//            int i = input.indexOf(",");
     516//            int j = input.indexOf(",", i+1);
     517//            String str = input.substring(i+1, j);
     518//            double unknown_yet = tryParseDouble(str);
     519//            int j_ = input.indexOf(",", j+1);
     520//            double angle = Double.parseDouble(input.substring(j+1, j_));
     521//            int k = input.indexOf(",", j_+1);
     522//            double scale_origin = Double.parseDouble(input.substring(j_+1, k));
     523//            int l = input.indexOf(",", k+1);
     524//            double dpi = Double.parseDouble(input.substring(k+1, l));
     525//            int m = input.indexOf(",", l+1);
     526//            double fX = Double.parseDouble(input.substring(l+1, m));
     527//            int n = input.indexOf(",", m+1);
     528//            double fY = Double.parseDouble(input.substring(m+1, n));
     529//            int o = input.indexOf(",", n+1);
     530//            double X0 = Double.parseDouble(input.substring(n+1, o));
     531//            int p = input.indexOf(",", o+1);
     532//            double Y0 = Double.parseDouble(input.substring(o+1, p));
     533//            if (X0 != 0.0 && Y0 != 0) {
     534//                wmsLayer.setAlreadyGeoreferenced(true);
     535//                wmsLayer.fX = fX;
     536//                wmsLayer.fY = fY;
     537//                wmsLayer.angle = angle;
     538//                wmsLayer.X0 = X0;
     539//                wmsLayer.Y0 = Y0;
     540//            }
     541//            System.out.println("parse georef:"+unknown_yet+","+angle+","+scale_origin+","+dpi+","+fX+","+
     542//                    fY+","+X0+","+Y0);
     543//        }
    542544    }
    543545
Note: See TracChangeset for help on using the changeset viewer.