Examples of GeometryAttribute


Examples of org.opengis.feature.GeometryAttribute

    }

    @Override
    public GeometryAttribute getDefaultGeometryProperty() {
        GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
        GeometryAttribute geometryAttribute = null;
        if (geometryDescriptor != null) {
            Object defaultGeometry = getDefaultGeometry();
            geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);
        }
        return geometryAttribute;
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

            SimpleFeature f = r.next();
            assertNotNull(f);
            assertNotNull(f.getFeatureType());
            assertNotNull(f.getBounds());

            GeometryAttribute defaultGeom = f.getDefaultGeometryProperty();
            assertNotNull("expected non null GeometryAttribute", defaultGeom);

            return true;
        }
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

        return feature.getBounds();
    }

    public GeometryAttribute getDefaultGeometryProperty() {
        Object value = feature.getAttribute(backendGeomPropertyName);
        GeometryAttribute attr = new GeometryAttributeImpl(value, featureTyp
                .getGeometryDescriptor(), null);
        return attr;
    }
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

    /**
    * Test extracting geometry from geometryattribute should be successful.
    */
    public void testGeometry() {
      Geometry geometry = new EmptyGeometry();
    GeometryAttribute geoatt = new GeometryAttributeImpl(geometry, new GeometryDescriptorImpl(new GeometryTypeImpl(new NameImpl(""), EmptyGeometry.class, null, false, false, null, null, null), new NameImpl(""), 0, 0, false, null), null);
    Geometry geometry2 = Converters.convert(geoatt, Geometry.class);
       assertTrue(geometry == geometry2);
    }
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

        return (BoundingBox) bounds;
    }

    public GeometryAttribute getDefaultGeometryProperty() {
        GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
        GeometryAttribute geometryAttribute = null;
        if(geometryDescriptor != null){
            Object defaultGeometry = getDefaultGeometry();
            geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);           
        }
        return geometryAttribute;
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

                    numPolygons = 1;
                    expectedHoles = 2;
                } else {
                    throw new IllegalArgumentException("Expected states.1 or states.2, got " + fid);
                }
                GeometryAttribute defaultGeometryProperty = feature.getDefaultGeometryProperty();
                assertNotNull(defaultGeometryProperty);
                final Object value = defaultGeometryProperty.getValue();
                assertNotNull(value);
                assertTrue("value: " + value, value instanceof MultiPolygon);
                MultiPolygon mp = (MultiPolygon) value;

                assertEquals(numPolygons, mp.getNumGeometries());
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

    }

    public void testDefaultGeometryProperty(){
        assertTrue("expected GeometryAttribute, got " + feature.getProperty("the_geom").getClass().getName(),
                feature.getProperty("the_geom") instanceof GeometryAttribute);
        GeometryAttribute defaultGeometryProperty = feature.getDefaultGeometryProperty();
        assertNotNull(defaultGeometryProperty);
        assertNull(defaultGeometryProperty.getValue());
        assertNotNull(defaultGeometryProperty.getDescriptor());
        assertTrue(defaultGeometryProperty.getDescriptor() instanceof GeometryDescriptor);
    }
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

            return new ReferencedEnvelope( featureType.getCoordinateReferenceSystem() );
        }

        public GeometryAttribute getDefaultGeometryProperty() {
            GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
            GeometryAttribute geometryAttribute = null;
            if(geometryDescriptor != null){
                Object defaultGeometry = getDefaultGeometry();
                geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);           
            }
            return geometryAttribute;
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

                    numPolygons = 1;
                    expectedHoles = 2;
                } else {
                    throw new IllegalArgumentException("Expected states.1 or states.2, got " + fid);
                }
                GeometryAttribute defaultGeometryProperty = feature.getDefaultGeometryProperty();
                assertNotNull(defaultGeometryProperty);
                final Object value = defaultGeometryProperty.getValue();
                assertNotNull(value);
                assertTrue("value: " + value, value instanceof MultiPolygon);
                MultiPolygon mp = (MultiPolygon) value;

                assertEquals(numPolygons, mp.getNumGeometries());
View Full Code Here

Examples of org.opengis.feature.GeometryAttribute

                    numPolygons = 1;
                    expectedHoles = 0;
                } else {
                    throw new IllegalArgumentException("Expected states.1 or states.2, got " + fid);
                }
                GeometryAttribute defaultGeometryProperty = feature.getDefaultGeometryProperty();
                assertNotNull(defaultGeometryProperty);
                final Object value = defaultGeometryProperty.getValue();
                assertNotNull(value);
                assertTrue("value: " + value, value instanceof MultiPolygon);
                MultiPolygon mp = (MultiPolygon) value;

                assertEquals(numPolygons, mp.getNumGeometries());
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.