Package org.locationtech.udig.aoi

Examples of org.locationtech.udig.aoi.IAOIService


    /*
     * returns an AOILayerStrategy object for quick access
     */
    private AOILayerStrategy getAOILayerStrategy() {
        IAOIService aOIService = PlatformGIS.getAOIService();
        IAOIStrategy aOIStrategy = aOIService.findProxy(AOI_LAYER_ID)
                .getStrategy();

        if (aOIStrategy instanceof AOILayerStrategy) {
            return (AOILayerStrategy) aOIStrategy;
        }
View Full Code Here


        return combined.union();
    }

    private void updateAOIService( ILayer layer, Geometry newAOI )
            throws IOException {
        IAOIService aOIService = PlatformGIS.getAOIService();
        AOIProxy aoiLayerProxy = aOIService.findProxy(AOI_LAYER_ID);
       
        AOILayerStrategy aOILayerStrategy = (AOILayerStrategy)aoiLayerProxy.getStrategy();
        aOILayerStrategy.setActiveLayer(layer);
        aOILayerStrategy.setGeometry(newAOI);
       
        // if the current stragegy does not equal the bounary layer strategy set it
        if (!aOIService.getProxy().equals(aoiLayerProxy)) {
            aOIService.setProxy(aoiLayerProxy);
        }
    }
View Full Code Here

        /*
         * returns a AOILayerStrategy object for quick access
         */
        private AOILayerStrategy getAOILayerStrategy() {
            IAOIService aOIService = PlatformGIS.getAOIService();
            IAOIStrategy aOIStrategy = aOIService.findProxy(AOI_LAYER_ID)
                    .getStrategy();

            if (aOIStrategy instanceof AOILayerStrategy) {
                return (AOILayerStrategy) aOIStrategy;
            }
View Full Code Here

   
    /*
     * returns a AOILayerStrategy object for quick access
     */
    private AOILayerStrategy getAOILayerStrategy() {
        IAOIService aOIService = PlatformGIS.getAOIService();
        IAOIStrategy aOIStrategy = aOIService.findProxy(AOI_LAYER_ID)
                .getStrategy();

        if (aOIStrategy instanceof AOILayerStrategy) {
            return (AOILayerStrategy) aOIStrategy;
        }
View Full Code Here

                return color;
            }
           
        });
       
        IAOIService aOIService = PlatformGIS.getAOIService();
       
        aoiServiceListener = new AOIListener(){
            @Override
            public void handleEvent( Event event ) {
                if(isAOIFilter()){
                    reloadFeatures(layer);
                }
            }           
        };
       
        aOIService.addListener(aoiServiceListener);
       
        table.addLoadingListener(new IFeatureTableLoadingListener(){

            public void loadingStarted( IProgressMonitor monitor ) {
                searchWidget.setEnabled(false);
View Full Code Here

    public void dispose() {
        if( table!=null)
            table.dispose();
       
        if( aoiServiceListener!=null){
            IAOIService aOIService = PlatformGIS.getAOIService();
            aOIService.removeListener(aoiServiceListener);
        }
       
        super.dispose();
        if( activePartListener!=null )
            page.removePartListener(activePartListener);
View Full Code Here

            }
        }
    }
   
    private Filter addAOIFilter(Filter filter, CoordinateReferenceSystem dataCRS){
        IAOIService aOIService = PlatformGIS.getAOIService();
        Geometry geometry = aOIService.getGeometry();
       
        if(aOIService.getExtent() == null)
            return filter;
       
        if(geometry == null){
            // note we could make a BBOX query here and go faster
            geometry = JTS.toGeometry( aOIService.getExtent());
            if(geometry == null){
                return filter; // no change!
            }
        }
        CoordinateReferenceSystem aoiCRS = aOIService.getCrs();
        if( aoiCRS != null && !CRS.equalsIgnoreMetadata(aoiCRS, dataCRS )){
            try {
                MathTransform transform = CRS.findMathTransform( aoiCRS, dataCRS);
                geometry = JTS.transform(geometry, transform);
            }
View Full Code Here

                return;

            ReferencedEnvelope bounds2 = new ReferencedEnvelope(getCRS());

            // check the limit service
            IAOIService aOIService = PlatformGIS.getAOIService();
            ReferencedEnvelope extent = aOIService.getExtent();

            if (extent != null && !extent.isNull() && !extent.isEmpty()) {
                bounds2 = new ReferencedEnvelope(extent);
            } else {
                boolean hasVisibleLayer = false;
View Full Code Here

        if( filter == Filter.INCLUDE ){
            filter = null; // please ignore the user they want it all
        }
        if( isAoiFilter() ){
            try {
                IAOIService aoiService = PlatformGIS.getAOIService();
                ReferencedEnvelope extent = aoiService.getExtent();
                if( extent != null ){
                    CoordinateReferenceSystem crs = extent.getCoordinateReferenceSystem();
                    Geometry geometry = aoiService.getGeometry();
                    CoordinateReferenceSystem dataCRS = schema.getCoordinateReferenceSystem();
                    if (!CRS.equalsIgnoreMetadata(crs,dataCRS)) {
                        MathTransform transform = CRS.findMathTransform(crs, dataCRS);
                        geometry = JTS.transform(geometry, transform);
                    }
View Full Code Here

            }
         }
    };

    protected void listenService( boolean listen ) {
        IAOIService aOIService = PlatformGIS.getAOIService();
        if (listen) {
            aOIService.addListener(serviceWatcher);
        } else {
            aOIService.removeListener(serviceWatcher);
        }
    }
View Full Code Here

TOP

Related Classes of org.locationtech.udig.aoi.IAOIService

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.