org.openstreetmap.josm.io.imagery
Class WMSGrabber

java.lang.Object
  extended by org.openstreetmap.josm.io.imagery.Grabber
      extended by org.openstreetmap.josm.io.imagery.WMSGrabber
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
HTMLGrabber

public class WMSGrabber
extends Grabber


Field Summary
protected  java.lang.String baseURL
           
private  ImageryInfo info
           
static java.text.NumberFormat latLonFormat
           
private  java.util.Map<java.lang.String,java.lang.String> props
           
 
Fields inherited from class org.openstreetmap.josm.io.imagery.Grabber
b, canceled, layer, mv
 
Constructor Summary
WMSGrabber(MapView mv, WMSLayer layer, boolean localOnly)
           
 
Method Summary
(package private)  void fetch(WMSRequest request, int attempt)
           
protected  java.net.URL getURL(double w, double s, double e, double n, int wi, int ht)
           
protected  java.awt.image.BufferedImage grab(WMSRequest request, java.net.URL url, int attempt)
           
 boolean loadFromCache(WMSRequest request)
           
protected  java.lang.String readException(java.net.URLConnection conn)
           
 
Methods inherited from class org.openstreetmap.josm.io.imagery.Grabber
attempt, cancel, height, random, run, width
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseURL

protected java.lang.String baseURL

info

private ImageryInfo info

props

private java.util.Map<java.lang.String,java.lang.String> props

latLonFormat

public static final java.text.NumberFormat latLonFormat
Constructor Detail

WMSGrabber

public WMSGrabber(MapView mv,
                  WMSLayer layer,
                  boolean localOnly)
Method Detail

fetch

void fetch(WMSRequest request,
           int attempt)
     throws java.lang.Exception
Specified by:
fetch in class Grabber
Throws:
java.lang.Exception

getURL

protected java.net.URL getURL(double w,
                              double s,
                              double e,
                              double n,
                              int wi,
                              int ht)
                       throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

loadFromCache

public boolean loadFromCache(WMSRequest request)
Specified by:
loadFromCache in class Grabber

grab

protected java.awt.image.BufferedImage grab(WMSRequest request,
                                            java.net.URL url,
                                            int attempt)
                                     throws java.io.IOException,
                                            OsmTransferException
Throws:
java.io.IOException
OsmTransferException

readException

protected java.lang.String readException(java.net.URLConnection conn)
                                  throws java.io.IOException
Throws:
java.io.IOException


JOSM