Examples of IGeoResource


Examples of org.locationtech.udig.catalog.IGeoResource

        return true;
    }

    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

     *
     * @uml.property name="geoResource"
     * @generated NOT
     */
    public void setGeoResource(IGeoResource newPreferredGeoResource) {
        IGeoResource oldPreferredGeoResource = geoResource;
        geoResource = newPreferredGeoResource;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    ProjectPackage.LAYER__GEO_RESOURCE, oldPreferredGeoResource, geoResource));
    }
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

            return true; // info is supported by most layers
        }
        if (Interaction.SELECT.equals(interaction)) {
            return true; // selection is supported by most layers
        } else if (Interaction.EDIT.equals(interaction)) {
            IGeoResource found = this.getGeoResource(FeatureStore.class);
            return found != null;
        }
        return false;
    }
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

        }
        if (IGeoResource.class.isAssignableFrom(adapter)) {
            // Now we can check the other way, for menu items or actions
            // that want to test for a specific implementation such as
            // ShpGeoResource
            IGeoResource resource = getGeoResource();
            if (resource != null) {
                if (adapter.isAssignableFrom(resource.getClass())) {
                    return resource;
                }
            }
        }
        if (IMap.class.isAssignableFrom(adapter)) {
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

     */
    private boolean isSameSelectionObj(Object obj1, Object obj2) {
       
        final IProgressMonitor monitor = new NullProgressMonitor();
       
        final IGeoResource resource1 = toGeoResource(obj1, monitor);
        final IGeoResource resource2 = toGeoResource(obj2, monitor);
        if ((resource1 != null && resource2 != null)
                && (resource1.getID().equals(resource2.getID()))) {

            final FidFilterImpl filter1 = toFilter(obj1, monitor);
            final FidFilterImpl filter2 = toFilter(obj2, monitor);
           
            if (filter1 == null && filter2 == null) {
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

        exportButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
        exportButton.setImage(exportImg);
        exportButton.setToolTipText(Messages.LinePropertiesEditor_23);
        exportButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent e ) {
                IGeoResource geoResource = layer.getGeoResource();
                ID id = geoResource.getID();
                if (id.isFile()) {
                    try {
                        File file = id.toFile();
                        lineStyleManager.exportStyle(styleWrapper, file);
                    } catch (Exception e1) {
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

        CSVReader reader = null;
        try {
            g.setColor(Color.BLACK);
            ILayer layer = getContext().getLayer();
            IGeoResource resource = layer.findGeoResource(CSV.class);
            if (resource == null)
                return;

            CoordinateReferenceSystem dataCRS = layer.getCRS();
            CoordinateReferenceSystem worldCRS = context.getCRS();
            MathTransform dataToWorld = CRS.findMathTransform(dataCRS, worldCRS, false);

            ReferencedEnvelope bounds = getRenderBounds();
            monitor.subTask("connecting");
           
            CSV csv = resource.resolve(CSV.class, new SubProgressMonitor(monitor, 10) );
            reader = csv.reader();
           
            int nameIndex = csv.getHeader("name");

            IProgressMonitor drawMonitor = new SubProgressMonitor(monitor, 90);
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

        CSVReader reader = null;
        try {
            g.setColor(Color.BLUE);

            ILayer layer = getContext().getLayer();
            IGeoResource resource = layer.findGeoResource(CSV.class);
            if (resource == null)
                return;

            ReferencedEnvelope bounds = getRenderBounds();
            monitor.subTask("connecting");

            CSV csv = resource.resolve(CSV.class, new SubProgressMonitor(monitor, 10));
            reader = csv.reader();
           
            monitor.subTask("drawing");
            int nameIndex = csv.getHeader("name");
            Coordinate worldLocation = new Coordinate();
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

        // List<IService> services = CatalogPlugin.getDefault().getServiceFactory().createService(tmp.toURL());
        // IService service = services.get(0);
        // CatalogPlugin.getDefault().getLocalCatalog().add(service);
        List< ? extends IGeoResource> resources = service.resources(null);
       
        IGeoResource resource = resources.get(0);
       
        Map map = ((Map)layers[0].getMap());
        LayerFactory factory = map.getLayerFactory();
        Layer outLayer = factory.createLayer(resource);
        map.getLayersInternal().add(outLayer);
View Full Code Here

Examples of org.locationtech.udig.catalog.IGeoResource

        SimpleFeature[] features = UDIGTestUtil.createTestFeatures("testBC_ALBERS_Viewport", new Geometry[]{ //$NON-NLS-1$
                linestring
        }
        , null, crs);
       
        IGeoResource resource = MapTests.createGeoResource(features, false );
        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(1024,1024));
        map.getViewportModelInternal().setCRS(DefaultGeographicCRS.WGS84);
       
        createContext(map);
       
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.