Package org.geotools.feature.simple

Examples of org.geotools.feature.simple.SimpleFeatureTypeImpl


    // TODO Try using the SimpleFeatureBuilder class.
    GeometryType geometryType = LimbGeneratorTest.Utils.createGeometryType( LineString.class );
    GeometryDescriptor geometryDescriptor = LimbGeneratorTest.Utils.createGeometryDescriptor( geometryType );
    List<AttributeDescriptor> attributeDescriptors = new ArrayList<AttributeDescriptor>();
    attributeDescriptors.add( geometryDescriptor );
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), attributeDescriptors, geometryDescriptor, false, null, null, null );
    List<Object> attributeValues = new ArrayList<Object>();
    attributeValues.add( null );
    this.feature = new SimpleFeatureImpl( attributeValues, featureType, new FeatureIdImpl( "test" ) );
  }
View Full Code Here


 
  public void setUp() throws Exception
  {
    this.geometryFactory = new GeometryFactory( new PrecisionModel( PrecisionModel.FLOATING ), 27700 );
   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), null, null, false, null, null, null );
    Feature feature = new SimpleFeatureImpl( new ArrayList<Object>(), featureType, new FeatureIdImpl( "test" ) );
   
    this.limb = new Limb();
    this.limb.setEdges( new HashSet<Edge>() );
    this.limb.setFeature( feature );
View Full Code Here

    AttributeTypeImpl numericAttributeType = new AttributeTypeImpl( new NameImpl( "numericType" ), Number.class, false, false, null, null, null );
   
    AttributeDescriptor attribute1 = new AttributeDescriptorImpl( textAttributeType, new NameImpl( TEXT_ATTRIBUTE_ID ), 0, 0, true, null );
    AttributeDescriptor attribute2 = new AttributeDescriptorImpl( numericAttributeType, new NameImpl( NUMERIC_ATTRIBUTE_ID ), 0, 100, true, null );
   
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ),
                                                               Arrays.asList( attribute1, attribute2 ),
                                                               null, false, null, null, null );
   
    this.feature = new SimpleFeatureImpl( Arrays.asList( null, null ), featureType, new FeatureIdImpl( FEATURE_ID ) );
  }
View Full Code Here

    Polygon examplePolygon = this.geometryFactory.createPolygon( exampleLinearRing, null );
    this.linearRingGeomDescriptor = Utils.createGeometryDescriptor( Utils.createGeometryType( exampleLinearRing ) );
    this.polygonGeomDescriptor = Utils.createGeometryDescriptor( Utils.createGeometryType( examplePolygon ) );
   
    AttributeDescriptor simpleTextAttribute = new AttributeDescriptorImpl( STRING_TYPE, new NameImpl( NAME_ATTRIBUTE_NAME ), 0, 1, true, null );
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ),
                                                               new ArrayList<AttributeDescriptor>( Arrays.asList( simpleTextAttribute, this.polygonGeomDescriptor ) ),
                                                               this.polygonGeomDescriptor,
                                                               false, null, null, null );
   
    this.feature1 = new SimpleFeatureImpl( new ArrayList<Object>( Arrays.asList( NO_VALUE, NO_GEOMETRY ) ),
View Full Code Here

    // TODO Try using the SimpleFeatureBuilder class.
    GeometryType geometryType = LimbGeneratorTest.Utils.createGeometryType( LineString.class );
    GeometryDescriptor geometryDescriptor = LimbGeneratorTest.Utils.createGeometryDescriptor( geometryType );
    List<AttributeDescriptor> attributeDescriptors = new ArrayList<AttributeDescriptor>();
    attributeDescriptors.add( geometryDescriptor );
    SimpleFeatureType featureType = new SimpleFeatureTypeImpl( new NameImpl( "test" ), attributeDescriptors, geometryDescriptor, false, null, null, null );
    List<Object> attributeValues = new ArrayList<Object>();
    attributeValues.add( null );
    this.feature = new SimpleFeatureImpl( attributeValues, featureType, new FeatureIdImpl( "test" ) );
  }
View Full Code Here

                        .call(RevFeatureType.class).get().type();
                featureTypeId = id.get();
            } else {
                try {
                    SimpleFeatureType sft = getFeatureType(path, cli);
                    outputFeatureType = new SimpleFeatureTypeImpl(new NameImpl(tableName),
                            sft.getAttributeDescriptors(), sft.getGeometryDescriptor(),
                            sft.isAbstract(), sft.getRestrictions(), sft.getSuper(),
                            sft.getDescription());
                } catch (GeoToolsOpException e) {
                    throw new CommandFailedException("No features to export.", e);
View Full Code Here

                        .call(RevFeatureType.class).get().type();
                featureTypeId = id.get();
            } else {
                try {
                    SimpleFeatureType sft = getFeatureType(path, cli);
                    outputFeatureType = new SimpleFeatureTypeImpl(new NameImpl(tableName),
                            sft.getAttributeDescriptors(), sft.getGeometryDescriptor(),
                            sft.isAbstract(), sft.getRestrictions(), sft.getSuper(),
                            sft.getDescription());
                } catch (GeoToolsOpException e) {
                    throw new CommandFailedException("No features to export.", e);
View Full Code Here

                        .call(RevFeatureType.class).get().type();
                featureTypeId = id.get();
            } else {
                try {
                    SimpleFeatureType sft = getFeatureType(path, cli);
                    outputFeatureType = new SimpleFeatureTypeImpl(new NameImpl(tableName),
                            sft.getAttributeDescriptors(), sft.getGeometryDescriptor(),
                            sft.isAbstract(), sft.getRestrictions(), sft.getSuper(),
                            sft.getDescription());
                } catch (GeoToolsOpException e) {
                    throw new CommandFailedException("No features to export.", e);
View Full Code Here

                        .call(RevFeatureType.class).get().type();
                featureTypeId = id.get();
            } else {
                try {
                    SimpleFeatureType sft = getFeatureType(path, cli);
                    outputFeatureType = new SimpleFeatureTypeImpl(new NameImpl(tableName),
                            sft.getAttributeDescriptors(), sft.getGeometryDescriptor(),
                            sft.isAbstract(), sft.getRestrictions(), sft.getSuper(),
                            sft.getDescription());
                } catch (GeoToolsOpException e) {
                    throw new CommandFailedException("No features to export.", e);
View Full Code Here

                attrDescrs.add(descr);
            }
            GeometryDescriptor geomDescr = (GeometryDescriptor) baseType.getDescriptor(info
                    .getGeomPropertyName());

            featureTyp = new SimpleFeatureTypeImpl(new NameImpl(
                    dataStore.getNamespace() == null ? null : dataStore.getNamespace().toString(),
                    info.getFeatureName()), attrDescrs, geomDescr, false, null, null, baseType
                    .getDescription());

        } catch (IOException ex) {
View Full Code Here

TOP

Related Classes of org.geotools.feature.simple.SimpleFeatureTypeImpl

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.