Examples of buildDescriptor()


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

                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

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

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

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

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

          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

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

    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

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

    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

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

                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

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

        }
        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

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

    build.setNillable(true);
    build.setLength(100);
    build.setCRS(crs);

    GeometryType type = build.buildGeometryType();
    geoAttrType = build.buildDescriptor(this.geometryName, type);

    this.unionGeometryAttr = geoAttrType;

    return this;
  }
View Full Code Here

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

          AttributeTypeBuilder build = new AttributeTypeBuilder();
          build.setNillable(true);
          build.setBinding(String.class); // might need to change to
                          // specific bindings for
                          // sythetic data types
          AttributeDescriptor descriptor = build
              .buildDescriptor(hNode.getColumnName());
          featureSchema.add(descriptor);
          geomHNodeIdList.add(hNode.getId());

          if (hNode.getId().equals(kmlCategoryHNodeId))
View Full Code Here

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

    private static SimpleFeatureType reprojectGeometryType(Name geometryAttName) {
        SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder();
        AttributeTypeBuilder attBuilder  = new AttributeTypeBuilder();
        attBuilder.crs(DefaultGeographicCRS.WGS84);
        attBuilder.binding(MultiPolygon.class);
        GeometryDescriptor geomDescriptor = attBuilder.buildDescriptor(geometryAttName, attBuilder.buildGeometryType());
        builder.setName("dummy");
        builder.setCRS( DefaultGeographicCRS.WGS84 );
        builder.add(geomDescriptor);
        return builder.buildFeatureType();
    }
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.