/** * Writes the multiPoint. * * @param geometry * @param writer * @throws IOException */ public void writeMultiPoint( MultiPoint geometry, Writer writer ) throws IOException { writer.append( "MULTIPOINT " ); if ( flags.contains( WKTFlag.USE_DKT ) ) { appendObjectProps( writer, geometry ); } writer.append( '(' ); for ( int i = 0; i < geometry.size(); i++ ) { writePointWithoutPrefix( geometry.get( i ), writer ); if ( i < geometry.size() - 1 ) { writer.append( ',' ); } } writer.append( ')' ); }
/** * transforms the submitted multi point to the target coordinate reference system * * @throws TransformationException */ private MultiPoint transform( MultiPoint geo, Transformation trans ) throws TransformationException { List<Point> points = new ArrayList<Point>( geo.size() ); for ( Point p : geo ) { points.add( transform( p, trans ) ); } return geomFactory.createMultiPoint( geo.getId(), getTargetCRS(), points ); }
multiPoint.setType( type ); multiPoint.setProperties( props );