Package org.geomajas.command.dto

Examples of org.geomajas.command.dto.TransformGeometryResponse


    Bbox origin = new Bbox(10, 30, 10, 10);
    request.setBounds(origin);
    request.setSourceCrs(MERCATOR);
    request.setTargetCrs(LONLAT);
    // execute
    TransformGeometryResponse response = (TransformGeometryResponse) dispatcher.execute(
        TransformGeometryRequest.COMMAND, request, null, "en");
    Bbox transformed = response.getBounds();
    Assert.assertEquals(8.983152841195215E-5, transformed.getX(), DELTA);
    Assert.assertEquals(2.6949458522981454E-4, transformed.getY(), DELTA);
    Assert.assertEquals(1.796630568239043E-4, transformed.getMaxX(), DELTA);
    Assert.assertEquals(3.593261136397527E-4, transformed.getMaxY(), DELTA);
  }
View Full Code Here


    Geometry origin = converterService.toDto(reader.read("POLYGON((10 30, 20 30,20 40,10 40,10 30))"));
    request.setGeometry(origin);
    request.setSourceCrs(MERCATOR);
    request.setTargetCrs(LONLAT);
    // execute
    TransformGeometryResponse response = (TransformGeometryResponse) dispatcher.execute(
        TransformGeometryRequest.COMMAND, request, null, "en");
    Geometry transformed = response.getGeometry();
    Envelope bounds = converterService.toInternal(transformed).getEnvelopeInternal();
    Assert.assertEquals(8.983152841195215E-5, bounds.getMinX(), DELTA);
    Assert.assertEquals(2.6949458522981454E-4, bounds.getMinY(), DELTA);
    Assert.assertEquals(1.796630568239043E-4, bounds.getMaxX(), DELTA);
    Assert.assertEquals(3.593261136397527E-4, bounds.getMaxY(), DELTA);
View Full Code Here

    geometries.add(origin);
    request.setGeometryCollection(geometries); // assure setter is called/tested
    request.setSourceCrs(MERCATOR);
    request.setTargetCrs(LONLAT);
    // execute
    TransformGeometryResponse response = (TransformGeometryResponse) dispatcher.execute(
        TransformGeometryRequest.COMMAND, request, null, "en");
    List<Geometry> transformed = response.getGeometryCollection();
    Assert.assertEquals(1, transformed.size());
    Envelope bounds = converterService.toInternal(transformed.get(0)).getEnvelopeInternal();
    Assert.assertEquals(8.983152841195215E-5, bounds.getMinX(), DELTA);
    Assert.assertEquals(2.6949458522981454E-4, bounds.getMinY(), DELTA);
    Assert.assertEquals(1.796630568239043E-4, bounds.getMaxX(), DELTA);
View Full Code Here

  @Autowired
  private GeoService geoService;

  public TransformGeometryResponse getEmptyCommandResponse() {
    return new TransformGeometryResponse();
  }
View Full Code Here

TOP

Related Classes of org.geomajas.command.dto.TransformGeometryResponse

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.