Package org.geomajas.layer

Examples of org.geomajas.layer.RasterLayer


    }
    ClientRasterLayerInfo rasterInfo = (ClientRasterLayerInfo) clientLayerInfo;
    RasterLayerRasterizingInfo extraInfo = (RasterLayerRasterizingInfo) rasterInfo
        .getWidgetInfo(RasterLayerRasterizingInfo.WIDGET_KEY);
    ReferencedEnvelope areaOfInterest = mapContext.getAreaOfInterest();
    RasterLayer layer = configurationService.getRasterLayer(clientLayerInfo.getServerLayerId());
    MapViewport port = mapContext.getViewport();
    double rasterScale = port.getScreenArea().getWidth() / port.getBounds().getWidth();
    List<RasterTile> tiles = rasterLayerService.getTiles(clientLayerInfo.getServerLayerId(),
        areaOfInterest.getCoordinateReferenceSystem(), areaOfInterest, rasterScale);
    RasterDirectLayer rasterLayer = new RasterDirectLayer(tiles, layer.getLayerInfo().getTileWidth(), layer
        .getLayerInfo().getTileHeight(), extraInfo.getCssStyle());
    rasterLayer.setTitle(clientLayerInfo.getLabel());
    rasterLayer.getUserData().put(USERDATA_KEY_SHOWING, extraInfo.isShowing());
    return rasterLayer;
  }
View Full Code Here


    } else {
      String url = null;
      if (null != styleName && !"".equals(styleName)) {
        url = styleName;
      }
      RasterLayer rl = (RasterLayer) l;
      return createIcon(rl.getLayerInfo().getLayerType(), null, iconSize, url);
    }
  }
View Full Code Here

  public void setId(String id) {
    this.id = id;
  }

  public void execute(PipelineContext context, List<RasterTile> response) throws GeomajasException {
    RasterLayer layer = context.get(PipelineCode.LAYER_KEY, RasterLayer.class);
    Envelope bounds = context.get(PipelineCode.BOUNDS_KEY, Envelope.class);
    double scale = context.get(PipelineCode.SCALE_KEY, Double.class);
    CoordinateReferenceSystem crs = context.get(PipelineCode.CRS_KEY, CoordinateReferenceSystem.class);
    List<RasterTile> images = layer.paint(crs, bounds, scale);
    response.addAll(images);
  }
View Full Code Here

   *
   * @param layerId layer id
   * @return WMS layer or null if layer is not a WMS layer
   */
  private WmsLayer getLayer(String layerId) {
    RasterLayer layer = configurationService.getRasterLayer(layerId);
    if (layer instanceof WmsLayer) {
      return (WmsLayer) layer;
    }
    return null;
  }
View Full Code Here

  private RasterLayer getRasterLayer(String layerId) throws GeomajasException {
    if (!securityContext.isLayerVisible(layerId)) {
      throw new GeomajasSecurityException(ExceptionCode.LAYER_NOT_VISIBLE, layerId, securityContext.getUserId());
    }
    RasterLayer layer = configurationService.getRasterLayer(layerId);
    if (null == layer) {
      throw new GeomajasException(ExceptionCode.RASTER_LAYER_NOT_FOUND, layerId);
    }
    return layer;
  }
View Full Code Here

      throws GeomajasException {
    log.debug("getTiles start on layer {}", layerId);
    long ts = System.currentTimeMillis();
    PipelineContext context = pipelineService.createContext();
    context.put(PipelineCode.LAYER_ID_KEY, layerId);
    RasterLayer layer = getRasterLayer(layerId);
    context.put(PipelineCode.LAYER_KEY, layer);
    context.put(PipelineCode.CRS_KEY, crs);
    context.put(PipelineCode.BOUNDS_KEY, bounds);
    context.put(PipelineCode.SCALE_KEY, scale);
    List<RasterTile> response = new ArrayList<RasterTile>();
View Full Code Here

TOP

Related Classes of org.geomajas.layer.RasterLayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.