Package org.opengis.feature.type

Examples of org.opengis.feature.type.Name


  public URI getSchema() {
    SimpleFeatureType ft = getFeatureType();
    if (ft == null) return null;
   
    try {
      Name typeName = ft.getName();
      if (typeName.getNamespaceURI() != null) {
        return new URI(ft.getName().getNamespaceURI());
      } else {
        return null; // should probably be GML?
      }
    } catch (URISyntaxException e) {
View Full Code Here


        assertTrue("Datastore available", service.canResolve( DataStore.class));
       
        DataAccess dataStore = service.resolve( DataStore.class, null );
        assertNotNull("DataStore connected", dataStore );
       
        Name typeName = (Name) dataStore.getNames().get(0);;
        FeatureSource featureSource = dataStore.getFeatureSource( typeName );
       
        assertEquals( 4, featureSource.getCount( Query.ALL ) );
       
        //IServiceInfo info = service.getInfo(new NullProgressMonitor());
View Full Code Here

          schema = ((SimpleFeature) adaptable.getAdapter(SimpleFeatureType.class)).getFeatureType();
        }
      }

        if (schema != null) {
            Name featureName = schema.getName();
            if (namespace != null) {

                if (namespace.compareTo(URI.create(featureName.getNamespaceURI())) == 0
                        && typeName.equals(featureName.getLocalPart())) {
                    return PERFECT;
                }
                return NO_MATCH;
            }
            if (attributes.length == 0) {
View Full Code Here

        if (!layer.hasResource(FeatureSource.class))
            return Filter.EXCLUDE;
        try {

            SimpleFeatureType schema = layer.getSchema();
            Name geom = getGeometryAttDescriptor(schema).getName();

            Filter bboxFilter = factory.bbox(factory.property(geom), boundingBox);

            return bboxFilter;
        } catch (Exception e) {
View Full Code Here

        length = length + geometry.getLength();
      }
    } finally {
      iterator.close();
    }
    final Name name = source.getName();
    final double answer = length;
    display.asyncExec(new Runnable() {
      public void run() {
        Shell shell = display.getActiveShell();
        MessageDialog.openInformation(shell, "Total Length",
View Full Code Here

        String nameSpace;
        String typeName;
        Map<Name, FeatureSource<SimpleFeatureType, SimpleFeature>> stores = new HashMap<Name, FeatureSource<SimpleFeatureType, SimpleFeature>>();
        Set<Name> typeRefs = new HashSet<Name>();
        for (int i = 0; i < layers.length; i++) {
            Name name = layers[i].getSchema().getName();
            nameSpace = name.getNamespaceURI();
            typeName = name.getLocalPart();
            source = layers[i].getResource(FeatureSource.class, monitor);
            //map = dataStoreID:typeName
            String typeRef = nameSpace.toString()+":"+typeName; //$NON-NLS-1$
            stores.put(name, source);
            typeRefs.add(name);
View Full Code Here

    SimpleFeatureType ft = getFeatureType();
    if (ft == null)
      return null;

    try {
      Name typeName = ft.getName();
      if (typeName.getNamespaceURI() != null) {
        return new URI(ft.getName().getNamespaceURI());
      } else {
        return null; // should probably be GML?
      }
    } catch (URISyntaxException e) {
View Full Code Here

                                throw (RuntimeException) new RuntimeException(
                                        Messages.ReprojectingFeatureCollection_transformationError + next.getID()).initCause(e);
                            }
                    }
                    GeometryDescriptor defaultGeometry2 = featureType.getGeometryDescriptor();
                    Name name = defaultGeometry2.getName();
                    String localPart = name.getLocalPart();
                    feature = new FeatureWrapper(next, featureType, new Geometry[]{geometry},
                                new String[]{ localPart});
                }
                return feature!=null;
            }
View Full Code Here

        if (!layer.hasResource(FeatureSource.class))
            return Filter.EXCLUDE;
        try {

            SimpleFeatureType schema = layer.getSchema();
            Name geom = getGeometryAttDescriptor(schema).getName();
           
            Filter bboxFilter =factory.bbox(factory.property(geom), boundingBox);
           

            return bboxFilter;
View Full Code Here

        if(templateLoader == null) {
            templateLoader = new GeoServerTemplateLoader(getClass());
        }
       
        if(featureType != null) {
            final Name name = featureType.getName();
            final WMS wms = getRequest().getWMS();

            FeatureTypeInfo featureTypeInfo = wms.getFeatureTypeInfo(name);

            if(featureTypeInfo == null){
View Full Code Here

TOP

Related Classes of org.opengis.feature.type.Name

Copyright © 2018 www.massapicom. 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.