Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.EmptyGeometry


   
    /**
    * 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


        if (target instanceof GeometryAttribute
                && (targetAttributes.size() > 0 || target.getIdentifier() != null)) {
            Geometry geom;
            if (target.getValue() == null) {
                // create empty geometry if null but attributes
                geom = new EmptyGeometry();
            } else {
                // need to clone because it seems the same geometry object from the
                // db is reused instead of regenerated if different attributes refer
                // to the same database row... so if we change the userData, we have
                // to clone it
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.geom.EmptyGeometry

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.