private void addLineString ( double simplifyTolerance , BoundingBox boundingBox , ProjectionTransform transform , Path path , LineString lineString ) { List < Point > points = lineString . getPoints ( ) ; if ( points . size ( ) >= 2 ) { // Try to simplify the number of points in the LineString points = simplifyPoints ( simplifyTolerance , points ) ; for ( int i = 0 ; i < points . size ( ) ; i ++ ) { Point point = points . get ( i ) ; Point webMercatorPoint = transform . transform ( point ) ; float x = TileBoundingBoxUtils . getXPixel ( tileWidth , boundingBox , webMercatorPoint . getX ( ) ) ; float y = TileBoundingBoxUtils . getYPixel ( tileHeight , boundingBox , webMercatorPoint . getY ( ) ) ; if ( i == 0 ) { path . moveTo ( x , y ) ; } else { path . lineTo ( x , y ) ; } } } }
Add the linestring to the path