Changeset 24907 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
- Timestamp:
- 2010-12-29T23:18:37+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
r23190 r24907 37 37 imageModified = new VectorImageModifier(img, false); 38 38 return new GeorefImage(imageModified.bufferedImage, lambertMin, lambertMax); 39 } catch (MalformedURLException e) {40 throw (IOException) new IOException(tr("CadastreGrabber: Illegal url.")).initCause(e);41 }42 }43 44 public GeorefImage grabBuildings(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) throws IOException, OsmTransferException {45 try {46 URL url = getURLVectorBuildings(lambertMin, lambertMax);47 BufferedImage img = grab(url);48 ImageModifier imageModified = new VectorImageModifier(img, true);49 return new GeorefImage(imageModified.bufferedImage, lambertMin, lambertMax);50 } catch (MalformedURLException e) {51 throw (IOException) new IOException(tr("CadastreGrabber: Illegal url.")).initCause(e);52 }53 }54 55 public GeorefImage grabParcels(WMSLayer wmsLayer, EastNorth lambertMin, EastNorth lambertMax) throws IOException, OsmTransferException {56 try {57 URL url = getURLVectorParcels(lambertMin, lambertMax);58 BufferedImage img = grab(url);59 //ImageModifier imageModified = new VectorImageModifier(img, true);60 return new GeorefImage(/*imageModified.bufferedImage*/img, lambertMin, lambertMax);61 39 } catch (MalformedURLException e) { 62 40 throw (IOException) new IOException(tr("CadastreGrabber: Illegal url.")).initCause(e); … … 105 83 } 106 84 107 private URL getURLVectorBuildings(EastNorth lambertMin, EastNorth lambertMax) throws MalformedURLException {108 return buildURLVector("CDIF:LS2", "LS2_90", 1000, 800, lambertMin, lambertMax);109 }110 111 private URL getURLVectorParcels(EastNorth lambertMin, EastNorth lambertMax) throws MalformedURLException {112 return buildURLVector("CDIF:PARCELLE", "PARCELLE_90", 1000, 800, lambertMin, lambertMax);113 }114 115 85 private BufferedImage grab(URL url) throws IOException, OsmTransferException { 116 86 wmsInterface.urlConn = (HttpURLConnection)url.openConnection();
Note:
See TracChangeset
for help on using the changeset viewer.