Package org.locationtech.udig.catalog.jgrass.core

Examples of org.locationtech.udig.catalog.jgrass.core.JGrassMapGeoResource


                            try {
                                pm.beginTask("Removing maps...", toList.size());

                                for( Object object : toList ) {
                                    if (object instanceof JGrassMapGeoResource) {
                                        JGrassMapGeoResource mr = (JGrassMapGeoResource) object;
                                        String type = mr.getType();
                                        if (type.equals(JGrassConstants.GRASSBINARYRASTERMAP)) {
                                            String[] mapsetpathAndMapname = JGrassCatalogUtilities
                                                    .getMapsetpathAndMapnameFromJGrassMapGeoResource(mr);
                                            try {
                                                removeGrassRasterMap(mapsetpathAndMapname[0], mapsetpathAndMapname[1]);
                                                ((JGrassMapsetGeoResource) mr.parent(new NullProgressMonitor())).removeMap(
                                                        mapsetpathAndMapname[1], JGrassConstants.GRASSBINARYRASTERMAP);

                                                IMap activeMap = ApplicationGIS.getActiveMap();
                                                List<ILayer> mapLayers = activeMap.getMapLayers();
                                                String mapName = mr.getTitle();
                                                List<ILayer> toRemove = new ArrayList<ILayer>();
                                                for( int i = 0; i < mapLayers.size(); i++ ) {
                                                    String layerName = mapLayers.get(i).getName();
                                                    if (layerName.equals(mapName)) {
                                                        // remove it from layer list
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.jgrass.core.JGrassMapGeoResource

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.