Package org.geotools.feature

Examples of org.geotools.feature.Feature


     *
     * @throws WmsException
     */
    private Feature createSampleFeature(FeatureType schema)
        throws WmsException {
        Feature sampleFeature;

        try {
            AttributeType[] atts = schema.getAttributeTypes();
            Object[] attributes = new Object[atts.length];

View Full Code Here


        Integer featureId = new Integer(23);
        String name = "polygon2";
        Object[] attributes = { featureId, the_geom, name };

        //try{
        Feature feature2 = schema.create(attributes, String.valueOf(featureId));

        insert.addFeature(feature2);
        baseRequest.setHandle("my second insert");

        // run test      
View Full Code Here

    FeatureTypeFactory ff = FeatureTypeFactory.newInstance("test");
   
    ff.addType(atf.newAttributeType("geom", Geometry.class));
    FeatureType type = ff.getFeatureType();
   
    Feature f1 = type.create(new Object[]{point});
    Feature f2 = type.create(new Object[]{line});
    Feature f3 = type.create(new Object[]{polygon});
   
    MemoryDataStore ds = new MemoryDataStore();
    ds.createSchema(type);
    ds.addFeatures(new Feature[]{f1,f2,f3});
   
View Full Code Here

        super.write('\n');
    }

    public void writeFeatures(FeatureReader reader, String style)
        throws IOException, AbortedException {
        Feature ft;

        try {
            FeatureType featureType = reader.getFeatureType();
            Class gtype = featureType.getDefaultGeometry().getType();
View Full Code Here

TOP

Related Classes of org.geotools.feature.Feature

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.