Examples of findGeoResource()


Examples of org.locationtech.udig.project.ILayer.findGeoResource()

    private WMTSource getWMTSourceOfSelectedLayer() {
        ILayer layer = getSelectedLayer();
       
        if (layer == null) return null;
       
        IGeoResource resource = layer.findGeoResource(WMTSource.class);
        if (resource == null) return null;
       
        try {
            WMTSource wmtSource = resource.resolve(WMTSource.class, null);
           
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

   public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
      if (receiver == null || !(receiver instanceof ILayer))
         return false;
     
      ILayer layer = (Layer) receiver;     
      IGeoResource resource = layer.findGeoResource(WMTSource.class);
     
      return (resource != null);
   }
}
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

        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();
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

        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");
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

            List<Data> data = new ArrayList<Data>();
            ILayer layer = AdapterUtil.instance.adaptTo(ILayer.class, object, ProgressManager
                    .instance().get());

            if (layer != null) {
                IGeoResource resource = layer.findGeoResource(FeatureSource.class);
                if (resource != null) {
                    Filter filter = layer.getFilter();
                    if (filter == Filter.EXCLUDE) {
                        // no selection provided; so lets do everything
                        filter = Filter.INCLUDE;
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

    // and store it
    List<ILayer> mapLayers = map.getMapLayers();
    Iterator<ILayer> iterator = mapLayers.iterator();
    while (iterator.hasNext()) {
      ILayer layer = iterator.next();
      IGeoResource geoResource = layer.findGeoResource(MapMarksGraphics.class);
      if (geoResource != null) {
        MapMarksGraphics mapGraphic = geoResource.resolve(MapMarksGraphics.class, null);
        this.mapMarkGraphic = mapGraphic;
        this.mapGraphicLayer = layer;
        break;
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

    // remove the mapgraphic layer from the map
    List<ILayer> mapLayers = map.getMapLayers();
    Iterator<ILayer> iterator = mapLayers.iterator();
    while (iterator.hasNext()) {
      ILayer layer = iterator.next();
      IGeoResource geoResource = layer.findGeoResource(MapMarksGraphics.class);
      if (geoResource != null) {
        map.sendCommandASync(new DeleteLayerCommand((Layer) layer));
        break;
      }
    }
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

        monitor = new NullProgressMonitor();

    CSVReader reader = null;
    try {
        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, null);
View Full Code Here

Examples of org.locationtech.udig.project.ILayer.findGeoResource()

    public void op(Display display, Object target, IProgressMonitor monitor)
            throws Exception {
        ILayer layer = (ILayer) target;
        IMap map = layer.getMap();
        Layer view = map.getLayerFactory().createLayer(layer.findGeoResource(FeatureSource.class));
        view.getStyleBlackboard().put(ProjectBlackboardConstants.LAYER__DATA_QUERY, layer.getFilter());
        AddLayerCommand command = new AddLayerCommand(view);
        map.sendCommandASync(command);
    }
View Full Code Here

Examples of org.locationtech.udig.style.internal.StyleLayer.findGeoResource()

            resetCursor(waitCursor);
           
            if( result ){
                try {
                    StyleLayer layer = getContainer().getSelectedLayer();
                    IGeoResource resource = layer.findGeoResource(FeatureSource.class);
                    if( resource!=null ){
                        style = (Style) new SLDContent().createDefaultStyle(resource, layer.getDefaultColor(), null);
                    }else{
                        resource = layer.findGeoResource(GridCoverage.class);
                        if( resource!=null ){
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.