@Override public void render( Styling styling, Geometry geom ) { if ( geom instanceof GeometryReference<?> ) { render( styling, ( (GeometryReference<?>) geom ).getReferencedObject() ); } if ( styling instanceof PointStyling ) { render( (PointStyling) styling, geom ); } if ( styling instanceof LineStyling ) { render( (LineStyling) styling, geom ); } if ( styling instanceof PolygonStyling ) { render( (PolygonStyling) styling, geom ); } }
@Override public void render( Styling styling, Collection<Geometry> geoms ) { for ( Geometry geom : geoms ) { if ( geom instanceof GeometryReference<?> ) { render( styling, ( (GeometryReference<?>) geom ).getReferencedObject() ); } if ( styling instanceof PointStyling ) { render( (PointStyling) styling, geom ); } if ( styling instanceof LineStyling ) { render( (LineStyling) styling, geom ); } if ( styling instanceof PolygonStyling ) { render( (PolygonStyling) styling, geom ); } } }
private void handleOutline( RasterStyling styling, AbstractRaster raster ) { // TODO cleanup outline stuff if ( styling.imageOutline != null ) { LOG.trace( "Rendering image outline..." ); Geometry geom = Raster2Feature.createPolygonGeometry( raster ); Java2DRenderer vectorRenderer = new Java2DRenderer( graphics ); @SuppressWarnings("unchecked") Pair<Styling, LinkedList<Geometry>> pair = (Pair) styling.imageOutline.evaluate( null, null ); Styling ls = pair.first; vectorRenderer.render( ls, geom ); LOG.trace( "Done rendering image outline." ); } }
void render( PointStyling styling, Curve curve ) { if ( curve.getCurveSegments().size() != 1 || !( curve.getCurveSegments().get( 0 ) instanceof LineStringSegment ) ) { // TODO handle non-linear and multiple curve segments throw new IllegalArgumentException(); } LineStringSegment segment = ( (LineStringSegment) curve.getCurveSegments().get( 0 ) ); // coordinate representation is still subject to change... for ( Point point : segment.getControlPoints() ) { point.setCoordinateSystem( curve.getCoordinateSystem() ); renderer.render( styling, point ); } }
void render( PointStyling styling, Surface surface ) { for ( SurfacePatch patch : surface.getPatches() ) { if ( patch instanceof PolygonPatch ) { PolygonPatch polygonPatch = (PolygonPatch) patch; for ( Curve curve : polygonPatch.getBoundaryRings() ) { curve.setCoordinateSystem( surface.getCoordinateSystem() ); renderer.render( styling, curve ); } } else { throw new IllegalArgumentException( "Cannot render non-planar surfaces." ); } } }
void render( LineStyling styling, Surface surface ) { for ( SurfacePatch patch : surface.getPatches() ) { if ( patch instanceof PolygonPatch ) { PolygonPatch polygonPatch = (PolygonPatch) patch; for ( Curve curve : polygonPatch.getBoundaryRings() ) { if ( curve.getCoordinateSystem() == null ) { curve.setCoordinateSystem( surface.getCoordinateSystem() ); } renderer.render( styling, curve ); } } else { throw new IllegalArgumentException( "Cannot render non-planar surfaces." ); } } }
render( styling, g );
final MultiGeometry<?> mc = (MultiGeometry<?>) renderGeometry; for ( final Geometry g : mc ) { render( styling, g );
@Override public void render( final PointStyling styling, final Geometry geom ) { if ( geom == null ) { LOG.debug( "Trying to render null geometry." ); return; } if ( geom instanceof Point ) { final Point pointInWorldCrs = (Point) rendererContext.geomHelper.transform( geom ); rendererContext.pointRenderer.render( styling, pointInWorldCrs.get0(), pointInWorldCrs.get1() ); return; } final Geometry clippedGeometry = transformToWorldCrsAndClip( geom ); if ( clippedGeometry == null ) { return; } if ( clippedGeometry instanceof Surface ) { rendererContext.polygonRenderer.render( styling, (Surface) clippedGeometry ); } else if ( clippedGeometry instanceof Curve ) { rendererContext.curveRenderer.render( styling, (Curve) clippedGeometry ); } else if ( clippedGeometry instanceof MultiGeometry<?> ) { final MultiGeometry<?> mc = (MultiGeometry<?>) clippedGeometry; for ( final Geometry g : mc ) { render( styling, g ); } } }
evaluator ); for ( Triple<Styling, LinkedList<Geometry>, String> tr : evald ) { renderer.render( tr.first, tr.second );