Package com.impetus.kundera.gis.geometry

Examples of com.impetus.kundera.gis.geometry.Point


    }

    @Override
    public Object getInstance(Class<?> clazz)
    {
        return new Point(0.0, 0.0);
    }
View Full Code Here


     * .
     */
    @Test
    public void testFromBytes()
    {
        Point point = new Point(4.5, 6.3);
        byte[] input = pa.toBytes(point);

        Point point2 = pa.fromBytes(Point.class, input);
        Assert.assertTrue(point.equals(point2));
    }
View Full Code Here

     * .
     */
    @Test
    public void testToBytes()
    {
        Point point = new Point(4.5, 6.3);
        byte[] input = pa.toBytes(point);

        Point point2 = pa.fromBytes(Point.class, input);
        Assert.assertTrue(point.equals(point2));
    }
View Full Code Here

     * .
     */
    @Test
    public void testToStringObject()
    {
        Point point = new Point(4.5, 6.3);
        String pointStr = pa.toString(point);

        WKTWriter writer = new WKTWriter();
        String wktStr = writer.write(point);

View Full Code Here

     * .
     */
    @Test
    public void testFromString()
    {
        Point point = new Point(4.5, 6.3);
        WKTWriter writer = new WKTWriter();
        String wktStr = writer.write(point);

        Point point2 = pa.fromString(com.vividsolutions.jts.geom.Point.class, wktStr);

        Assert.assertNotNull(point2);
        Assert.assertEquals(point.getX(), point2.getX());
        Assert.assertEquals(point.getY(), point2.getY());
    }
View Full Code Here

     * .
     */
    @Test
    public void testGetCopy()
    {
        Point point = new Point(4.5, 6.3);
        Point point2 = pa.getCopy(point);
        Assert.assertFalse(point == point2);
        Assert.assertTrue(point.equals(point2));
    }
View Full Code Here

     * .
     */
    @Test
    public void testGetInstance()
    {
        Point point = (Point) pa.getInstance(Point.class);
        Assert.assertNotNull(point);
        Assert.assertEquals(0.0, point.getX());
        Assert.assertEquals(0.0, point.getY());
    }
View Full Code Here

TOP

Related Classes of com.impetus.kundera.gis.geometry.Point

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.