Package org.geotools.feature

Examples of org.geotools.feature.AttributeTypeBuilder.binding()


{
    private static SimpleFeatureType reprojectGeometryType(Name geometryAttName) {
        SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
        AttributeTypeBuilder attBuilder  = new AttributeTypeBuilder();
        attBuilder.crs(DefaultGeographicCRS.WGS84);
        attBuilder.binding(MultiPolygon.class);
        GeometryDescriptor geomDescriptor = attBuilder.buildDescriptor(geometryAttName, attBuilder.buildGeometryType());
        builder.setName("dummy");
        builder.setCRS( DefaultGeographicCRS.WGS84 );
        builder.add(geomDescriptor);
        return builder.buildFeatureType();
View Full Code Here


        Point point = gf.createPoint(new Coordinate(-10, 0));
       
        // make up a fake attribute with the same name, something that might happen
        // in chains of retyping where attributes are rebuilt
        AttributeTypeBuilder ab = new AttributeTypeBuilder();
        ab.binding(Point.class);
        AttributeDescriptor madeUp = ab.buildDescriptor(aname("geometry"));
       
        featureStore.modifyFeatures(new AttributeDescriptor[] { madeUp },
            new Object[] { point }, Filter.INCLUDE);
View Full Code Here

    AttributeTypeBuilder attBuilder = new AttributeTypeBuilder();
    builder.add(toGeometryAttribute(iShapeType, crs,attBuilder));
    builder.setDefaultGeometry("geom");
    for (int i = 0; i < sFields.length; i++) {
      AttributeType type = attBuilder.binding(fields[i]).buildType();
      AttributeDescriptor descriptor = attBuilder.buildDescriptor(sFields[i], type);
      builder.add(descriptor);
    }
    return builder.buildFeatureType();
   
View Full Code Here

    final SimpleFeatureTypeBuilder simpleFeatureTypeBuilder = new SimpleFeatureTypeBuilder();
    simpleFeatureTypeBuilder.setName(TDRIVE_POINT_FEATURE);

    final AttributeTypeBuilder attributeTypeBuilder = new AttributeTypeBuilder();

    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Geometry.class).nillable(
        false).buildDescriptor(
        "geometry"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
View Full Code Here

    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Geometry.class).nillable(
        false).buildDescriptor(
        "geometry"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        false).buildDescriptor(
        "taxiid"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
View Full Code Here

        "geometry"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        false).buildDescriptor(
        "taxiid"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        true).buildDescriptor(
        "pointinstance"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Date.class).nillable(
View Full Code Here

        "taxiid"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        true).buildDescriptor(
        "pointinstance"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Date.class).nillable(
        true).buildDescriptor(
        "Timestamp"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
View Full Code Here

        "pointinstance"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Date.class).nillable(
        true).buildDescriptor(
        "Timestamp"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        true).buildDescriptor(
        "Latitude"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
View Full Code Here

        "Timestamp"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        true).buildDescriptor(
        "Latitude"));
    simpleFeatureTypeBuilder.add(attributeTypeBuilder.binding(
        Double.class).nillable(
        true).buildDescriptor(
        "Longitude"));

    return simpleFeatureTypeBuilder.buildFeatureType();
View Full Code Here

    // lattitude/longtiude) can not be null
    // Calling out latitude an longitude separately is not strictly needed,
    // as the geometry contains that information. But it's
    // convienent in many use cases to get a text representation without
    // having to handle geometries.
    builder.add(ab.binding(
        Geometry.class).nillable(
            false).buildDescriptor(
                "geometry"));
    builder.add(ab.binding(
        Date.class).nillable(
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.