Examples of buildFeatureType()


Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

            } else {
                Class<?> class1 = typesMap.get(typesArray[typeIndex]);
                b.add(fieldName, class1);
            }
        }
        SimpleFeatureType featureType = b.buildFeatureType();

        DefaultFeatureCollection newCollection = new DefaultFeatureCollection();
        Collection<Integer> orderedTypeIndexes = fieldsAndTypesIndex.values();
        Integer[] orderedTypeIndexesArray = (Integer[]) orderedTypeIndexes.toArray(new Integer[orderedTypeIndexes.size()]);
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

                build.add(name, binding);
            }
        }
        build.setName( ReshapeOperation.getNewTypeName( originalFeatureType.getTypeName() ) );
       
        return build.buildFeatureType();
    }

    /**
     * You cannot call this once the dialog is closed, see the {@link #okPressed()} for details.
     *
 
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

            SimpleFeatureType schema = fs.getSchema();
            if (data.getName() != null) {
                SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
                builder.init(schema);
                builder.setName(data.getName());
                schema = builder.buildFeatureType();
            }

            File file = determineDestinationFile(data);

            monitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

                builder.crs(crs).defaultValue(null).restrictions(geom.getType().getRestrictions())
                        .nillable(geom.isNillable()).add(geom.getLocalName(), geomBinding);
            }
        }

        return builder.buildFeatureType();
    }

    /**
     * Connect to the file (using the existing catalog entry if avaiable) and
     * add
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

    @Test
    public void testSetGetFeatureDocInfos() {
       
        SimpleFeatureTypeBuilder fb = new SimpleFeatureTypeBuilder();
        fb.setName("feature");
        SimpleFeature feature1 = SimpleFeatureBuilder.build(fb.buildFeatureType(),
                Collections.EMPTY_LIST, "feature.1");
       
        final ShpDocPropertyParser parser = new ShpDocPropertyParser(url);
       
        List<DocumentInfo> inInfos = new ArrayList<DocumentInfo>();
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

            build.setName(typename+i);
            build.setNamespaceURI( "http://udig.refractions.net");
            build.setAbstract(false);
            build.add(Messages.NewServiceConnectionFactory_defaultGeom,com.vividsolutions.jts.geom.Geometry.class);
           
            SimpleFeatureType schema = build.buildFeatureType();
           
            ds.createSchema( schema ); //$NON-NLS-1$
        } catch (Exception e) {
            CatalogUIPlugin.log("Error creating MemoryDatastore or feature type", e); //$NON-NLS-1$
            return null;
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

        builder.length(80).nillable(false).add("id", String.class);
        builder.length(1024).nillable(false).defaultValue("").add("memento", String.class);
        builder.length(20).nillable(true).add("priority", String.class);
        builder.length(20).nillable(true).add("resolution", String.class);
        builder.length(1024).nillable(true).add("viewMemento", String.class);
        return builder.buildFeatureType();
    }


    @SuppressWarnings("unchecked")
    private boolean isStringType( AttributeDescriptor att ) {
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

             * somewhere the reference to the old object is needed.
             */
            SimpleFeatureTypeBuilder ftB = new SimpleFeatureTypeBuilder();
            ftB.setName(Messages.NewFeatureTypeOp_duplicateTypeName);
            ftB.init(defaultFeatureType);
            defaultFeatureType = ftB.buildFeatureType();
            return false;
        } catch (IOException e) {
            return true;
        }
    }
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

                } else
                if (e.character == SWT.Selection) {
                    SimpleFeatureTypeBuilder ftB = new SimpleFeatureTypeBuilder();
                    ftB.init(ft);
                    ftB.setName(nameText.getText());
                    featureType = ftB.buildFeatureType();
                    viewer.setInput(featureType);
                } else {
                    errorDecorator.hide();
                }
            }
View Full Code Here

Examples of org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType()

            public void keyReleased( KeyEvent e ) {
                SimpleFeatureType ft = (SimpleFeatureType) viewer.getInput();
                SimpleFeatureTypeBuilder ftB = new SimpleFeatureTypeBuilder();
                ftB.init(ft);
                ftB.setName(nameText.getText());
                featureType = ftB.buildFeatureType();
                viewer.setInput(featureType);
            }

            public void focusGained( FocusEvent e ) {
                int end = nameText.getText().length();
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.