Package chunmap.data.index

Examples of chunmap.data.index.FeatureList


    public static VectorLayer createGeometryLayer(List<Geometry> gs)
    {
        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());

        return new VectorLayer(fc);
    }
View Full Code Here


        return shp;
    }

    public static VectorLayer createFeatureLayer(List<Feature> fs)
    {
      FeatureList fc = new FeatureList();
        EnvelopeBuf eb = new EnvelopeBuf();
        for (Feature f : fs)
        {
            fc.insert(f);
            eb.mergeEnvelop(f.getEnvelop());
        }

        fc.setMetadata (new LayerMetadata("Feature",GeometryType.GeometryCollection));
        fc.setEnvelope ( eb.toEnvelop());

        return new VectorLayer(fc);
    }
View Full Code Here

        featureClass.setMetadata(dataResources.getMetadata());
    }

    public FeatureCollection createFeatureList()
    {
      FeatureList featureClass = new FeatureList();
        initFeatureCollection(featureClass);
        return featureClass;
    }
View Full Code Here

TOP

Related Classes of chunmap.data.index.FeatureList

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.