Package org.geotools.feature

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


        bb.addPoint(10,10,geom.getShell());
        EditGeom geom2 = bb.newGeom(fid, null);
        AttributeTypeBuilder builder = new AttributeTypeBuilder();
        builder.setBinding(Geometry.class);
        builder.setName("geom");
        GeometryDescriptor at = (GeometryDescriptor) builder.buildDescriptor("geom", builder.buildGeometryType());
        Map<String, Bag> result = GeometryCreationUtil.createAllGeoms(geom, Point.class, at, false);
       
        assertEquals(1, result.get(fid).jts.size());

        bb.addPoint(100,100, geom2.getShell());
View Full Code Here


        bb.addPoint(10,10,geom.getShell());
        EditGeom geom2 = bb.newGeom(fid, null);
        AttributeTypeBuilder builder = new AttributeTypeBuilder();
        builder.setBinding(Geometry.class);
        builder.setName("geom");
        GeometryDescriptor at = builder.buildDescriptor("geom", builder.buildGeometryType());
        bb.addPoint(100,100, geom2.getShell());
       
        String fid2="FID2";
        EditGeom differentGeom=bb.newGeom(fid2, null);
        bb.addPoint(200,200, differentGeom.getShell());
View Full Code Here

          builder.init(editElement);
          //builder.setName((String)property);
         
            switch( Integer.parseInt(property) ) {
            case NAME_COLUMN:
                return builder.buildDescriptor((String)value);
            case TYPE_COLUMN:
                int choice = -1;
                if( value instanceof Integer) {
                    choice = (Integer) value;
                }
View Full Code Here

                if (choice == -1)
                    return null;
                else {
                    Class type = legalTypes.get(choice).getType();
                    builder.setBinding(type);
                    return builder.buildDescriptor( editElement.getLocalName());
                }
            case OTHER_COLUMN:
                lastCRS=value;
               
                CoordinateReferenceSystem crs = (CoordinateReferenceSystem) value;
View Full Code Here

                if( FeatureTypeEditor.this.featureType.getGeometryDescriptor()==editElement ){
          setDefaultCRS(crs);
                }

                builder.setCRS(crs);
                return builder.buildDescriptor( editElement.getLocalName());
            default:
                return null;
            }
        }
View Full Code Here

          build.setBinding(targetGeomType);
          build.setNillable(true);
          build.setCRS(crs);

          GeometryType type = build.buildGeometryType();
          att = build.buildDescriptor(geomTypeName, type);

        }
        builder.add(att);
        builder.setDefaultGeometry(att.getLocalName());
      } else {
View Full Code Here

    build.setBinding(geometryClass);
    build.setCRS(crs);

    GeometryType type = build.buildGeometryType();

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

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

    return builder.buildFeatureType();
View Full Code Here

    AttributeTypeBuilder build = new AttributeTypeBuilder();
    build.setName(attributeName);
    build.setNillable(true);
    build.setBinding(clazz);

    AttributeDescriptor att = build.buildDescriptor(attributeName);

    builder.add(att);

    return builder.buildFeatureType();
  }
View Full Code Here

                if ( rebuild ) {
                    //rebuild with proper crs
                    AttributeTypeBuilder b = new AttributeTypeBuilder();
                    b.init(old);
                    b.setCRS( getCRS(info.getSRS()) );
                    ad = b.buildDescriptor(old.getLocalName());
                }
            }
            catch( Exception e ) {
                //log exception
            }
View Full Code Here

        }
        AttributeTypeBuilder builder = new AttributeTypeBuilder();
        builder.setBinding(attributeType.getType().getBinding());
        builder.setNillable(attributeType.isNillable());

        AttributeDescriptor newAttribute = builder
            .buildDescriptor(attrUnionName);

        mapUnionAttributes.put(attrUnionName, newAttribute);
        mapOriginalUnion.put(new UnionKey(featureType.getTypeName(),
            attributeType.getLocalName()), attrUnionName);
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.