Package org.locationtech.udig.tool.info

Examples of org.locationtech.udig.tool.info.LayerPointInfo


        return null;
    }
   
    @SuppressWarnings("unchecked")
    public static List<LayerPointInfo> info( ILayer layer, ReferencedEnvelope bbox ) throws IOException {
        LayerPointInfo info = info2( layer, bbox );
        if( info == null ) return Collections.EMPTY_LIST;
       
        return Collections.singletonList( info );       
    }
View Full Code Here


        final GetFeatureInfoRequest request = wms.createGetFeatureInfoRequest( getmap );                      
        request.setInfoFormat( desiredFormat );
        request.setQueryPoint( centre.x, centre.y );               
        request.setQueryLayers( Collections.singleton( wmslayer ) );
               
        LayerPointInfo info = new LayerPointInfo( layer ){
                   
            private GetFeatureInfoResponse response;
            /** Lazy request */
                   
            protected GetFeatureInfoResponse getResponse() throws IOException {
View Full Code Here

    public Image getImage(Object element) {
        if( element == information ) {
            return null; // Use information symbol?
        }
        if (element instanceof LayerPointInfo){
            LayerPointInfo info = (LayerPointInfo) element;
            return imageCache.getImage( info.getLayer().getIcon() );           
        }
        return null;
    }
View Full Code Here

    public String getText(Object element) {
        if( element == information ) {
            return "information"; //$NON-NLS-1$
        }
        if (element instanceof LayerPointInfo){
            LayerPointInfo info = (LayerPointInfo) element;
            return info.getLayer().getName();
        }
        return null;
    }
View Full Code Here

            StructuredSelection sel = new StructuredSelection(source);
            featureDisplay.selectionChanged(null, sel);
            //featureDisplay.setInfo( (SimpleFeature) selection );
        }
        if (selection instanceof LayerPointInfo) {
            LayerPointInfo info = (LayerPointInfo) selection;
            if (info.getMimeType() == null) {
                getDetails().showPage(information);
            } else if (info.getMimeType().startsWith(LayerPointInfo.GML)) {
                getDetails().showPage(featureDisplay.getControl());
                try {
                    SimpleFeature feature = (SimpleFeature) info.acquireValue();
                    FeaturePropertySource src = new FeaturePropertySource(feature);
                    StructuredSelection sel = new StructuredSelection(src);
                    featureDisplay.selectionChanged(null, sel);
                } catch(IOException ex) {
                    InfoPlugin.log("GML value could not be acquired.", ex); //$NON-NLS-1$
                }
                //featureDisplay.setInfo(info);
            } else if (info.getRequestURL() != null &&
                       info.getMimeType().startsWith(LayerPointInfo.HTML)) {
                getDetails().showPage( browserDisplay.getControl() );
                browserDisplay.setInfo(info);       
            } else if (info.getRequestURL() != null && info.getMimeType().startsWith(LayerPointInfo.XML)) {
                getDetails().showPage( browserDisplay.getControl() );
                browserDisplay.setInfo(info);
            } else if (info.getRequestURL() != null && info.getMimeType().startsWith(LayerPointInfo.ERROR)) {
                getDetails().showPage( browserDisplay.getControl() );
                browserDisplay.setInfo(info);       
            } else if (info.getRequestURL() != null && info.getMimeType().startsWith(LayerPointInfo.TEXT)) {
                getDetails().showPage( browserDisplay.getControl() );
                browserDisplay.setInfo(info);
            } else {
                    getDetails().showPage(information);
            }
        }       
        if (selection instanceof CoveragePointInfo) {
            CoveragePointInfo info = (CoveragePointInfo) selection;
            information.setText(info.getInfo());
            getDetails().showPage(information);
        }       
   
    }
View Full Code Here

            }           
            if( layer.hasResource( Layer.class ) ) {
                try {
                    Layer wmsLayer = layer.getResource(Layer.class, new NullProgressMonitor());
                    if( wmsLayer.isQueryable()){
                        LayerPointInfo hit = WMSDescribeLayer.info2( layer, request.bbox );
                        if( hit != null ) {
                            set.add( hit );
                        }
                    }
                }
View Full Code Here

    protected ISelection getSelection( List<Object> results ) {

        for( Object object : results ) {
            ILayer layer=null ;
            if( object instanceof LayerPointInfo ){
                LayerPointInfo info=(LayerPointInfo) object;
                layer = info.getLayer();
            }
            if (object instanceof CoveragePointInfo) {
                CoveragePointInfo info = (CoveragePointInfo) object;
                layer = info.getLayer();
            }
            if( object instanceof AdaptableFeature ){
                AdaptableFeature feature=(AdaptableFeature) object;
                layer=(ILayer) feature.getAdapter(ILayer.class);
            }
View Full Code Here

            if (element instanceof AdaptableFeature) {
                final AdaptableFeature feature = (AdaptableFeature) element;
                return getFeatureLabel(feature);
            }
            else if (element instanceof LayerPointInfo) {
                LayerPointInfo info = (LayerPointInfo) element;                   
                return info.getLayer().getName();
            }
            else if (element instanceof CoveragePointInfo) {
                CoveragePointInfo info = (CoveragePointInfo) element;                   
                return info.getLayer().getName();
            }
            return super.getText(element);
        }
View Full Code Here

            if( element instanceof AdaptableFeature){
                AdaptableFeature feature = (AdaptableFeature) element;
                layer = (ILayer) feature.getAdapter(ILayer.class);               
            }
            if( element instanceof LayerPointInfo){
                LayerPointInfo info = (LayerPointInfo) element;
                layer = info.getLayer();
            }
            if( element instanceof CoveragePointInfo){
                CoveragePointInfo info = (CoveragePointInfo) element;
                layer = info.getLayer();
            }
            String key = layer.getID().toExternalForm();               
            Image image = registry.get( key );
            if( image == null ){
                ImageDescriptor icon;
View Full Code Here

    public static List<LayerPointInfo> info( final ILayer layer, ReferencedEnvelope bbox, IProgressMonitor monitor ) throws Exception{
        List<SimpleFeature> features = info2( layer, bbox, monitor );
        List<LayerPointInfo> list = new ArrayList<LayerPointInfo>( features.size() );
        for( SimpleFeature feature :  features  ) {
            final SimpleFeature feature2 = feature;
            LayerPointInfo info =  new LayerPointInfo( layer ){                   
                public String getMimeType() {
                    return LayerPointInfo.GML;
                }
                public Object acquireValue() {
                    return feature2;
View Full Code Here

TOP

Related Classes of org.locationtech.udig.tool.info.LayerPointInfo

Copyright © 2018 www.massapicom. 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.