Package org.opentripplanner.util.model

Examples of org.opentripplanner.util.model.EncodedPolylineBean


            count++;
        }

        String pointsString = encodedPoints.toString();
        String levelsString = level >= 0 ? encodedLevels.toString() : null;
        return new EncodedPolylineBean(pointsString, levelsString, count);
    }
View Full Code Here


        // test taken from example usage
        List<Coordinate> points = new ArrayList<Coordinate>();
        points.add(new Coordinate(-73.85062, 40.903125, Double.NaN));
        points.add(new Coordinate(-73.85136, 40.902261, Double.NaN));
        points.add(new Coordinate(-73.85151, 40.902066, Double.NaN));
        EncodedPolylineBean eplb = PolylineEncoder.createEncodings(points);
        assertEquals("o{sxFl}vaMjDpCf@\\", eplb.getPoints());
        assertEquals(3, eplb.getLength());
        assertNull(eplb.getLevels());
    }
View Full Code Here

public class TestEncodedPolylineBean extends TestCase {

    public void testEncodedPolylineBean() {
        // test taken from an example usage
        EncodedPolylineBean eplb = new EncodedPolylineBean("wovwF|`pbMgPzg@CHEHCFEFCFEFEFEDGDEDEDGBEBGDG@", null, 17);
        assertEquals("wovwF|`pbMgPzg@CHEHCFEFCFEFEFEDGDEDEDGBEBGDG@", eplb.getPoints());
        assertNull(eplb.getLevels());
        assertEquals(17, eplb.getLength());
    }
View Full Code Here

TOP

Related Classes of org.opentripplanner.util.model.EncodedPolylineBean

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.