Package it.geosolutions.geoserver.rest.encoder

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


  /**
   * 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


  /**
   * 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

Related Classes of it.geosolutions.geoserver.rest.encoder.GSResourceEncoder$GSMetadataEncoder

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.