Examples of SimpleFeatureType


Examples of org.opengis.feature.simple.SimpleFeatureType

     */
    @Override
    protected Control createContents( Composite parent ) {
        Layer layer = getElement( Layer.class );
       
        SimpleFeatureType schema = layer.getSchema();
        // check if layer is polygon
        if (schema == null) {
            // disable!
        }
        Composite page = new Composite(parent, SWT.NONE);
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

    }
   
    /* Grabs the layer and fills in the current page. */
    private void loadLayer() {
        Layer layer = getElement(Layer.class);
        SimpleFeatureType schema = layer != null ? layer.getSchema() : null;
        filter.getInput().setSchema(schema);
       
        boolean enabled = schema != null;
        filter.getControl().setEnabled(enabled);
       
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

        }
       
        ShapefileDataStoreFactory dsfac = new ShapefileDataStoreFactory();
        File tmp = File.createTempFile(layers[0].getName() + "_" + layers[1].getName() + "_diff", ".shp"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        DataStore ds = dsfac.createDataStore(tmp.toURL());
        final SimpleFeatureType newSchema = FeatureTypes.newFeatureType(
                fromLayer.getSchema().getAttributeDescriptors().toArray(
                        new AttributeDescriptor[0]), "diff"); //$NON-NLS-1$
        ds.createSchema(newSchema);
       
        final FeatureSource<SimpleFeatureType, SimpleFeature> fromSource = fromLayer.getResource(FeatureSource.class, monitor);
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

     */
    @Override
    protected Control createContents( Composite parent ) {
        layer = (Layer) getElement();

        SimpleFeatureType schema = layer.getSchema();

        // check if layer is polygon
        if (schema != null) {
            GeometryDescriptor geomDescriptor = schema.getGeometryDescriptor();
            if (geomDescriptor != null) {
                Class< ? extends Geometry> binding = (Class< ? extends Geometry>) geomDescriptor
                        .getType().getBinding();
                switch( Geometries.getForBinding(binding) ) {
                case MULTIPOLYGON:
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

          Intersects intersectsFilter;

      final CoordinateReferenceSystem layerCrs = LayerUtil.getCrs(selectedLayer);
      final Geometry splitLineGeom = reprojectSplitLine(splittingLine, layerCrs);

      SimpleFeatureType schema = selectedLayer.getSchema();
      String geomName = schema.getGeometryDescriptor().getLocalName();

      intersectsFilter = ff.intersects(ff.property(geomName), ff.literal(splitLineGeom));

      if (Filter.EXCLUDE.equals(filter)) {
              filter = intersectsFilter;
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

    public PropertiesEditor( StyleLayer layer ) {
        this.layer = layer;
        loadWithAttributeTypes(layer);

        SimpleFeatureType schema = layer.getSchema();
        if (SLD.isPoint(schema)) {
            type = SLD.POINT;
        } else if (SLD.isLine(schema)) {
            type = SLD.LINE;
        } else if (SLD.isPolygon(schema)) {
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

            return;
        }
    }

    private void loadWithAttributeTypes( StyleLayer selectedLayer ) {
        SimpleFeatureType featureType = selectedLayer.getSchema();
        if (featureType != null) {
            for( int i = 0; i < featureType.getAttributeCount(); i++ ) {
                AttributeDescriptor attributeType = featureType.getDescriptor(i);
                if (!(attributeType instanceof GeometryDescriptor)) { // don't include the geometry
                    if (isNumber(attributeType)) {
                        numericAttributeNames.add(attributeType.getName().getLocalPart());
                    } else if (isString(attributeType)) {
                        stringAttributeNames.add(attributeType.getName().getLocalPart());
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

        if (featureList == null) {
            initLayer();
        }
        SimpleFeature currentFeature = featureList.get(index);

        SimpleFeatureType featureType = currentFeature.getFeatureType();
        List<AttributeDescriptor> attributeDescriptors = featureType.getAttributeDescriptors();
        List<String> attributeNames = new ArrayList<String>();
        for( AttributeDescriptor attributeDescriptor : attributeDescriptors ) {
            String name = attributeDescriptor.getLocalName();
            attributeNames.add(name);
        }
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

            Job job = new Job("Prompt Hotlink Descriptor") { //$NON-NLS-1$
                @Override
                protected IStatus run(IProgressMonitor monitor) {
                    IGeoResource resource = (IGeoResource) getElement().getAdapter(
                            IGeoResource.class);
                    SimpleFeatureType schema = null;
                    if (resource.canResolve(SimpleFeatureType.class)) {
                        try {
                            schema = resource.resolve(SimpleFeatureType.class, monitor);
                        } catch (IOException e) {
                        }
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeatureType

        text.setToolTipText( null );
        if( feature == null ) {
            text.setText( "" ); //$NON-NLS-1$
            return;
        }
        SimpleFeatureType type = feature.getFeatureType();
       
        StringBuffer buf = new StringBuffer();
        buf.append( feature.getID() );
        buf.append( ": (" ); //$NON-NLS-1$
        buf.append( type.getName().getNamespaceURI() );
        buf.append( ":" ); //$NON-NLS-1$
        buf.append( type.getName().getLocalPart() );
       
        for( int i=0; i<feature.getAttributeCount(); i++ ) {
            AttributeDescriptor attribute = type.getDescriptor( i );
            Object value = feature.getAttribute( i );
            buf.append( "\n" ); //$NON-NLS-1$
            buf.append( attribute.getName() );
            buf.append( " = " ); //$NON-NLS-1$
            if ( attribute instanceof GeometryDescriptor ) {
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.