GeometryBuilder { public LineString lineString() { return geomFact.createLineString(createCS(new double[0], 2)); } GeometryBuilder();  GeometryBuilder(GeometryFactory geomFact); Point point(); Point pointZ(); Point point(double x); Point point(double x, double y); Point pointZ(double x, double y, double z); LineString lineString(); LineString lineStringZ(); LineString lineString(double... ord); LineString lineStringZ(double... ord); LinearRing linearRing(); LinearRing linearRingZ(); LinearRing linearRing(double... ord); LinearRing linearRingZ(double... ord); Polygon polygon(); Polygon polygonZ(); Polygon polygon(double... ord); Polygon polygonZ(double... ord); Polygon polygon(LinearRing shell); Polygon polygon(LinearRing shell, LinearRing hole); Polygon polygon(Polygon shell, Polygon hole); Polygon box(double x1, double y1, double x2, double y2); Polygon boxZ(double x1, double y1, double x2, double y2, double z); Polygon ellipse(double x1, double y1, double x2, double y2, int nsides); Polygon circle(double x, double y, double radius, int nsides); MultiPoint multiPoint(double x1, double y1, double x2, double y2); MultiPoint multiPointZ(double x1, double y1, double z1, double x2,
            double y2, double z2); MultiLineString multiLineString(LineString... lines); MultiPolygon multiPolygon(Polygon... polys); GeometryCollection geometryCollection(Geometry... geoms);  }
@Test public void emptyLineString() throws Exception { LineString line = builder.lineString(); assertTrue(line.isEmpty()); assertEquals(2, line.getCoordinateSequence().getDimension()); }
@Test public void lineStringFromOrdinates() throws Exception { double[] ordinates = new double[] {1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0}; LineString line = builder.lineString(ordinates); Coordinate[] coords = line.getCoordinates(); assertCoordinates(coords, ordinates, 2); }