congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RasterTile.getBounds
Code IndexAdd Tabnine to your IDE (free)

How to use
getBounds
method
in
org.geomajas.layer.tile.RasterTile

Best Java code snippets using org.geomajas.layer.tile.RasterTile.getBounds (Showing top 7 results out of 315)

origin: org.geomajas.plugin/geomajas-plugin-wmsclient

@Override
public List<RasterTile> getTiles(Bbox worldBounds) {
  List<RasterTile> result = new ArrayList<RasterTile>();
  for (RasterTile rasterTile : tiles.values()) {
    Bbox screenBounds = getScreenBounds(worldBounds);
    if (BboxService.intersects(screenBounds, rasterTile.getBounds())) {
      result.add(rasterTile);
    }
  }
  return result;
}
origin: org.geomajas.plugin/geomajas-plugin-printing

private boolean isYIndexUp(List<RasterTile> tiles) {
  RasterTile first = tiles.iterator().next();
  for (RasterTile tile : tiles) {
    if (tile.getCode().getY() > first.getCode().getY()) {
      return tile.getBounds().getY() > first.getBounds().getY();
    } else if (tile.getCode().getY() < first.getCode().getY()) {
      return tile.getBounds().getY() < first.getBounds().getY();
    }
  }
  return false;
}
origin: org.geomajas/geomajas-gwt-client-impl

protected void renderTile(RasterTile tile, Callback<String, String> callback) {
  HtmlImage image = htmlImageFactory.create(tile.getUrl(), tile.getBounds(), callback);
  container.add(image);
}
origin: org.geomajas.plugin/geomajas-plugin-wmsclient

protected void renderTile(RasterTile tile, Callback<String, String> callback) {
  HtmlImage image = htmlImageFactory.create(tile.getUrl(), tile.getBounds(), callback);
  container.add(image);
}
origin: org.geomajas.plugin/geomajas-plugin-printing

private Bbox getWorldBounds(List<RasterTile> tiles) {
  Bbox bounds = null;
  for (RasterTile tile : tiles) {
    Bbox tileBounds = new Bbox(tile.getBounds().getX(), tile.getBounds().getY(), tile.getBounds().getWidth(),
        tile.getBounds().getHeight());
    if (bounds == null) {
      bounds = new Bbox(tileBounds.getX(), tileBounds.getY(), tileBounds.getWidth(), tileBounds.getHeight());
    } else {
      double minx = Math.min(tileBounds.getX(), bounds.getX());
      double maxx = Math.max(tileBounds.getMaxX(), bounds.getMaxX());
      double miny = Math.min(tileBounds.getY(), bounds.getY());
      double maxy = Math.max(tileBounds.getMaxY(), bounds.getMaxY());
      bounds = new Bbox(minx, miny, maxx - minx, maxy - miny);
    }
  }
  return bounds;
}
origin: org.geomajas.plugin/geomajas-plugin-printing

/**
 * Add image in the document.
 *
 * @param context PDF context
 * @param imageResult image
 * @throws BadElementException PDF construction problem
 * @throws IOException PDF construction problem
 */
protected void addImage(PdfContext context, ImageResult imageResult) throws BadElementException, IOException {
  Bbox imageBounds = imageResult.getRasterImage().getBounds();
  float scaleFactor = (float) (72 / getMap().getRasterResolution());
  float width = (float) imageBounds.getWidth() * scaleFactor;
  float height = (float) imageBounds.getHeight() * scaleFactor;
  // subtract screen position of lower-left corner
  float x = (float) (imageBounds.getX() - rasterScale * bbox.getMinX()) * scaleFactor;
  // shift y to lowerleft corner, flip y to user space and subtract
  // screen position of lower-left
  // corner
  float y = (float) (-imageBounds.getY() - imageBounds.getHeight() - rasterScale * bbox.getMinY()) * scaleFactor;
  if (log.isDebugEnabled()) {
    log.debug("adding image, width=" + width + ",height=" + height + ",x=" + x + ",y=" + y);
  }
  // opacity
  log.debug("before drawImage");
  context.drawImage(Image.getInstance(imageResult.getImage()), new Rectangle(x, y, x + width, y + height),
      getSize(), getOpacity());
  log.debug("after drawImage");
}
origin: org.geomajas.plugin/geomajas-plugin-printing

/**
 * Add image with a exception message in the PDF document.
 *
 * @param context PDF context
 * @param e exception to put in image
 */
protected void addLoadError(PdfContext context, ImageException e) {
  Bbox imageBounds = e.getRasterImage().getBounds();
  float scaleFactor = (float) (72 / getMap().getRasterResolution());
  float width = (float) imageBounds.getWidth() * scaleFactor;
  float height = (float) imageBounds.getHeight() * scaleFactor;
  // subtract screen position of lower-left corner
  float x = (float) (imageBounds.getX() - rasterScale * bbox.getMinX()) * scaleFactor;
  // shift y to lower left corner, flip y to user space and subtract
  // screen position of lower-left
  // corner
  float y = (float) (-imageBounds.getY() - imageBounds.getHeight() - rasterScale * bbox.getMinY()) * scaleFactor;
  if (log.isDebugEnabled()) {
    log.debug("adding failed message=" + width + ",height=" + height + ",x=" + x + ",y=" + y);
  }
  float textHeight = context.getTextSize("failed", ERROR_FONT).getHeight() * 3f;
  Rectangle rec = new Rectangle(x, y, x + width, y + height);
  context.strokeRectangle(rec, Color.RED, 0.5f);
  context.drawText(getNlsString("RasterLayerComponent.loaderror.line1"), ERROR_FONT, new Rectangle(x, y
      + textHeight, x + width, y + height), Color.RED);
  context.drawText(getNlsString("RasterLayerComponent.loaderror.line2"), ERROR_FONT, rec, Color.RED);
  context.drawText(getNlsString("RasterLayerComponent.loaderror.line3"), ERROR_FONT, new Rectangle(x, y
      - textHeight, x + width, y + height), Color.RED);
}
org.geomajas.layer.tileRasterTilegetBounds

Javadoc

Returns the bounds for the image on the client side.

Popular methods of RasterTile

  • <init>
    Constructor setting the tile's unique ID and bounds.
  • setCode
    Set the unique code for this tile. Consider this it's unique identifier within a raster layer.
  • setUrl
    Set the URL to the actual image for this raster tile. It is that image that will really display the
  • getUrl
    Return the URL to the actual image for this raster tile. It is that image that will really display t
  • getCode
    Returns the unique code for this tile. Consider this it's unique identifier within a raster layer.
  • setBounds
    Sets the bounds for the image on the client side.

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFileChooser (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now