Examples of canResolve()


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

    }

    public boolean canRender( IRenderContext context ) throws IOException {
        // check if it is a Property resource
        IGeoResource resource = context.getGeoResource();
        boolean isRightResource = resource.canResolve(JGrassMapGeoResource.class);
        boolean isRightType = false;

        if (resource.getInfo(null).getDescription() == null) {
            isRightType = false;
        } else {
View Full Code Here

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

                @Override
                protected IStatus run(IProgressMonitor monitor) {
                    IGeoResource resource = (IGeoResource) getElement().getAdapter(
                            IGeoResource.class);
                    SimpleFeatureType schema = null;
                    if (resource.canResolve(SimpleFeatureType.class)) {
                        try {
                            schema = resource.resolve(SimpleFeatureType.class, monitor);
                        } catch (IOException e) {
                        }
                    }
View Full Code Here

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

                        try {
                            schema = resource.resolve(SimpleFeatureType.class, monitor);
                        } catch (IOException e) {
                        }
                    }
                    if (resource.canResolve(SimpleFeatureSource.class)) {
                        SimpleFeatureSource featureSource;
                        try {
                            featureSource = resource.resolve(SimpleFeatureSource.class, monitor);
                            schema = featureSource != null ? featureSource.getSchema() : null;
                        } catch (IOException e) {
View Full Code Here

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

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

    }

    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

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

            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

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

                    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

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

        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

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

        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

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

                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
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.