Changeset 32556 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
- Timestamp:
- 2016-07-04T14:18:17+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
r32211 r32556 1 // License: GPL. v2 and later. Copyright 2008-2009 by Pieren <pieren3@gmail.com> and others1 // License: GPL. For details, see LICENSE file. 2 2 package cadastre_fr; 3 3 … … 54 54 str += wmsLayer.eastNorth2raster(lambertMin, lambertMax); 55 55 str += "&width="+cRasterX+"&height="; // maximum allowed by wms server (576/345, 800/378, 1000/634) 56 str += (int)(cRasterX*(wmsLayer.communeBBox.max.getY() - wmsLayer.communeBBox.min.getY())/(wmsLayer.communeBBox.max.getX() - wmsLayer.communeBBox.min.getX())); 56 str += (int) (cRasterX*(wmsLayer.communeBBox.max.getY() - wmsLayer.communeBBox.min.getY())/(wmsLayer.communeBBox.max.getX() - wmsLayer.communeBBox.min.getX())); 57 57 str += "&exception=application/vnd.ogc.se_inimage&styles="; // required for raster images 58 58 Main.info("URL="+str); … … 84 84 85 85 private BufferedImage grab(URL url) throws IOException, OsmTransferException { 86 wmsInterface.urlConn = (HttpURLConnection)url.openConnection(); 86 wmsInterface.urlConn = (HttpURLConnection) url.openConnection(); 87 87 wmsInterface.urlConn.setRequestProperty("Connection", "close"); 88 88 wmsInterface.urlConn.setRequestMethod("GET");
Note:
See TracChangeset
for help on using the changeset viewer.
