Point implements CoordinateContainer<List<Double>> { public static Point fromLngLat(double longitude, double latitude) { List<Double> coordinates = CoordinateShifterManager.getCoordinateShifter().shiftLonLat(longitude, latitude); return new Point(TYPE, null, coordinates); } Point(String type, @Nullable BoundingBox bbox, List<Double> coordinates); static Point fromJson(@NonNull String json); static Point fromLngLat(double longitude, double latitude); static Point fromLngLat(double longitude, double latitude,
    @Nullable BoundingBox bbox); static Point fromLngLat(double longitude, double latitude, double altitude); static Point fromLngLat(double longitude, double latitude,
    double altitude, @Nullable BoundingBox bbox); double longitude(); double latitude(); double altitude(); boolean hasAltitude(); @NonNull @Override String type(); @Nullable @Override BoundingBox bbox(); @NonNull @Override List<Double> coordinates(); @Override String toJson(); static TypeAdapter<Point> typeAdapter(Gson gson); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void sanity() throws Exception { Point point = Point.fromLngLat(1.0, 2.0); assertNotNull(point); }
@Test public void point_isNullWithWrongLengthDoubleArray() throws Exception { double[] coords = new double[] {1.0}; Point point = Point.fromLngLat(coords); assertNull(point); }
@Test public void testSerializable() throws Exception { List<Point> points = new ArrayList<>(); points.add(Point.fromLngLat(1.0, 1.0)); points.add(Point.fromLngLat(2.0, 2.0)); points.add(Point.fromLngLat(3.0, 3.0)); BoundingBox bbox = BoundingBox.fromLngLats(1.0, 2.0, 3.0, 4.0); LineString lineString = LineString.fromLngLats(points, bbox); byte[] bytes = serialize(lineString); assertEquals(lineString, deserialize(bytes, LineString.class)); }