Revision 221
org.gvsig.raster.app/trunk/org.gvsig.raster.app/org.gvsig.raster.app.wmtsclient/src/main/java/org/gvsig/raster/app/extension/wmtsclient/layer/FLyrWMTS.java | ||
---|---|---|
22 | 22 |
|
23 | 23 |
package org.gvsig.raster.app.extension.wmtsclient.layer; |
24 | 24 |
|
25 |
import java.awt.Dimension; |
|
25 | 26 |
import java.awt.Graphics2D; |
26 | 27 |
import java.awt.Image; |
27 | 28 |
import java.awt.Point; |
... | ... | |
45 | 46 |
import org.gvsig.fmap.dal.coverage.RasterLocator; |
46 | 47 |
import org.gvsig.fmap.dal.coverage.RasterManager; |
47 | 48 |
import org.gvsig.fmap.dal.coverage.datastruct.Extent; |
49 |
import org.gvsig.fmap.dal.coverage.datastruct.ViewPortData; |
|
50 |
import org.gvsig.fmap.dal.coverage.exception.InvalidSetViewException; |
|
51 |
import org.gvsig.fmap.dal.coverage.exception.ProcessInterruptedException; |
|
52 |
import org.gvsig.fmap.dal.coverage.exception.RasterDriverException; |
|
53 |
import org.gvsig.fmap.dal.coverage.exception.WMSException; |
|
48 | 54 |
import org.gvsig.fmap.dal.coverage.explorer.WMTSServerExplorer; |
49 | 55 |
import org.gvsig.fmap.dal.coverage.explorer.WMTSServerExplorerParameters; |
50 | 56 |
import org.gvsig.fmap.dal.coverage.store.RasterDataStore; |
... | ... | |
190 | 196 |
* (non-Javadoc) |
191 | 197 |
* @see org.gvsig.raster.fmap.layers.DefaultFLyrRaster#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, org.gvsig.fmap.mapcontext.ViewPort, org.gvsig.tools.task.Cancellable, double) |
192 | 198 |
*/ |
199 |
@SuppressWarnings("deprecation") |
|
193 | 200 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, |
194 | 201 |
Cancellable cancel, double scale) throws ReadException { |
195 | 202 |
CancelTaskImpl cancellable = new CancelTaskImpl(cancel); |
... | ... | |
202 | 209 |
enableStopped(); |
203 | 210 |
|
204 | 211 |
if (isWithinScale(scale)) { |
212 |
if (!viewPort.getAdjustedExtent().intersects(getFullEnvelope())) |
|
213 |
return; |
|
205 | 214 |
|
206 |
|
|
215 |
// 2. Compute extent to be requested. |
|
216 |
Rectangle2D bBox = new Rectangle2D.Double(); |
|
217 |
Rectangle2D.intersect(getRectable2DFromEnvelope(viewPort.getAdjustedExtent()), |
|
218 |
getRectable2DFromEnvelope(getFullEnvelope()), bBox); |
|
219 |
int wImg = (int) Math.ceil(Math.abs(bBox.getWidth() * viewPort.getAffineTransform().getScaleX()) + 1); |
|
220 |
int hImg = (int) Math.ceil(Math.abs(bBox.getHeight() * viewPort.getAffineTransform().getScaleY()) + 1); |
|
221 |
Dimension sz = new Dimension(wImg, hImg); |
|
222 |
Extent ex = rManager.getDataStructFactory().createExtent( |
|
223 |
viewPort.getAdjustedEnvelope().getMinimum(0), |
|
224 |
viewPort.getAdjustedEnvelope().getMaximum(1), |
|
225 |
viewPort.getAdjustedEnvelope().getMaximum(0), |
|
226 |
viewPort.getAdjustedEnvelope().getMinimum(1)); |
|
227 |
ViewPortData vpData = rManager.createViewPortData(viewPort.getProjection(), ex, sz ); |
|
228 |
vpData.setMat(viewPort.getAffineTransform()); |
|
229 |
try { |
|
230 |
getParameters().setExtent(bBox); |
|
231 |
getParameters().setWidth(wImg); |
|
232 |
getParameters().setHeight(hImg); |
|
233 |
getRender().draw(g, vpData); |
|
234 |
} catch (RasterDriverException e) { |
|
235 |
throw new ReadException("Problems drawing this layer: " + e.getMessage(), e); |
|
236 |
} catch (InvalidSetViewException e) { |
|
237 |
throw new ReadException("Problems drawing this layer: " + e.getMessage(), e); |
|
238 |
} catch (ProcessInterruptedException e) { |
|
239 |
throw new ReadException("Problems drawing this layer: " + e.getMessage(), e); |
|
240 |
} |
|
207 | 241 |
} |
208 | 242 |
disableStopped(); |
209 | 243 |
} |
org.gvsig.raster.app/trunk/org.gvsig.raster.app/org.gvsig.raster.app.wmtsclient/src/main/java/org/gvsig/raster/app/extension/wmtsclient/gui/panel/WMTSParamsPanel.java | ||
---|---|---|
648 | 648 |
try { |
649 | 649 |
layer.setParameters(par); |
650 | 650 |
layer.setExplorer(explorer); |
651 |
layer.setFullExtent(theme.getLayer().getBBox().toRectangle2D()); |
|
651 |
layer.setFullExtent(theme.getLayer().getWGS84BBox().toRectangle2D());
|
|
652 | 652 |
} catch (InitializeException e) { |
653 | 653 |
throw new LoadLayerException("Error initializating layer", e); |
654 | 654 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.api/src/main/java/org/gvsig/fmap/dal/coverage/store/parameter/WMTSStoreParameters.java | ||
---|---|---|
26 | 26 |
import org.cresques.cts.IProjection; |
27 | 27 |
import org.gvsig.compat.net.ICancellable; |
28 | 28 |
import org.gvsig.remoteclient.wmts.struct.WMTSLayer; |
29 |
import org.gvsig.remoteclient.wmts.struct.WMTSStyle; |
|
29 | 30 |
|
30 | 31 |
/** |
31 | 32 |
* Parameters for the WMS provider |
... | ... | |
47 | 48 |
public WMTSLayer getLayer(); |
48 | 49 |
|
49 | 50 |
/** |
51 |
* Sets the style selected |
|
52 |
* @param layer |
|
53 |
*/ |
|
54 |
public void setStyle(WMTSStyle layer); |
|
55 |
|
|
56 |
/** |
|
57 |
* Gets the style |
|
58 |
* @return |
|
59 |
*/ |
|
60 |
public WMTSStyle getStyle(); |
|
61 |
|
|
62 |
/** |
|
50 | 63 |
* Devuelve el formato. |
51 | 64 |
* @return Formato. |
52 | 65 |
*/ |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.io/org.gvsig.raster.io.base/src/main/java/org/gvsig/fmap/dal/coverage/dataset/io/wmts/WMTSConnector.java | ||
---|---|---|
21 | 21 |
*/ |
22 | 22 |
package org.gvsig.fmap.dal.coverage.dataset.io.wmts; |
23 | 23 |
|
24 |
import java.io.File; |
|
24 | 25 |
import java.io.IOException; |
25 | 26 |
import java.net.ConnectException; |
26 | 27 |
import java.net.URL; |
... | ... | |
29 | 30 |
|
30 | 31 |
import org.gvsig.compat.net.ICancellable; |
31 | 32 |
import org.gvsig.raster.impl.datastruct.WMSLayerNode; |
33 |
import org.gvsig.remoteclient.exceptions.ServerErrorException; |
|
32 | 34 |
import org.gvsig.remoteclient.wmts.WMTSClient; |
35 |
import org.gvsig.remoteclient.wmts.WMTSStatus; |
|
36 |
import org.gvsig.remoteclient.wmts.exception.WMTSException; |
|
33 | 37 |
import org.gvsig.remoteclient.wmts.struct.WMTSLayer; |
34 | 38 |
import org.gvsig.remoteclient.wmts.struct.WMTSServiceIdentification; |
35 | 39 |
import org.gvsig.remoteclient.wmts.struct.WMTSServiceProvider; |
... | ... | |
112 | 116 |
return client.getHost(); |
113 | 117 |
} |
114 | 118 |
|
119 |
/** |
|
120 |
* <p>One of the three interfaces that OGC WMS defines. Request a map.</p> |
|
121 |
* @throws ServerErrorException |
|
122 |
*/ |
|
123 |
public File getTile(WMTSStatus status, ICancellable cancel) throws WMTSException, ServerErrorException { |
|
124 |
return client.getTile(status, cancel); |
|
125 |
} |
|
115 | 126 |
} |
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.io/org.gvsig.raster.io.base/src/main/java/org/gvsig/fmap/dal/coverage/dataset/io/wmts/WMTSProvider.java | ||
---|---|---|
35 | 35 |
import org.gvsig.fmap.dal.DataStore; |
36 | 36 |
import org.gvsig.fmap.dal.DataStoreParameters; |
37 | 37 |
import org.gvsig.fmap.dal.coverage.dataset.Buffer; |
38 |
import org.gvsig.fmap.dal.coverage.dataset.io.GdalProvider; |
|
38 | 39 |
import org.gvsig.fmap.dal.coverage.dataset.io.param.WMSStoreParametersImpl; |
39 | 40 |
import org.gvsig.fmap.dal.coverage.dataset.io.param.WMTSStoreParametersImpl; |
40 | 41 |
import org.gvsig.fmap.dal.coverage.dataset.io.server.DefaultWMTSServerExplorerParameters; |
... | ... | |
55 | 56 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
56 | 57 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices; |
57 | 58 |
import org.gvsig.metadata.MetadataLocator; |
59 |
import org.gvsig.raster.impl.DefaultRasterManager; |
|
60 |
import org.gvsig.raster.impl.datastruct.ExtentImpl; |
|
58 | 61 |
import org.gvsig.raster.impl.provider.DefaultRasterProvider; |
59 | 62 |
import org.gvsig.raster.impl.provider.RasterProvider; |
60 | 63 |
import org.gvsig.raster.impl.provider.RemoteRasterProvider; |
... | ... | |
62 | 65 |
import org.gvsig.raster.impl.store.DefaultStoreFactory; |
63 | 66 |
import org.gvsig.raster.impl.store.properties.DataStoreColorInterpretation; |
64 | 67 |
import org.gvsig.raster.impl.store.properties.DataStoreTransparency; |
68 |
import org.gvsig.remoteclient.exceptions.ServerErrorException; |
|
69 |
import org.gvsig.remoteclient.wmts.WMTSStatus; |
|
70 |
import org.gvsig.remoteclient.wmts.exception.WMTSException; |
|
71 |
import org.gvsig.remoteclient.wmts.struct.WMTSBoundingBox; |
|
72 |
import org.gvsig.remoteclient.wmts.struct.WMTSLayer; |
|
65 | 73 |
import org.gvsig.remoteclient.wmts.struct.WMTSTileMatrix; |
66 | 74 |
import org.gvsig.remoteclient.wmts.struct.WMTSTileMatrixSet; |
67 | 75 |
import org.gvsig.remoteclient.wmts.struct.WMTSTileMatrixSetLink; |
76 |
import org.gvsig.remoteclient.wmts.struct.WMTSTileMatrix.Tile; |
|
68 | 77 |
import org.gvsig.tools.ToolsLocator; |
69 | 78 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
70 | 79 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
... | ... | |
77 | 86 |
public static String NAME = "Wmts Store"; |
78 | 87 |
public static String DESCRIPTION = "Wmts Raster file"; |
79 | 88 |
public static final String METADATA_DEFINITION_NAME = "WmtsStore"; |
89 |
private static final double KMS_X_GRADO = 111.32; |
|
80 | 90 |
|
81 | 91 |
private Extent viewRequest = null; |
82 | 92 |
private static Hashtable<URL, WMTSConnector> |
... | ... | |
85 | 95 |
//Only for fixed size. Complete extent and FIXED_SIZE in long side |
86 | 96 |
private File lastRequest = null; |
87 | 97 |
private DataStoreTransparency fileTransparency = null; |
98 |
private int lastWidthRequest = 0; |
|
99 |
private int lastHeightRequest = 0; |
|
88 | 100 |
|
89 | 101 |
public static void register() { |
90 | 102 |
ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager(); |
... | ... | |
140 | 152 |
* @return |
141 | 153 |
* @throws WMSException |
142 | 154 |
*/ |
143 |
@SuppressWarnings("unused") |
|
144 | 155 |
private WMTSConnector getConnector() throws WMSException { |
145 | 156 |
WMSStoreParametersImpl p = (WMSStoreParametersImpl)parameters; |
146 | 157 |
URL url = null; |
... | ... | |
208 | 219 |
* @see org.gvsig.fmap.dal.coverage.dataset.RasterDataSet#getAffineTransform() |
209 | 220 |
*/ |
210 | 221 |
public AffineTransform getAffineTransform() { |
211 |
return null; |
|
222 |
WMTSStoreParametersImpl p = (WMTSStoreParametersImpl)parameters; |
|
223 |
Extent e = getExtent(); |
|
224 |
double psX = e.width() / (lastWidthRequest <= 0 ? p.getWidth() : lastWidthRequest); |
|
225 |
double psY = -(e.height() / (lastHeightRequest <= 0 ? p.getHeight() : lastHeightRequest)); |
|
226 |
ownTransformation = new AffineTransform( |
|
227 |
psX, |
|
228 |
0, |
|
229 |
0, |
|
230 |
psY, |
|
231 |
e.getULX() - (psX / 2), |
|
232 |
e.getULY() - (psY / 2)); |
|
233 |
externalTransformation = (AffineTransform) ownTransformation.clone(); |
|
234 |
return ownTransformation; |
|
212 | 235 |
} |
213 | 236 |
|
214 | 237 |
/** |
... | ... | |
216 | 239 |
* @return Extent |
217 | 240 |
*/ |
218 | 241 |
public Extent getExtent() { |
219 |
return null; |
|
242 |
WMTSStoreParametersImpl p = (WMTSStoreParametersImpl)parameters; |
|
243 |
WMTSLayer layer = p.getLayer(); |
|
244 |
WMTSBoundingBox bbox = layer.getWGS84BBox(); |
|
245 |
return new ExtentImpl(bbox.toRectangle2D()); |
|
220 | 246 |
} |
221 | 247 |
|
222 | 248 |
|
... | ... | |
291 | 317 |
* @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWidth() |
292 | 318 |
*/ |
293 | 319 |
public double getWidth() { |
294 |
return 0; |
|
320 |
WMTSStoreParametersImpl p = (WMTSStoreParametersImpl)parameters; |
|
321 |
if (lastWidthRequest <= 0) |
|
322 |
return p.getWidth(); |
|
323 |
return lastWidthRequest; |
|
295 | 324 |
} |
296 | 325 |
|
297 | 326 |
/* |
... | ... | |
299 | 328 |
* @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getHeight() |
300 | 329 |
*/ |
301 | 330 |
public double getHeight() { |
302 |
return 0; |
|
331 |
WMTSStoreParametersImpl p = (WMTSStoreParametersImpl)parameters; |
|
332 |
if (lastHeightRequest <= 0) |
|
333 |
return p.getHeight(); |
|
334 |
return lastHeightRequest; |
|
303 | 335 |
} |
304 | 336 |
|
305 | 337 |
/* |
... | ... | |
371 | 403 |
* (non-Javadoc) |
372 | 404 |
* @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(double, double, double, double, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer, org.gvsig.fmap.dal.coverage.grid.render.TileListener, int) |
373 | 405 |
*/ |
406 |
@SuppressWarnings("unchecked") |
|
374 | 407 |
public void getWindowRaster(double minX, double minY, double maxX, double maxY, |
375 | 408 |
int bufWidth, int bufHeight, BandList bandList, TileListener listener, int frameInPx)throws ProcessInterruptedException, RasterDriverException { |
376 | 409 |
WMTSStoreParameters p = (WMTSStoreParameters)param; |
377 | 410 |
WMTSTileMatrixSet tileMatrixSet = null; |
378 | 411 |
WMTSTileMatrix tileMatrix = null; |
412 |
lastWidthRequest = bufWidth; |
|
413 |
lastHeightRequest = bufHeight; |
|
414 |
|
|
379 | 415 |
ArrayList<?> tileMatrixSetLinkList = p.getLayer().getTileMatrixSetLink(); |
380 | 416 |
|
381 |
//Selecci?n de tiles por srs |
|
417 |
//1-Selecci?n de WMTSTileMatrixSet por srs |
|
418 |
|
|
382 | 419 |
String srs = p.getSRSCode(); |
383 | 420 |
for (int i = 0; i < tileMatrixSetLinkList.size(); i++) { |
384 | 421 |
WMTSTileMatrixSetLink tileMatrixSetLink = (WMTSTileMatrixSetLink)tileMatrixSetLinkList.get(i); |
... | ... | |
392 | 429 |
if(tileMatrixSet == null) |
393 | 430 |
return; |
394 | 431 |
double scaleX = Math.abs(maxX - minX) / bufWidth; |
432 |
|
|
433 |
//Calculo de la escala en geogr?ficas |
|
434 |
if(!p.getSRS().isProjected()) { |
|
435 |
|
|
436 |
} else { |
|
437 |
|
|
438 |
} |
|
439 |
|
|
440 |
tileMatrix = (WMTSTileMatrix)tileMatrixSet.getTileMatrix().get(0); |
|
395 | 441 |
//double scaleY = Math.abs(maxY - minY) / bufHeight; |
442 |
|
|
443 |
//2-Selecci?n de WMTSTileMatrix |
|
444 |
|
|
396 | 445 |
//Recorremos los tileMatrix para obtener la escala m?s aproximada |
446 |
//Con la escala obtenemos el WMTSTileMatrix que corresponde |
|
397 | 447 |
for (int i = 0; i < tileMatrixSet.getTileMatrix().size(); i++) { |
398 | 448 |
WMTSTileMatrix tm = (WMTSTileMatrix)tileMatrixSet.getTileMatrix().get(i); |
399 | 449 |
double scaleDenominator = tm.getScaleDenominator(); |
... | ... | |
401 | 451 |
tileMatrix = tm; |
402 | 452 |
} |
403 | 453 |
} |
454 |
|
|
455 |
//3-Selecci?n de fila y columna |
|
456 |
|
|
457 |
ArrayList<Tile> tiles = tileMatrix.intersects(minX, minY, maxX, maxY); |
|
458 |
|
|
459 |
WMTSConnector connector = null; |
|
460 |
try { |
|
461 |
connector = getConnector(); |
|
462 |
} catch (WMSException e) { |
|
463 |
throw new RasterDriverException("Error getting the connector object", e); |
|
464 |
} |
|
465 |
|
|
466 |
if(connector == null) |
|
467 |
throw new RasterDriverException("Error getting the connector object"); |
|
468 |
|
|
469 |
//4-Petici?n |
|
470 |
|
|
471 |
WMTSStatus status = new WMTSStatus(); |
|
472 |
status.setLayer(p.getLayer().getIdentifier()); |
|
473 |
status.setFormat(p.getImageFormat()); |
|
474 |
status.setStyle(p.getStyle().getIdentifier()); |
|
475 |
status.setTileMatrixSet(tileMatrixSet.getIdentifier()); |
|
476 |
status.setTileMatrix(tileMatrix.getIdentifier()); |
|
477 |
|
|
478 |
int bufWidthTile = (int) (bufWidth / tileMatrix.getMatrixWidth()); |
|
479 |
int bufHeightTile = (int) (bufHeight / tileMatrix.getMatrixHeight()); |
|
480 |
|
|
481 |
for (int i = 0; i < tiles.size(); i++) { |
|
482 |
Tile tile = tiles.get(i); |
|
483 |
status.setTileRow(tile.posX); |
|
484 |
status.setTileCol(tile.posY); |
|
485 |
//TODO:Cancelaci?n |
|
486 |
try { |
|
487 |
File file = connector.getTile(status, null); |
|
488 |
GdalProvider driver = new GdalProvider(file.getPath()); |
|
489 |
Buffer rasterBuf = DefaultRasterManager.getInstance().createBuffer(getDataType()[0], bufWidthTile, bufHeightTile, 3, true); |
|
490 |
Buffer buf = driver.getWindowRaster(tile.ulx, tile.uly, tile.lrx, tile.lry, bandList, rasterBuf); |
|
491 |
buf.setDataExtent(new Rectangle2D.Double(tile.ulx, tile.uly, Math.abs(tile.ulx - tile.lrx), Math.abs(tile.uly - tile.lry))); |
|
492 |
listener.nextBuffer(buf, new ExtentImpl(tile.ulx, tile.uly, tile.lrx, tile.lry), getAffineTransform(), null); |
|
493 |
} catch (WMTSException e) { |
|
494 |
throw new RasterDriverException("Error getting tiles", e); |
|
495 |
} catch (ServerErrorException e) { |
|
496 |
throw new RasterDriverException("Error getting tiles", e); |
|
497 |
} catch (NotSupportedExtensionException e) { |
|
498 |
throw new RasterDriverException("Error getting tiles", e); |
|
499 |
} |
|
500 |
} |
|
501 |
listener.endReading(); |
|
404 | 502 |
} |
405 | 503 |
|
406 | 504 |
/* |
... | ... | |
409 | 507 |
*/ |
410 | 508 |
public Buffer getWindowRaster(double ulx, double uly, double lrx, double lry, |
411 | 509 |
BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException { |
510 |
lastWidthRequest = rasterBuf.getWidth(); |
|
511 |
lastHeightRequest = rasterBuf.getHeight(); |
|
412 | 512 |
return null; |
413 | 513 |
} |
414 | 514 |
|
... | ... | |
418 | 518 |
*/ |
419 | 519 |
public Buffer getWindowRaster(double ulx, double uly, double w, double h, |
420 | 520 |
BandList bandList, Buffer rasterBuf, boolean adjustToExtent) throws ProcessInterruptedException, RasterDriverException { |
521 |
lastWidthRequest = rasterBuf.getWidth(); |
|
522 |
lastHeightRequest = rasterBuf.getHeight(); |
|
421 | 523 |
return null; |
422 | 524 |
} |
423 | 525 |
|
... | ... | |
427 | 529 |
*/ |
428 | 530 |
public Buffer getWindowRaster(double ulx, double uly, double lrx, double lry, |
429 | 531 |
int bufWidth, int bufHeight, BandList bandList, Buffer rasterBuf, boolean adjustToExtent) throws ProcessInterruptedException, RasterDriverException { |
532 |
lastWidthRequest = rasterBuf.getWidth(); |
|
533 |
lastHeightRequest = rasterBuf.getHeight(); |
|
430 | 534 |
return null; |
431 | 535 |
} |
432 | 536 |
|
... | ... | |
435 | 539 |
* @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(int, int, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer) |
436 | 540 |
*/ |
437 | 541 |
public Buffer getWindowRaster(int x, int y, int w, int h, BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException { |
542 |
lastWidthRequest = rasterBuf.getWidth(); |
|
543 |
lastHeightRequest = rasterBuf.getHeight(); |
|
438 | 544 |
return null; |
439 | 545 |
} |
440 | 546 |
|
... | ... | |
443 | 549 |
* @see org.gvsig.raster.impl.provider.DefaultRasterProvider#getWindowRaster(int, int, int, int, int, int, org.gvsig.fmap.dal.coverage.datastruct.BandList, org.gvsig.fmap.dal.coverage.dataset.Buffer) |
444 | 550 |
*/ |
445 | 551 |
public Buffer getWindowRaster(int x, int y, int w, int h, int bufWidth, int bufHeight, BandList bandList, Buffer rasterBuf) throws ProcessInterruptedException, RasterDriverException { |
552 |
lastWidthRequest = rasterBuf.getWidth(); |
|
553 |
lastHeightRequest = rasterBuf.getHeight(); |
|
446 | 554 |
return null; |
447 | 555 |
} |
448 | 556 |
|
org.gvsig.raster/trunk/org.gvsig.raster/org.gvsig.raster.io/org.gvsig.raster.io.base/src/main/java/org/gvsig/fmap/dal/coverage/dataset/io/param/WMTSStoreParametersImpl.java | ||
---|---|---|
34 | 34 |
import org.gvsig.fmap.dal.coverage.store.parameter.WMTSStoreParameters; |
35 | 35 |
import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
36 | 36 |
import org.gvsig.remoteclient.wmts.struct.WMTSLayer; |
37 |
import org.gvsig.remoteclient.wmts.struct.WMTSStyle; |
|
37 | 38 |
import org.gvsig.tools.ToolsLocator; |
38 | 39 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
39 | 40 |
import org.gvsig.tools.dynobject.DynClass; |
... | ... | |
49 | 50 |
private static final String FIELD_IMAGE_FORMAT = "imageformat"; |
50 | 51 |
private static final String FIELD_INFO_FORMAT = "infoformat"; |
51 | 52 |
private static final String FIELD_LAYER = "layer"; |
53 |
private static final String FIELD_STYLE = "style"; |
|
52 | 54 |
private static final String FIELD_HOST = "host"; |
53 | 55 |
private static final String FIELD_NAME = "name"; |
54 | 56 |
private static final String FIELD_SRSSTR = "srsstr"; |
... | ... | |
90 | 92 |
field.setType(DataTypes.OBJECT); |
91 | 93 |
field.setMandatory(false); |
92 | 94 |
|
95 |
field = dynClass.addDynField(FIELD_STYLE); |
|
96 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
|
97 |
field.setDescription("Style"); |
|
98 |
field.setType(DataTypes.OBJECT); |
|
99 |
field.setMandatory(false); |
|
100 |
|
|
93 | 101 |
field = dynClass.addDynField(FIELD_SRS); |
94 | 102 |
field.setTheTypeOfAvailableValues(DynField.ANY); |
95 | 103 |
field.setDescription("SRS"); |
... | ... | |
160 | 168 |
} |
161 | 169 |
|
162 | 170 |
} |
171 |
|
|
172 |
/* |
|
173 |
* (non-Javadoc) |
|
174 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.WMTSStoreParameters#setStyle(org.gvsig.remoteclient.wmts.struct.WMTSStyle) |
|
175 |
*/ |
|
176 |
public void setStyle(WMTSStyle layer) { |
|
177 |
this.setDynValue(FIELD_STYLE, layer); |
|
178 |
} |
|
163 | 179 |
|
164 | 180 |
/* |
165 | 181 |
* (non-Javadoc) |
182 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.WMTSStoreParameters#getStyle() |
|
183 |
*/ |
|
184 |
public WMTSStyle getStyle() { |
|
185 |
return (WMTSStyle) this.getDynValue(FIELD_STYLE); |
|
186 |
} |
|
187 |
|
|
188 |
/* |
|
189 |
* (non-Javadoc) |
|
166 | 190 |
* @see org.gvsig.fmap.dal.coverage.store.parameter.WMTSStoreParameters#getImageFormat() |
167 | 191 |
*/ |
168 | 192 |
public String getImageFormat() { |
Also available in: Unified diff