Package org.geotools.feature.simple

Examples of org.geotools.feature.simple.SimpleFeatureBuilder.buildFeature()


            // create feature and add to list
            builder.set("the_geom", line);
            builder.set("value", value);

            featureCollection.add(builder.buildFeature(String.valueOf(i++)));

        }

        // return value
View Full Code Here


                fb.add("determinand_description" + sufix);
                fb.add(new Float(groupValue + "." + measurement));

                fb.add(gf.createPoint(new Coordinate(groupValue, groupValue)));

                SimpleFeature f = fb.buildFeature(fid);
                dataStore.addFeature(f);
            }
        }
        return dataStore;
    }
View Full Code Here

        builder.add("theDescription");
        builder.add(point());
        builder.add(new Integer(1));
        builder.add(new Date());

        return (SimpleFeature) builder.buildFeature("fid.1");
    }

    static Element featureMember(Document document, Node parent) {
        Element featureMember = element(GML.featureMember, document, parent);
        feature(document, featureMember);
View Full Code Here

            // create feature and add to list
            builder.set("the_geom", polygon);
            builder.set("value", value);

            featureCollection.add(builder.buildFeature(String.valueOf(i++)));

        }

        //return value
        return featureCollection;
View Full Code Here

        ListFeatureCollection result = new ListFeatureCollection(schema);
        SimpleFeatureIterator fi = fc.features();
        while(fi.hasNext()) {
            SimpleFeature f = fi.next();
            fb.add(((Geometry) f.getDefaultGeometry()).buffer(distance));
            result.add(fb.buildFeature(null));
        }
       
        return result;
    }
}
View Full Code Here

                        for (String propName : attrMap.keySet()) {
                            fb.set(propName, attrMap.get(propName));
                        }

                        fc.add(fb.buildFeature(gridFeatureBuilder.getFeatureID(el)));
                    }
                }

                el = getNextXElement(el);
            }
View Full Code Here

       
        SimpleFeatureBuilder fb = new SimpleFeatureBuilder(featureType);
        fb.set("geom", new GeometryFactory().createPoint(new Coordinate(0, 0)));
        fb.set("symb", "0xF054");
        fb.set("icon", "draw.png");
        feature = fb.buildFeature(null);
    }
   
    @Override
    protected void tearDown() throws Exception {
        sld.setVectorRenderingEnabled(false);
View Full Code Here

        ListFeatureCollection features = new ListFeatureCollection(TYPE);
        SimpleFeatureBuilder fb = new SimpleFeatureBuilder(TYPE);
        for (int i = 0; i < 10; i++) {
            fb.add("POINT(" + i + " " + i + ")");
            fb.add("this is " + i);
            features.add(fb.buildFeature(null));
        }

        // setup a point layer with the right geometry trnasformation
        Style style = SLD.createPointStyle("circle", Color.BLUE, Color.BLUE, 1f, 10f);
        PointSymbolizer ps = (PointSymbolizer) style.featureTypeStyles().get(0).rules().get(0).symbolizers().get(0);
View Full Code Here

            GregorianCalendar calendar = new GregorianCalendar();
            calendar.setTimeInMillis(i);
            build.add(calendar);
            build.add(UUID.randomUUID());

            SimpleFeature feature = build.buildFeature(null);
            features.add(feature);
        }
        return features;
    }
View Full Code Here

        SimpleFeatureBuilder build = new SimpleFeatureBuilder(type);
        build.add(new GeometryFactory().createPoint(new Coordinate(1, -1)));
        build.add(bigDecimal);
        build.add(bigInteger);

        SimpleFeature feature = build.buildFeature(null);
        features.add(feature);

        // store features
        File tmpFile = getTempFile();
        tmpFile.createNewFile();
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.