Package org.opengis.referencing.crs

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem


  }

  @Test
  public void testGetFeaturesVisibleArea() throws Exception {
    List<InternalFeature> features;
    CoordinateReferenceSystem crs = beanLayer.getCrs();

    login("luc");
    features = layerService.getFeatures(LAYER_ID,crs, null, null, VectorLayerService.FEATURE_INCLUDE_NONE);
    Assert.assertEquals(3, features.size());
View Full Code Here


  }

  @Test
  public void testGetBoundsVisibleArea() throws Exception {
    CoordinateReferenceSystem crs = beanLayer.getCrs();
    Envelope envelope;

    login("luc");
    envelope = layerService.getBounds(LAYER_ID, crs, null);
    Assert.assertEquals(0, envelope.getMinX(), ALLOWANCE);
View Full Code Here

  public void testSaveOrUpdateUpdateArea() throws Exception {
    Filter filter;
    List<InternalFeature> oldFeatures;
    List<InternalFeature> newFeatures;
    InternalFeature feature;
    CoordinateReferenceSystem crs = beanLayer.getCrs();

    login("marino");
    // should be able to update feature "2"
    filter = filterService.createFidFilter(new String[]{"2"});
    oldFeatures = layerService.getFeatures(LAYER_ID, crs, filter, null,
View Full Code Here

  public void testSaveOrUpdateDeleteArea() throws Exception {
    Filter filter;
    List<InternalFeature> oldFeatures;
    List<InternalFeature> newFeatures;
    InternalFeature feature;
    CoordinateReferenceSystem crs = beanLayer.getCrs();

    login("marino");
    // should not be able to delete feature "2"
    filter = filterService.createFidFilter(new String[]{"2"});
    oldFeatures = layerService.getFeatures(LAYER_ID, crs, filter, null,
View Full Code Here

  public void testSaveOrUpdateCreateArea() throws Exception {
    Filter filter;
    List<InternalFeature> oldFeatures;
    List<InternalFeature> newFeatures;
    InternalFeature feature;
    CoordinateReferenceSystem crs = beanLayer.getCrs();
    GeometryFactory geometryFactory = new GeometryFactory(new PrecisionModel());
    Geometry geometry;

    login("marino");
    // verify failing
View Full Code Here

    ThreadScopeContextHolder.clear();
  }

  @Test
  public void testGetBoundsVisibleArea() throws Exception {
    CoordinateReferenceSystem crs = beanLayer.getCrs();
    Envelope envelope;

    login("luc");
    recorder.clear();
    envelope = layerService.getBounds(LAYER_ID, crs, null);
View Full Code Here

  @Test
  @DirtiesContext
  @SuppressWarnings("unchecked")
  public void testUpdate() throws Exception {
    Filter filter = filterService.createFidFilter(new String[]{"3"});
    CoordinateReferenceSystem crs = geoService.getCrs(beanLayer.getLayerInfo().getCrs());
    List<InternalFeature> oldFeatures = layerService.getFeatures(LAYER_ID,
        crs, filter, null, VectorLayerService.FEATURE_INCLUDE_ATTRIBUTES);
    Assert.assertEquals(1, oldFeatures.size());
    InternalFeature feature = oldFeatures.get(0);
    List<InternalFeature> newFeatures = new ArrayList<InternalFeature>();
View Full Code Here

  public void testCreateDelete() throws Exception {
    // done in one test to assure the state is back to what is expected,
    // the spring context is not rebuilt between test methods
   
    // Create first
    CoordinateReferenceSystem crs = geoService.getCrs(beanLayer.getLayerInfo().getCrs());
    List<InternalFeature> oldFeatures = new ArrayList<InternalFeature>();
    List<InternalFeature> newFeatures = new ArrayList<InternalFeature>();
    InternalFeature feature = converterService.toInternal(new Feature());
    feature.setId("4");
    feature.setLayer(beanLayer);
View Full Code Here

        "Got item from cache"));
    Assert.assertEquals(null, securityContext.getUserId());
  }

  private void checkLuc() throws Exception {
    CoordinateReferenceSystem crs = beanLayer.getCrs();
    Envelope envelope;
    recorder.clear();
    envelope = layerService.getBounds(LAYER_ID, crs, null);
    junit.framework.Assert.assertEquals(0, envelope.getMinX(), ALLOWANCE);
    junit.framework.Assert.assertEquals(0, envelope.getMinY(), ALLOWANCE);
View Full Code Here

    junit.framework.Assert.assertEquals(7, envelope.getMaxX(), ALLOWANCE);
    junit.framework.Assert.assertEquals(3, envelope.getMaxY(), ALLOWANCE);
  }

  private void checkMarino() throws Exception {
    CoordinateReferenceSystem crs = beanLayer.getCrs();
    Envelope envelope;
    recorder.clear();
    envelope = layerService.getBounds(LAYER_ID, crs, null);
    junit.framework.Assert.assertEquals(2, envelope.getMinX(), ALLOWANCE);
    junit.framework.Assert.assertEquals(0, envelope.getMinY(), ALLOWANCE);
View Full Code Here

TOP

Related Classes of org.opengis.referencing.crs.CoordinateReferenceSystem

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.