Package org.geomajas.geometry

Examples of org.geomajas.geometry.Bbox


  @Test
  public void testOneVectorLayer() throws Exception {
    ClientMapInfo mapInfo = new ClientMapInfo();
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(1);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
    ClientVectorLayerInfo clientBeansPointLayerInfo = new ClientVectorLayerInfo();
View Full Code Here


  @Test
  public void testTwoVectorLayers() throws Exception {
    ClientMapInfo mapInfo = new ClientMapInfo();
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(1);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
View Full Code Here

  @Test
  public void testGeometry() throws Exception {
    ClientMapInfo mapInfo = new ClientMapInfo();
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    mapRasterizingInfo.setBounds(new Bbox(-80, -50, 100, 100));
    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(1);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
View Full Code Here

  @Test
  public void testOneRasterLayer() throws Exception {
    ClientMapInfo mapInfo = new ClientMapInfo();
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    mapRasterizingInfo.setBounds(new Bbox(-180, -90, 360, 180));
    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(2);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
View Full Code Here

  @Test
  public void testLegend() throws Exception {
    ClientMapInfo mapInfo = new ClientMapInfo();
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    mapRasterizingInfo.setBounds(new Bbox(-180, -90, 360, 180));
    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(2);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
View Full Code Here

  @Test
  public void testLegendDynamic() throws Exception {
    ClientMapInfo mapInfo = new ClientMapInfo();
    MapRasterizingInfo mapRasterizingInfo = new MapRasterizingInfo();
    // set the bounds so no features are visible
    mapRasterizingInfo.setBounds(new Bbox(-180, -90, -170, -80));
    mapInfo.setCrs("EPSG:4326");
    mapRasterizingInfo.setScale(2);
    mapRasterizingInfo.setTransparent(true);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
View Full Code Here

   * @param envelope
   *            JTS envelope
   * @return Geomajas <code>Bbox</code>
   */
  public Bbox toDto(Envelope envelope) {
    return new Bbox(envelope.getMinX(), envelope.getMinY(), envelope.getWidth(), envelope.getHeight());
  }
View Full Code Here

    checkOrRender(fileName, paintLabels, paintGeometries, layerBeansPoint, layerBeansPointStyleInfo);
  }

  protected void checkOrRender(String fileName, boolean paintLabels, boolean paintGeometries, VectorLayer layer,
      NamedStyleInfo styleInfo) throws Exception {
    checkOrRender(fileName, paintLabels, paintGeometries, layer, styleInfo, new Bbox(-50, -50, 100, 100));
  }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void transformBboxOutsideTest() throws Exception {
    Bbox bbox = new Bbox(0, 0, 1, 1);
    Bbox transformed = geoService.transform(bbox, LONLAT, LAMBERT72);
    // we expect a warning and an empty box
    Assert.assertEquals(0.0, transformed.getX(), DELTA);
    Assert.assertEquals(0.0, transformed.getY(), DELTA);
    Assert.assertEquals(0.0, transformed.getMaxX(), DELTA);
    Assert.assertEquals(0.0, transformed.getMaxY(), DELTA);
  }
View Full Code Here

   *
   * @throws Exception
   */
  @Test
  public void transformBboxOverlappingTest() throws Exception {
    Bbox bbox = new Bbox(51, 5, 10, 10);
    Bbox transformed1 = geoService.transform(bbox, LONLAT, LAMBERT72);
    // we expect the same result if we transform the clipped part
    Bbox bboxClipped = new Bbox(51, 5, 6, 4);
    Bbox transformed2 = geoService.transform(bboxClipped, LONLAT, LAMBERT72);

    Assert.assertEquals(transformed1.getX(), transformed2.getX(), DELTA);
    Assert.assertEquals(transformed1.getY(), transformed2.getY(), DELTA);
    Assert.assertEquals(transformed1.getMaxX(), transformed2.getMaxX(), DELTA);
    Assert.assertEquals(transformed1.getMaxY(), transformed2.getMaxY(), DELTA);
  }
View Full Code Here

TOP

Related Classes of org.geomajas.geometry.Bbox

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.