Package org.geomajas.plugin.geocoder.api

Examples of org.geomajas.plugin.geocoder.api.CombineResultService.combine()


      if (results.size() == 1) {
        response.setUserData(results.get(0).getUserData());
      }

      // combine location envelopes
      Envelope resultEnvelope = combineResultService.combine(results);
      Bbox bbox = dtoConverterService.toDto(resultEnvelope);
      response.setBbox(bbox);
      response.setCenter(new Coordinate(bbox.getX() + bbox.getWidth() / 2, bbox.getY() + bbox.getHeight() / 2));
    } else {
      List<GetLocationForStringAlternative> altList = new ArrayList<GetLocationForStringAlternative>();
View Full Code Here


    List<GetLocationResult> list = new ArrayList<GetLocationResult>();
    list.add(glr1);
    list.add(glr2);

    CombineResultService cis = new CombineIntersectionService();
    Envelope res = cis.combine(list);
    Assert.assertEquals(20.0, res.getMinX(), DELTA);
    Assert.assertEquals(25.0, res.getMinY(), DELTA);
    Assert.assertEquals(35.0, res.getMaxX(), DELTA);
    Assert.assertEquals(30.0, res.getMaxY(), DELTA);
  }
View Full Code Here

    List<GetLocationResult> list = new ArrayList<GetLocationResult>();
    list.add(glr1);
    list.add(glr2);

    CombineResultService cis = new CombineUnionService();
    Envelope res = cis.combine(list);
    Assert.assertEquals(10.0, res.getMinX(), DELTA);
    Assert.assertEquals(10.0, res.getMinY(), DELTA);
    Assert.assertEquals(40.0, res.getMaxX(), DELTA);
    Assert.assertEquals(50.0, res.getMaxY(), DELTA);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.