public class WMSGrabber extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected ProjectionBounds |
b |
protected String |
baseURL |
protected boolean |
canceled |
private ImageryInfo |
info |
static NumberFormat |
latLonFormat |
protected WMSLayer |
layer |
private boolean |
localOnly |
protected MapView |
mv |
private Map<String,String> |
props |
Constructor and Description |
---|
WMSGrabber(MapView mv,
WMSLayer layer,
boolean localOnly)
Constructs a new
WMSGrabber . |
Modifier and Type | Method and Description |
---|---|
protected void |
attempt(WMSRequest request) |
void |
cancel() |
private void |
fetch(WMSRequest request,
int attempt) |
protected URL |
getURL(double w,
double s,
double e,
double n,
int wi,
int ht) |
protected BufferedImage |
grab(WMSRequest request,
URL url,
int attempt) |
(package private) int |
height() |
boolean |
loadFromCache(WMSRequest request) |
static int |
random(int min,
int max) |
protected String |
readException(URLConnection conn) |
void |
run() |
(package private) int |
width() |
private final boolean localOnly
protected ProjectionBounds b
protected volatile boolean canceled
private ImageryInfo info
public static final NumberFormat latLonFormat
public WMSGrabber(MapView mv, WMSLayer layer, boolean localOnly)
WMSGrabber
.mv
- Map viewlayer
- WMS layerint width()
int height()
protected void attempt(WMSRequest request)
public static int random(int min, int max)
public final void cancel()
private void fetch(WMSRequest request, int attempt) throws IOException, WMSException
IOException
WMSException
protected URL getURL(double w, double s, double e, double n, int wi, int ht) throws MalformedURLException
MalformedURLException
public boolean loadFromCache(WMSRequest request)
protected BufferedImage grab(WMSRequest request, URL url, int attempt) throws WMSException, IOException, OsmTransferException
protected String readException(URLConnection conn) throws IOException
IOException