Package chunmap.data.feature

Examples of chunmap.data.feature.ShapeFeature


  @Override
  public void execute(Feature obj) {
    if (trans == null) return;
    if (obj instanceof ShapeFeature) {
      ShapeFeature shape = (ShapeFeature) obj;
      Geometry g = (shape.getGeometry());
      if (g == null)
        return;
      Geometry ng = g.transform(trans);
      shape.setGeometry(ng);
    }
  }
View Full Code Here


        FeatureCollection fc = pDA.createFeatureList();
        fc.each(new VisitAction(){
      @Override
      public void execute(Feature obj) {
        ShapeFeature shp = (ShapeFeature)obj;
        Object[] data=pDR.data(shp.getId());
        shp.setValues(data);
              String s = data[labelColum].toString();
              shp.setLabel(s);
      }});
        fc.setFeatureSchama(pDR.getFeatureSchama());
        pDR.close();
        return new VectorLayer(fc);
    }
View Full Code Here

        if (gs.size() == 0) return null;

        FeatureCollection fc = new FeatureList();
        EnvelopeBuf eb = new EnvelopeBuf();
        for(Geometry g : gs){
          ShapeFeature f = createFeature(g);
            fc.insert(f);
            f.setFeatureClass(fc);
            eb.mergeEnvelop(g.getEnvelop());
        }

        fc.setMetadata( new LayerMetadata("Geometry",gs.get(0).getGeometryType()));
        fc.setEnvelope(eb.toEnvelop());
View Full Code Here

        return new VectorLayer(fc);
    }
    private static ShapeFeature createFeature(Geometry g)
    {
      ShapeFeature shp = new ShapeFeature();
        shp.setGeometry(g);
        return shp;
    }
View Full Code Here

                Geometry geo=dataResources.getGeometry(i);
                if (geo == null)
                {
                    continue;
                }
                ShapeFeature shape = new ShapeFeature();
                shape.setGeometry(geo);
                shape.setId(i);

                featureClass.insert(shape);
                shape.setFeatureClass(featureClass);
            }
        }
        featureClass.setDataResources(dataResources);
        featureClass.setEnvelope(dataResources.getEnvelop());
        featureClass.setMetadata(dataResources.getMetadata());
View Full Code Here

            map.getLayerCollection().add(layer);
            map.fullView();
        }
        else
        {
          ShapeFeature f = createFeature(g);
            layer.getFeatures().insert(f);
            f.setFeatureClass(layer.getFeatures());

            EnvelopeBuf eb = new EnvelopeBuf(layer.getEnvelop());
            eb.mergeEnvelop(g.getEnvelop());
            ((FeatureSet)layer.getFeatures()).setEnvelope(eb.toEnvelop());
            map.getLayerCollection().reComputeEnvelop();
View Full Code Here

            map.getLayerCollection().reComputeEnvelop();
        }
    }
    private ShapeFeature createFeature(Geometry g)
    {
      ShapeFeature shp = new ShapeFeature();
        shp.setGeometry ( g);
        return shp;
    }
View Full Code Here

TOP

Related Classes of chunmap.data.feature.ShapeFeature

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.