Package com.vividsolutions.jts.geom

Examples of com.vividsolutions.jts.geom.PrecisionModel$Type


        }

        GeometryFactory gf = (GeometryFactory) hints.get(Hints.JTS_GEOMETRY_FACTORY);

        if (gf == null) {
            PrecisionModel pm = (PrecisionModel) hints.get(Hints.JTS_PRECISION_MODEL);
            if (pm == null) {
                pm = new PrecisionModel();
            }
            Integer SRID = (Integer) hints.get(Hints.JTS_SRID);
            int srid = SRID == null ? 0 : SRID.intValue();
            Integer dimension = (Integer) hints.get(Hints.COORDINATE_DIMENSION);
            CoordinateSequenceFactory csFactory = (CoordinateSequenceFactory) hints
View Full Code Here


                        "Invalid or unsupported SRS name detected for toPoint function: " + srsName
                                + ". Cause: " + e.getMessage());
            } catch (FactoryException e) {
                throw new RuntimeException("Unable to decode SRS name. Cause: " + e.getMessage());
            }
            GeometryFactory fac = new GeometryFactory(new PrecisionModel());
            point = fac.createPoint(new Coordinate(
                    parameters.get(2).evaluate(object, Double.class), parameters.get(3).evaluate(
                            object, Double.class)));
            // set attributes
            String gmlId = null;
View Full Code Here

    super.connect();
    dataStore.setDatabaseSchema("geotools");
  }
 
  public void testGeometryCollection() throws Exception{
          PrecisionModel precisionModel = new PrecisionModel();
                 
          int SRID = 4326;
          GeometryFactory gf = new GeometryFactory(precisionModel, SRID);
          Coordinate[] points = { new Coordinate(30, 40), new Coordinate(50, 60) };
          LineString[] geometries = new LineString[2];
View Full Code Here

        String binary = "E864000001044C000000759318044D4E1C41CDCCCCBCF32755416ABC74134F4E1C41A4703DFAF22755415A643BDF474E1C41BA490C5AF2275541F853E325014E1C4177BE9FA2EF2755415839B448F94D1C4160E5D07AEF2755411F85EB51EB4D1C41FED478F1EE2755416F128340DD4D1C41C520B0AAEE2755419EEFA7C6CE4D1C41C976BED7EE275541022B8716C54D1C417B14AE37EF2755415EBA490CBD4D1C41F4FDD4B8EF27554185EB51B8E94D1C41D578E91EEB2755419EEFA746EF4D1C4127310844EC275541CBA145B6FC4D1C41CBA1451EED27554148E17A94524E1C4177BE9F6AF0275541D34D6290644E1C414C378999F0275541B81E856B734E1C415839B4F0EF275541C1CAA1C57E4E1C41621058D1EE275541643BDFCF994E1C411283C0E2EF275541D34D62108F4E1C4160E5D0F2F02755412DB29DEF8B4E1C41AC1C5A14F22755412FDD2486964E1C41FA7E6A04F32755418B6CE7FB184F1C41F0A7C62BF8275541EC51B81E474F1C41666666FEF9275541E17A142E534F1C41C976BE1FFA275541BE9F1A2F5D4F1C418716D9AEF9275541105839346C4F1C4177BE9F32F827554152B81E05834F1C4162105819F927554196438BEC5C4F1C41736891DDFC275541F6285C0F404F1C419CC420B8FF275541A4703D8A384F1C41B4C87676002855416F128340064F1C41448B6C6F0528554177BE9F9AD94E1C419A9999D909285541643BDF4FAD4E1C411283C03A0E28554100000080A04E1C410C022B7F0F2855416DE7FBA95C4E1C41C3F52834162855417F6ABC74734D1C41C1CAA1FD0C285541F853E325384D1C41AE47E1DA1228554125068115384D1C41560E2DDA12285541105839341E4D1C41C1CAA1AD11285541CBA145B68F4D1C4196438B7406285541D578E9A6AD4D1C419EEFA77E03285541759318044D4E1C41CDCCCCBCF32755416F1283C0464E1C41C976BE5713285541643BDFCF524E1C41DD24067913285541643BDFCF5C4E1C419CC4200813285541BE9F1AAF894E1C4121B072980E285541DD240681964E1C41D9CEF7530D28554160E5D0A2C14E1C419CC42010092855418716D94EED4E1C4139B4C8BE04285541D122DBF9184F1C41D7A3706D002855418D976E123C4F1C4104560EF5FC275541B29DEF273E4F1C4175931834FC27554177BE9F1A374F1C4175931894FB275541D7A370BDEC4E1C41273108A4F827554121B072E8CA4E1C41F853E34DF7275541AAF1D2CDB44E1C41CBA1456EF6275541333333B39E4E1C41EC51B88EF5275541DD240681864E1C416DE7FB99F42755410AD7A3707A4E1C410AD7A378F42755412DB29D6F704E1C414C3789E9F4275541EE7C3FB5454E1C41986E1223F92755417D3F35DE374E1C41FED47881FA2755414E621058204E1C416891EDD4FC275541FCA9F1D2084E1C4137894128FF275541FED478E9F94D1C41355EBAA100285541CFF75363E24D1C41A01A2FF5022855417D3F35DECA4D1C416F128348052855415EBA490CBE4D1C416891ED8C06285541BE9F1A2F914D1C41E3A59BFC0A2855419A9999198F4D1C41C1CAA1BD0B285541B29DEF27964D1C410E2DB25D0C285541E5D0225BAE4D1C418D976E520D2855415C8FC275C44D1C416DE7FB310E285541D34D6290DA4D1C414C3789110F28554189416065FC4D1C417B14AE67102855416F1283C0464E1C41C976BE5713285541020000000200000000002A00000002000000FFFFFFFF0000000006000000000000000003";
        testGeometry(binary,wkt,25832);
    }

    private Geometry testGeometry(String geometryBinary, String geometryWKT) throws Exception {
        WKTReader readerWkt = new WKTReader((new GeometryFactory(new PrecisionModel(), 0)));
        return testGeometry(geometryBinary, geometryWKT, readerWkt);
    }
