Package org.geotools.validation.spatial

Examples of org.geotools.validation.spatial.IsValidGeometryValidation.validate()


        IsValidGeometryValidation validator = new IsValidGeometryValidation();
        validator.setName("isValidRoad");
        validator.setDescription("Tests to see if a road is valid");
        validator.setTypeRef( "*" );
        validationResults.setValidation(validator);
        assertTrue(validator.validate(this.newRoad, this.roadType,
                validationResults));

        try {
            this.newRoad = SimpleFeatureBuilder.build(this.roadType,(new Object[] {
                        new Integer(2), line(new int[] { 1, 2, 1, 2 }), "r4"
View Full Code Here


                        new Integer(2), line(new int[] { 1, 2, 1, 2 }), "r4"
                    }), "road.rd4");
        } catch (IllegalAttributeException e) {
        }

        assertTrue(!validator.validate(this.newRoad, this.roadType,
                validationResults)); // validate will return false
    }

    /**
     * testABunchOfValidations purpose.
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.