Changeset 19078 in osm


Ignore:
Timestamp:
2009-12-12T22:17:40+01:00 (15 years ago)
Author:
pieren
Message:

modified URL's for request and images size due to WMS changes and new capabilities

Location:
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
Files:
5 edited

Legend:

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

    r18544 r19078  
    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 = 1000; // keep width constant and adjust width to original image proportions
     48        final int cRasterX = 800; // 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@";
     
    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=800&height=600"; // maximum allowed by wms server
     76        //str += "&width=1000&height=800"; // maximum allowed by wms server
    7777        //str += "&exception=application/vnd.ogc.se_inimage"; // used by normal client but not required
    7878        str += "&styles=LS3_90,LS2_90,LS1_90,PARCELLE_90,NUMERO_90,PT3_90,PT2_90,PT1_90,LIEUDIT_90";
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java

    r18838 r19078  
    9292        try {
    9393            // first, get the cookie from Cadastre to allow next downloads
    94             searchFormURL = new URL(baseURL + "/scpc/rechercherPlan.do");
     94            searchFormURL = new URL(baseURL + "/scpc/accueil.do");
    9595            urlConn = (HttpURLConnection)searchFormURL.openConnection();
    9696            urlConn.setRequestMethod("GET");
     
    231231            content += "&codeDepartement=";
    232232            content += "&nbResultatParPage=10";
     233            content += "&x=0&y=0";
     234            searchFormURL = new URL(baseURL + "/scpc/rechercherPlan.do");
    233235            urlConn = (HttpURLConnection)searchFormURL.openConnection();
    234236            urlConn.setRequestMethod("POST");
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java

    r18838 r19078  
    8787 *                 - removed autosourcing of empty new nodes
    8888 * 1.6 28-Nov-2009 - Fix minor issues if Grab is called without layer (possible since projection rework)
     89 * 1.7 12-Dec-2009 - Change URL's changes for cookie and downgrade imgs resolution due to WMS changes
    8990 */
    9091public class CadastrePlugin extends Plugin {
    91     static String VERSION = "1.6";
     92    static String VERSION = "1.7";
    9293
    9394    static JMenu cadastreJMenu;
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePreferenceSetting.java

    r18544 r19078  
    172172        cadastrewms.add(new JSeparator(SwingConstants.HORIZONTAL), GBC.eol().fill(GBC.HORIZONTAL));
    173173
    174         // for raster images (not vectorized), image grab divider (from 1 to 10)
     174        // for raster images (not vectorized), image grab divider (from 1 to 12)
    175175        String savedRasterDivider = Main.pref.get("cadastrewms.rasterDivider", DEFAULT_RASTER_DIVIDER);
    176176        JLabel jLabelRasterDivider = new JLabel(tr("Raster images grab multiplier:"));
    177177        rasterDivider.setText(savedRasterDivider);
    178         rasterDivider.setToolTipText("Raster image grab division, from 1 to 10; 10 is very high definition");
     178        rasterDivider.setToolTipText("Raster image grab division, from 1 to 12; 12 is very high definition");
    179179        cadastrewms.add(jLabelRasterDivider, GBC.std().insets(0, 5, 10, 0));
    180180        cadastrewms.add(rasterDivider, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 5, 200, 5));
     
    248248        try {
    249249            int i = Integer.parseInt(rasterDivider.getText());
    250             if (i > 0 && i < 11)
     250            if (i > 0 && i < 13)
    251251                Main.pref.put("cadastrewms.rasterDivider", String.valueOf(i));
    252252        } catch (NumberFormatException e) { // ignore the last input
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SimplifyWay.java

    r18920 r19078  
    99import java.util.LinkedList;
    1010import java.util.List;
    11 import java.util.Set;
    1211
    1312import org.openstreetmap.josm.Main;
Note: See TracChangeset for help on using the changeset viewer.