Examples of CoordinateReferenceSystem


Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

  @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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

  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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

        "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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

    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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

  @Autowired
  private GeoService geoService;

  /** {@inheritDoc} */
  public Crs getCrs(Layer layer) throws LayerException {
    CoordinateReferenceSystem check = layer.getCrs();
    if (check instanceof Crs) {
      return (Crs) check;
    }
    return geoService.getCrs2(layer.getLayerInfo().getCrs());
  }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

    securityManager.createSecurityContext(((LoginResponse)response).getToken());
  }

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

    login("luc");
    recorder.clear();
    features = layerService.getFeatures(LAYER_ID, crs, null, null, VectorLayerService.FEATURE_INCLUDE_NONE);
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

  @PostConstruct
  protected void postConstruct() throws GeomajasException {
    if (null != crsDefinitions) {
      for (CrsInfo crsInfo : crsDefinitions.values()) {
        try {
          CoordinateReferenceSystem crs = CRS.parseWKT(crsInfo.getCrsWkt());
          String code = crsInfo.getKey();
          crsCache.put(code, CrsFactory.getCrs(code, crs));
        } catch (FactoryException e) {
          throw new GeomajasException(e, ExceptionCode.CRS_DECODE_FAILURE_FOR_MAP, crsInfo.getKey());
        }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

    private final Timer savePostcodeUnit = Metrics.newTimer(ProcessCPOCsvEntry.class, "save-postcode-unit-mongodb", TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS);

    @Override
    public void preStart() {
        try {
            CoordinateReferenceSystem osgbCrs = CRS.decode("EPSG:27700"); // OSGB 1936 / British National Grid
            CoordinateReferenceSystem wgs84crs = DefaultGeographicCRS.WGS84; // WGS 84, GPS

            osgbToWgs84Transform = CRS.findMathTransform(osgbCrs, wgs84crs);
        } catch (FactoryException e) {
            throw Throwables.propagate(e);
        }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

          
                position++;
              }
             
               
              CoordinateReferenceSystem dataCRS = featureSource.getSchema().getCoordinateReferenceSystem();
            
              String code = "EPSG:4326";
              CRSAuthorityFactory crsAuthorityFactory = CRS.getAuthorityFactory(true);
              CoordinateReferenceSystem mapCRS = crsAuthorityFactory.createCoordinateReferenceSystem(code);
               
               
              boolean lenient = true; // allow for some error due to different datums
              MathTransform transform = CRS.findMathTransform(dataCRS, mapCRS, lenient);
             
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

      
       final GeographicCRS geoCRS =
           crsAuthorityFactory.createGeographicCRS("EPSG:4326");
//         org.geotools.referencing.crs.DefaultGeographicCRS.WGS84;

       final CoordinateReferenceSystem dataCRS =
           crsAuthorityFactory
               .createCoordinateReferenceSystem("EPSG:"
                   + getEPSGCodefromUTS(refLatLon)); //EPSG:32618

       //      parameters = mtFactory.getDefaultParameters("Transverse_Mercator");
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.