Package org.locationtech.udig.catalog

Examples of org.locationtech.udig.catalog.IGeoResource.canResolve()


        noFeatureLabel.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
        noFeatureLabel.setText(Messages.SimpleLineEditorPage_0);

        StyleLayer layer = getSelectedLayer();
        IGeoResource resource = layer.getGeoResource();
        if (resource.canResolve(FeatureSource.class)) {
            StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
            oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
            if (oldStyle == null) {
                oldStyle = Utilities.createDefaultLineStyle();
            }
View Full Code Here


    }

    public void refresh() {
        StyleLayer layer = getSelectedLayer();
        IGeoResource resource = layer.getGeoResource();
        if (!resource.canResolve(FeatureSource.class)) {
            return;
        }

        StyleBlackboard styleBlackboard = layer.getStyleBlackboard();
        oldStyle = (Style) styleBlackboard.get(SLDContent.ID);
View Full Code Here

            for( Object layer : layers ) {
                if (layer instanceof IGeoResource) {
                    IGeoResource geoResource = (IGeoResource) layer;
                    try {
                        GridGeometry2D gridGeometry = null;
                        if (geoResource.canResolve(GridGeometry2D.class)) {
                            gridGeometry = geoResource.resolve(GridGeometry2D.class, new NullProgressMonitor());
                        } else if (geoResource.canResolve(GridCoverage.class)) {
                            GridCoverage2D gridCoverage = (GridCoverage2D) geoResource.resolve(GridCoverage.class,
                                    new NullProgressMonitor());
                            gridGeometry = gridCoverage.getGridGeometry();
View Full Code Here

                    IGeoResource geoResource = (IGeoResource) layer;
                    try {
                        GridGeometry2D gridGeometry = null;
                        if (geoResource.canResolve(GridGeometry2D.class)) {
                            gridGeometry = geoResource.resolve(GridGeometry2D.class, new NullProgressMonitor());
                        } else if (geoResource.canResolve(GridCoverage.class)) {
                            GridCoverage2D gridCoverage = (GridCoverage2D) geoResource.resolve(GridCoverage.class,
                                    new NullProgressMonitor());
                            gridGeometry = gridCoverage.getGridGeometry();
                        }
                        if (gridGeometry != null)
View Full Code Here

        IMap activeMap = ApplicationGIS.getActiveMap();
        List<ILayer> mapLayers = activeMap.getMapLayers();
        itemsMap.clear();
        for( ILayer layer : mapLayers ) {
            IGeoResource geoResource = layer.getGeoResource();
            if (geoResource.canResolve(GridCoverage.class)) {
                itemsMap.put(geoResource.getTitle(), geoResource);
            }
        }
    }
View Full Code Here

        Coordinate evaluateCoord = null;
        // try to go for the reader first
        boolean isOnGrid = false;
        boolean hasProblem = false;
        Point2D p = null;
        if (geoResource.canResolve(AbstractGridCoverage2DReader.class)) {
            AbstractGridCoverage2DReader reader = geoResource.resolve(AbstractGridCoverage2DReader.class, monitor);
            GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();
            CoordinateReferenceSystem targetCrs = reader.getCrs();

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

                gridGeometry = new GridGeometry2D(reader.getOriginalGridRange(), reader.getOriginalEnvelope());
                isOnGrid = true;
            }
        }
        // else try with coverage
        else if (geoResource.canResolve(GridCoverage.class)) {
            coverage = (GridCoverage2D) geoResource.resolve(GridCoverage.class, monitor);
            CoordinateReferenceSystem targetCrs = coverage.getCoordinateReferenceSystem();
            gridGeometry = coverage.getGridGeometry();
            evaluateCoord = transform(sourceCRS, targetCrs, envelopeCenterOrig);
            p = new Point2D.Double(evaluateCoord.x, evaluateCoord.y);
View Full Code Here

        }
        if (resolve instanceof IResolveFolder ) {
          return CatalogUIPlugin.getDefault().getImage(ISharedImages.FOLDER_OBJ);
        }else if (resolve instanceof IGeoResource) {
            IGeoResource resource = (IGeoResource) resolve;
            boolean isFeature = resource.canResolve(FeatureSource.class);
            String iconId = iconInternalResource( resource.getID(), isFeature );
            return CatalogUIPlugin.getDefault().getImage( iconId );
        } else if (resolve instanceof IService) {
            IService service = (IService) resolve;
            boolean isFeature = service.canResolve(DataStore.class);
View Full Code Here

    public void createPageContent( Composite parent ) {

        Layer layer = getSelectedLayer();
        IGeoResource resource = layer.getGeoResource();

        if (resource.canResolve(JGrassMapGeoResource.class)) {
            try {
                JGrassMapGeoResource grassMapGeoResource = resource.resolve(
                        JGrassMapGeoResource.class, null);
                if (grassMapGeoResource.getType().equals(JGrassConstants.GRASSBINARYRASTERMAP)) {
                    editorSupported = true;
View Full Code Here

         * draw the graphic's border.
         */
        for( int i = context.getMapLayers().size() - 1; i >= 0; i-- ) {
            ILayer layer = context.getMapLayers().get(i);
            IGeoResource geoResource = layer.getGeoResource();
            boolean isMapgraphic = geoResource.canResolve(MapGraphicResource.class);
            if (!isMapgraphic && layer.isVisible()) {

                // String layerName = LayerGeneratedGlyphDecorator.generateLabel((Layer) layer);
                String layerName = layer.getName();
                if (layerName != null && layerName.length() != 0) {
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.