Ignore:
Timestamp:
2010-03-01T18:48:22+01:00 (15 years ago)
Author:
pieren
Message:

Grabbed images resolution configurable + fixed minor issues

File:
1 edited

Legend:

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

    r19078 r20240  
    4646    private URL getURLRaster(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) throws MalformedURLException {
    4747        // GET /scpc/wms?version=1.1&request=GetMap&layers=CDIF:PMC@QH4480001701&format=image/png&bbox=-1186,0,13555,8830&width=576&height=345&exception=application/vnd.ogc.se_inimage&styles= HTTP/1.1
    48         final int cRasterX = 800; // keep width constant and adjust width to original image proportions
     48        final int cRasterX = CadastrePlugin.imageWidth; // keep width constant and adjust width to original image proportions
    4949        String str = new String(wmsInterface.baseURL+"/scpc/wms?version=1.1&request=GetMap");
    5050        str += "&layers=CDIF:PMC@";
     
    5353        str += "&bbox=";
    5454        str += wmsLayer.eastNorth2raster(lambertMin, lambertMax);
    55         //str += "&width=800&height=800"; // maximum allowed by wms server
     55        //str += "&width=1000&height=800"; // maximum allowed by wms server
    5656        str += "&width="+cRasterX+"&height="; // maximum allowed by wms server (576/345, 800/378, 1000/634)
    5757        str += (int)(cRasterX*(wmsLayer.communeBBox.max.getY() - wmsLayer.communeBBox.min.getY())/(wmsLayer.communeBBox.max.getX() - wmsLayer.communeBBox.min.getX()));
     
    7373        str += lambertMax.east() + ",";
    7474        str += lambertMax.north();
    75         str += "&width=800&height=600"; // maximum allowed by wms server
    76         //str += "&width=1000&height=800"; // maximum allowed by wms server
     75        str += "&width="+CadastrePlugin.imageWidth+"&height="+CadastrePlugin.imageHeight;
    7776        //str += "&exception=application/vnd.ogc.se_inimage"; // used by normal client but not required
    7877        str += "&styles=LS3_90,LS2_90,LS1_90,PARCELLE_90,NUMERO_90,PT3_90,PT2_90,PT1_90,LIEUDIT_90";
Note: See TracChangeset for help on using the changeset viewer.