Package org.geotools.geometry.jts

Examples of org.geotools.geometry.jts.ReferencedEnvelope.transform()


                gc.setDirection(135, 10000.0);
                Point2D p2 = gc.getDestinationGeographicPoint();
                env.expandToInclude(p2.getX(), p2.getY());

                ReferencedEnvelope tmpBounds = new ReferencedEnvelope(env, DefaultGeographicCRS.WGS84);
                bounds = tmpBounds.transform(tmsCrs, true);

                // bounds = new ReferencedEnvelope(env, tmsCrs);
                super.icon = CatalogUIPlugin.getDefault().getImageDescriptor(ISharedImages.GRID_OBJ);
            } catch (Exception e) {
                super.icon = AbstractUIPlugin.imageDescriptorFromPlugin(JGrassPlugin.PLUGIN_ID, "icons/obj16/problem.gif"); //$NON-NLS-1$
View Full Code Here


            // Make transform from Graticule to map CRS
            MathTransform transform = CRS.findMathTransform(graticule.getCRS(), context.getCRS(),
                    false);

            // Transform bounds into Graticule CRS
            bounds = bounds.transform(graticule.getCRS(), true);

            // Get squares inside bounds
            SimpleFeatureIterator it = squares(bounds, size);

//            // Initialize border tick positions
View Full Code Here

        IViewportModel model = getProjectElement().getViewportModel();
        Envelope bounds = model.getBounds();
        CoordinateReferenceSystem crs = model.getCRS();
        ReferencedEnvelope extent = new ReferencedEnvelope(bounds, crs);
        try {
            return extent.transform(DefaultGeographicCRS.WGS84, true);
        } catch (Exception e) {
            return new Envelope(-180, 180, -90, 90);
        }
    }
View Full Code Here

             if( reader == null ){
                 return; // unable to connect!
             }
             CoordinateReferenceSystem destinationCRS = currentContext.getCRS();
             ReferencedEnvelope bounds = (ReferencedEnvelope) currentContext.getImageBounds();
             bounds=bounds.transform(destinationCRS, true);
            
             ParameterValueGroup group = geoResource.resolve( ParameterValueGroup.class, monitor);
             if(group==null){
                 group=reader.getFormat().getReadParameters();
             }
View Full Code Here

                // show the bounds of the context
                bounds = getContext().getImageBounds();
                if (bounds instanceof ReferencedEnvelope) {
                    ReferencedEnvelope all = (ReferencedEnvelope) bounds;
                    if (!contextCRS.equals(all.getCoordinateReferenceSystem())) {
                        bounds = all.transform(contextCRS, true, 10);
                    }
                } else {
                    // this should not happen!
                    ReferencedEnvelope all = new ReferencedEnvelope(bounds, getContext()
                            .getViewportModel().getCRS());
View Full Code Here

                    }
                } else {
                    // this should not happen!
                    ReferencedEnvelope all = new ReferencedEnvelope(bounds, getContext()
                            .getViewportModel().getCRS());
                    bounds = all.transform(contextCRS, true, 10);
                }
            }
            AffineTransform world2screen = null;
            renderer = new GridCoverageRenderer(contextCRS, bounds, rectangle, world2screen);
View Full Code Here

           
          CoordinateReferenceSystem destinationCRS = currentContext.getCRS();

            final IGeoResource geoResource = currentContext.getGeoResource();
            ReferencedEnvelope bounds = (ReferencedEnvelope) currentContext.getImageBounds();
            bounds=bounds.transform(destinationCRS, true);
           
            GridEnvelope range=new GridEnvelope2D(0,0, mapDisplay.getWidth(), mapDisplay.getHeight() );
           
            MathTransform displayToLayer=currentContext.worldToScreenMathTransform().inverse();
            ReferencingFactoryFinder.getMathTransformFactory(null).createConcatenatedTransform(displayToLayer, currentContext.getLayer().mapToLayerTransform());
View Full Code Here

                // show the bounds of the context
                bounds = getContext().getImageBounds();
                if (bounds instanceof ReferencedEnvelope) {
                    ReferencedEnvelope all = (ReferencedEnvelope) bounds;
                    if (!contextCRS.equals(all.getCoordinateReferenceSystem())) {
                        bounds = all.transform(contextCRS, true, 10);
                    }
                } else {
                    // this should not happen!
                    ReferencedEnvelope all = new ReferencedEnvelope(bounds, getContext()
                            .getViewportModel().getCRS());
View Full Code Here

                    }
                } else {
                    // this should not happen!
                    ReferencedEnvelope all = new ReferencedEnvelope(bounds, getContext()
                            .getViewportModel().getCRS());
                    bounds = all.transform(contextCRS, true, 10);
                }
            }
            AffineTransform world2screen = null;
            renderer = new GridCoverageRenderer(contextCRS, bounds, rectangle,world2screen);
View Full Code Here

        FeatureStore<SimpleFeatureType, SimpleFeature> store = getResource(editLayer);
       
        // transforms the bbox to the layer crs
        ReferencedEnvelope bbox = handler.getContext().getBoundingBox(event.getPoint(), SEARCH_SIZE);
        try {
          bbox = bbox.transform(parameters.handler.getEditLayer().getCRS(), true);
        } catch (TransformException e) {
          logTransformationWarning(e);
        } catch (FactoryException e) {
          logTransformationWarning(e);
        }
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.