Examples of CoordinateReferenceSystem


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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

            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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

            .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

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

                if (fs != null) {
                    bounds = (ReferencedEnvelope) fs.getBounds();
                }

                if (bounds == null) {
                    CoordinateReferenceSystem crs = fs.getSchema().getCoordinateReferenceSystem();

                    // try getting an envelope out of the crs
                    org.opengis.geometry.Envelope envelope = CRS.getEnvelope(crs);

                    if (envelope != null) {
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

        Point point = geom.getCentroid();
       
        IMap imap = ApplicationGIS.getActiveMap();
        if( imap == ApplicationGIS.NO_MAP ) return;
       
        CoordinateReferenceSystem world = imap.getViewportModel().getCRS();
        CoordinateReferenceSystem wsg84 = DefaultGeographicCRS.WGS84;
       
        double buffer = 0.01; // how much of the wgs84 world to see
        Envelope view = point.buffer( buffer ).getEnvelopeInternal();
       
        MathTransform transform;
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

        if (xpath.equals(DEFAULT)){
            xpath = geometryDescriptor.getName().getLocalPart();
        }
        Geometry geometry = (Geometry) value;
        if( geometry.getUserData() == null ){
            CoordinateReferenceSystem crs = geometryDescriptor.getCoordinateReferenceSystem();
            if( crs != null ){
                String srsName = CRS.toSRS(crs);
                geometry.setUserData(srsName);
            }
        }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

                ReferencingFactoryFinder.scanForPlugins(); // hook everything up
                monitor.worked(10);
            }

            monitor.subTask(Messages.PLEASE_WAIT);
            CoordinateReferenceSystem wgs84 = CRS.decode("EPSG:4326"); //$NON-NLS-1$
            if (wgs84 == null) {
                String msg = "Unable to locate EPSG authority for EPSG:4326; consider removing temporary 'GeoTools' directory and trying again."; //$NON-NLS-1$
                System.out.println(msg);
                // throw new FactoryException(msg);
            }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

            monitor = new NullProgressMonitor();

        monitor.beginTask(Messages.EPSG_SETUP, IProgressMonitor.UNKNOWN);
        try {
            monitor.subTask(Messages.PLEASE_WAIT);
            CoordinateReferenceSystem wgs84 = CRS.decode("EPSG:4326"); //$NON-NLS-1$
            if (wgs84 == null) {
                String msg = "Unable to locate EPSG authority for EPSG:4326; consider removing temporary 'GeoTools' directory and trying again."; //$NON-NLS-1$
                System.out.println(msg);
                // throw new FactoryException(msg);
            }
View Full Code Here

Examples of org.opengis.referencing.crs.CoordinateReferenceSystem

     *
     * @return true if referencing is working and we get the expected result
     * @throws Exception if we cannot even get that far
     */
    private static void verifyReferencingEpsg() throws Exception {
        CoordinateReferenceSystem WGS84 = CRS.decode("EPSG:4326"); // latlong //$NON-NLS-1$
        CoordinateReferenceSystem BC_ALBERS = CRS.decode("EPSG:3005"); //$NON-NLS-1$

        MathTransform transform = CRS.findMathTransform(BC_ALBERS, WGS84);
        DirectPosition here = new DirectPosition2D(BC_ALBERS, 1187128, 395268);
        DirectPosition there = new DirectPosition2D(WGS84, -123.47009173007372, 48.54326498732153);

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.