private Geometry readPolyline( ByteBuffer buffer, boolean z, boolean m, int length ) { Points[] ps = readLines( buffer, m, z, length ); List<LineString> cs = new ArrayList<LineString>( ps.length ); for ( int i = 0; i < ps.length; ++i ) { cs.add( fac.createLineString( null, crs, ps[i] ) ); } return fac.createMultiLineString( null, crs, cs ); }
private LineString getLegendLine( int xpos, int ypos, int xsz, int ysz ) { Point p1 = geofac.createPoint( null, xpos, ypos - ysz, mapcs ); Point p2 = geofac.createPoint( null, xpos + xsz / 3, ypos - ysz / 3, mapcs ); Point p3 = geofac.createPoint( null, xpos + xsz / 3 * 2, ypos - ysz / 3 * 2, mapcs ); Point p4 = geofac.createPoint( null, xpos + xsz, ypos, mapcs ); List<Point> ps = new ArrayList<Point>( 4 ); ps.add( p1 ); ps.add( p2 ); ps.add( p3 ); ps.add( p4 ); return geofac.createLineString( null, mapcs, geofac.createPoints( ps ) ); }
private LineString transform( LineString geo, Transformation trans ) throws TransformationException { LineStringSegment segment = (LineStringSegment) geo.getCurveSegments().get( 0 ); // only one for a line string? Points pos = segment.getControlPoints(); pos = transform( pos, trans ); return geomFactory.createLineString( geo.getId(), getTargetCRS(), pos ); }
throw new XMLParsingException( xmlStream, msg ); LineString lineString = geomFac.createLineString( gid, crs, geomFac.createPoints( points ) ); idContext.addObject( lineString ); return lineString;
LineString lineString = geomFac.createLineString( gid, crs, geomFac.createPoints( points ) ); lineString.setType( type );
ps.add( (Point) move( p, offx, offy ) ); return fac.createLineString( geom.getId(), c.getCoordinateSystem(), new PointsList( ps ) );
if ( min.get0() == max.get0() || min.get1() == max.get1() ) { Points points = new PointsArray( min, max ); return fac.createLineString( null, crs, points ); Curve ls = fac.createLineString( null, crs, new PackedPoints( null, points, 2 ) ); Ring exteriorRing = fac.createRing( null, crs, Collections.singletonList( ls ) ); return fac.createPolygon( null, crs, exteriorRing, null );