Package org.opengis.referencing.crs

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


    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

  @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

    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

          
                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

      
       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

      
       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

     */
    @Override
    public ReferencedEnvelope getExtent() {
        Geometry geometry = getGeometry();
        if (geometry != null){
            CoordinateReferenceSystem crs = getCrs();
            return new ReferencedEnvelope(geometry.getEnvelopeInternal(), crs);
        }
        return null;
    }
View Full Code Here

            geometry = JTS.toGeometry( aOIService.getExtent());
            if(geometry == null){
                return filter; // no change!
            }
        }
        CoordinateReferenceSystem aoiCRS = aOIService.getCrs();
        if( aoiCRS != null && !CRS.equalsIgnoreMetadata(aoiCRS, dataCRS )){
            try {
                MathTransform transform = CRS.findMathTransform( aoiCRS, dataCRS);
                geometry = JTS.transform(geometry, transform);
            }
View Full Code Here

            .resolve(FeatureSource.class, new NullProgressMonitor());
        ReferencedEnvelope temp = source.getBounds();

        bounds = temp;
        if (bounds == null) {
          CoordinateReferenceSystem crs = getCRS();
          // try getting an envelope out of the crs
          org.opengis.geometry.Envelope envelope = CRS
              .getEnvelope(crs);

          if (envelope != null) {
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.