View Full Code Here

        assertEquals(geometryFromWkt, geometryFromBinary);
        return geometryFromBinary;
    }

    private Geometry testGeometry(String geometryBinary, String geometryWKT, int srid) throws Exception {
        WKTReader readerWkt = new WKTReader((new GeometryFactory(new PrecisionModel(), srid)));
        Geometry geometry = testGeometry(geometryBinary, geometryWKT, readerWkt);
        assertEquals(srid, geometry.getSRID());
        return geometry;
    }
View Full Code Here

    /**
     * Construct Fixture for use with default GeometryFactory.
     */
    public GeometryFixture() {
        this(new GeometryFactory(new PrecisionModel(), -1));
    }
View Full Code Here

    }

    @Test
    public void testHoleAssignment() {
        Dimension ps = new Dimension(500, 500);
        PrecisionModel precision = new PrecisionModel();

        ArrayList shells = new ArrayList();
        ArrayList holes = new ArrayList();

        int x = 10;
View Full Code Here

    }

    @Test
    public void testHoleAssignment() {
        java.awt.Dimension ps = new java.awt.Dimension(500, 500);
        PrecisionModel precision = new PrecisionModel();

        ArrayList shells = new ArrayList();
        ArrayList holes = new ArrayList();

        int x = 10;
View Full Code Here

*/
public class FilterFunction_distance3DTest extends TestCase{

    public void testDistance3D() {
        FilterFactoryImpl ff = new FilterFactoryImpl();
        GeometryFactory gf = new GeometryFactory(new PrecisionModel());
               
        SimpleFeatureType type = null;
        try {
            type = DataUtilities.createType("testSchema", "name:String,*geom:Geometry");
        } catch (SchemaException e) {
View Full Code Here

         */
        protected boolean isAcceptable(final Object provider, final Class category, final Hints hints) {
            if (GeometryFactory.class.isAssignableFrom(category)) {
                final GeometryFactory           factory   = (GeometryFactory) provider;
                final CoordinateSequenceFactory sequence  = factory.getCoordinateSequenceFactory();
                final PrecisionModel            precision = factory.getPrecisionModel();
                if (!isAcceptable(sequence,  hints.get(Hints.JTS_COORDINATE_SEQUENCE_FACTORY)) ||
                    !isAcceptable(precision, hints.get(Hints.JTS_PRECISION_MODEL)))
                {
                    return false;
                }
View Full Code Here

TOP

Related Classes of com.vividsolutions.jts.geom.PrecisionModel$Type

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.