Examples of buildFeature()


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

                    String dateTime = dateString + timeString;
                    Object[] values = new Object[]{reprojectPoint, String.valueOf(altim), dateTime, azimuth, imageRelativePath};

                    SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType);
                    builder.addAll(values);
                    SimpleFeature feature = builder.buildFeature(null);
                    newCollection.add(feature);
                }
                pm.worked(1);
            }
View Full Code Here

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

                                    Coordinate coordinate = placesMap.get(name);
                                    MultiPoint point = gF.createMultiPoint(new Coordinate[]{coordinate});
                                    SimpleFeatureBuilder builder = new SimpleFeatureBuilder(type);
                                    Object[] values = new Object[]{point, name};
                                    builder.addAll(values);
                                    SimpleFeature feature = builder.buildFeature(type.getTypeName() + "." + id);
                                    id++;
                                    newCollection.add(feature);
                                    pm.worked(1);
                                }
                                pm.done();
View Full Code Here

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

                    }
                    objIndex++;
                }
                builder.addAll(values);

                SimpleFeature feature = builder.buildFeature(featureType.getTypeName() + "." + featureId);
                featureId++;
                newCollection.add(feature);
            }
        } finally {
            if (bR != null)
View Full Code Here

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

    try {
     
      // sets the features attributes
      SimpleFeatureBuilder builder = new SimpleFeatureBuilder(featureType);
      builder.addAll(mergedFeature);
      feature = builder.buildFeature(null);

      // build the geometry
      Geometry geometry = buildMergeGeometry();
      feature.setDefaultGeometry(geometry);
     
View Full Code Here

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

            return;
        }

        if (isDefaultPresented) {
            SimpleFeatureBuilder builder = new SimpleFeatureBuilder(feature.getFeatureType());
            SimpleFeature temp = builder.buildFeature(feature.getID());

            feature.setAttributes(temp.getAttributes());
        } else {
            doStore();
        }
View Full Code Here

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

        SimpleFeatureBuilder sfb = new SimpleFeatureBuilder(type);
        WKTReader reader = new WKTReader();
        sfb.set("the_geom", reader.read("POINT (0.002 0.0008)"));
        sfb.set("FID", "023");
        sfb.set("NAME", "Old oak");
        SimpleFeature feature = sfb.buildFeature(null);
        FeatureCollection<SimpleFeatureType, SimpleFeature> fc = DataUtilities.collection(feature);

        FeatureStore<SimpleFeatureType, SimpleFeature> store = (FeatureStore) rts.getFeatureSource("oaks");
        List<FeatureId> ids = store.addFeatures(fc);
        assertEquals(1, ids.size());
View Full Code Here

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

        fs = (FeatureStore<SimpleFeatureType, SimpleFeature>) dataStore
                .getFeatureSource(featureType.getName());

        SimpleFeatureBuilder sfb = new SimpleFeatureBuilder(featureType);
        sfb.addAll(values);
        SimpleFeature feature = sfb.buildFeature(null);
        fs.addFeatures(DataUtilities.collection(feature));

        return feature;
    }
View Full Code Here

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

        WKTReader reader = new WKTReader();
        SimpleFeatureBuilder sb = new SimpleFeatureBuilder(ft);
        sb.set("the_geom", reader.read("POINT(10 10)"));
        sb.set("FID", "Fid001");
        sb.set("NAME", "Pluto");
        SimpleFeature f = sb.buildFeature("fidxxx");

        String template = "Hello this is ${FID.value} my name is ${NAME.value}";
        Expression freemarker = CQL.toExpression("freemarker('" + template + "')");
        String result = freemarker.evaluate(f, String.class);
        String expected = "Hello this is " + f.getAttribute("FID") + " my name is "
View Full Code Here

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

        SimpleFeatureBuilder sfb = new SimpleFeatureBuilder(type);
        WKTReader reader = new WKTReader();
        sfb.set("the_geom", reader.read("POINT (0.002 0.0008)"));
        sfb.set("FID", "023");
        sfb.set("NAME", "Old oak");
        SimpleFeature feature = sfb.buildFeature(null);
        FeatureCollection<SimpleFeatureType, SimpleFeature> fc = DataUtilities.collection(feature);

        FeatureStore<SimpleFeatureType, SimpleFeature> store = (FeatureStore) rts.getFeatureSource("oaks");
        List<FeatureId> ids = store.addFeatures(fc);
        assertEquals(1, ids.size());
View Full Code Here

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

    // creates the new feature
    SimpleFeatureBuilder builder = new SimpleFeatureBuilder(
        unionFeatureType);
    builder.addAll(attrList);
    // SimpleFeature product = unionFeatureType.create(attrList);
    SimpleFeature product = builder.buildFeature(null);
    product.setDefaultGeometry(this.geometry);

    return product;
  }
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.