Examples of buildFeatureType()


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

       
        SimpleFeatureTypeBuilder tmpBuilder = new SimpleFeatureTypeBuilder();
        tmpBuilder.init(featureType);
        tmpBuilder.setName(featureType.getTypeName());
        tmpBuilder.setCRS(crs);
        featureType = tmpBuilder.buildFeatureType();
       
    }
   
    private void setInput( SimpleFeatureType featureType ) {
        viewer.setInput(featureType);
View Full Code Here

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

                            break;
                        } catch (IllegalArgumentException e) {
                            index++;
                        }
                    }
                    featureType = ftB.buildFeatureType();
                    viewer.setInput(featureType);
                    // TODO check if it is better to do something and then: viewer.refresh(false);
                }

View Full Code Here

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

                    IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                    for( Iterator<AttributeDescriptor> iter = selection.iterator(); iter.hasNext(); ) {
                        AttributeDescriptor element = iter.next();
                        ftB.remove(element.getLocalName());
                    }
                    featureType = ftB.buildFeatureType();
                    viewer.setInput(featureType);
                }
            };
            deleteAttributeAction.setText(Messages.deleteAttributeAction_label);
            deleteAttributeAction.setToolTipText(Messages.deleteAttributeAction_tooltip);
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

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

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

        }
View Full Code Here

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

        SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
        builder.setName(TEST_TYPE);
        builder.setNamespaceURI(TEST_URI);
        builder.add("the_geo", Geometry.class);
       
        SimpleFeatureType featureType = builder.buildFeatureType();
        StructuredSelection selection1 = new StructuredSelection(SimpleFeatureBuilder.build(featureType, DEFAULT_ATTS, ID));
        IContributionItem item = processor.getEditFeatureAction(selection1);
       
        assertEquals(MATCH_ON_TYPE_NAME, item.getId());
       
View Full Code Here

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

        SimpleFeatureTypeBuilder builder2 = new SimpleFeatureTypeBuilder();
        builder2.setName(TEST_TYPE);
        builder2.setNamespaceURI(INVALID_TEST_URI);
        builder2.add("geo", Geometry.class);
       
        SimpleFeatureType featureType2 = builder2.buildFeatureType();
        StructuredSelection selection2 = new StructuredSelection(SimpleFeatureBuilder.build(featureType2, DEFAULT_ATTS, ID));
        IContributionItem item2 = processor.getEditFeatureAction(selection2);
       
        assertEquals(MATCH_GEOM_NAMED_GEO, item2.getId());
       
View Full Code Here

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

    builder.setDefaultGeometry(build.buildDescriptor(defaultGeomAttr.getLocalName(), type).getLocalName());

    builder.add(defaultGeomAttr.getLocalName(), geometryClass, crs);

    return builder.buildFeatureType();

  }

  /**
   * Creates a new feature type using the geometry (named "geometry" by
View Full Code Here

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

    // adds the rest of attributes
    for (AttributeDescriptor att : attrTypeCollection) {
      builder.add(att);
    }

    return builder.buildFeatureType();
  }

  /**
   * Creates a new Feature for <code>targetType</code> that holds the common
   * attributes from <code>sourceFeature</code> and the new geometry.
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.