Examples of GSResourceEncoder


Examples of it.geosolutions.geoserver.rest.encoder.GSResourceEncoder

  /**
   * test set or reset of reprojection
   */
  @Test
  public void testReprojection(){
    GSResourceEncoder/*<GSDimensionInfoEncoder>*/ re=new GSCoverageEncoder();
   
    re.setProjectionPolicy(ProjectionPolicy.FORCE_DECLARED);
    re.setSRS("EPSG:4326");
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"projectionPolicy",ProjectionPolicy.FORCE_DECLARED.toString()));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"srs","EPSG:4326"));
   
    re.setProjectionPolicy(ProjectionPolicy.NONE);
    re.setNativeCRS("EPSG:4326");
    Assert.assertNull(ElementUtils.contains(re.getRoot(),"projectionPolicy",ProjectionPolicy.FORCE_DECLARED.toString()));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"projectionPolicy",ProjectionPolicy.NONE.toString()));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"nativeCRS","EPSG:4326"));
   
    re.setProjectionPolicy(ProjectionPolicy.REPROJECT_TO_DECLARED);
    re.setNativeCRS(WGS84);
    re.setSRS("EPSG:4326");
    Assert.assertNull(ElementUtils.contains(re.getRoot(),"projectionPolicy",ProjectionPolicy.FORCE_DECLARED.toString()));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"nativeCRS",WGS84));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"srs","EPSG:4326"));
  }
View Full Code Here

Examples of it.geosolutions.geoserver.rest.encoder.GSResourceEncoder

  /**
   * test set or reset of BB
   */
  @Test
  public void testBB(){
    GSResourceEncoder/*<GSDimensionInfoEncoder>*/ re=new GSCoverageEncoder();
   
    re.setLatLonBoundingBox(-180d, 90d, 180d, -90d, WGS84);
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"minx","-180.0"));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"crs",WGS84));
   
    re.setLatLonBoundingBox(-90d, 45d, 180d, -90d, WGS84);
   
    Assert.assertNull(ElementUtils.contains(re.getRoot(),"minx","-180.0"));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"minx","-90.0"));
    Assert.assertNotNull(ElementUtils.contains(re.getRoot(),"crs",WGS84));
  }
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.