private Path2D getPath ( double simplifyTolerance , BoundingBox boundingBox , ProjectionTransform transform , LineString lineString ) { Path2D path = null ; // Try to simplify the number of points in the LineString List < Point > lineStringPoints = simplifyPoints ( simplifyTolerance , lineString . getPoints ( ) ) ; for ( Point point : lineStringPoints ) { Point projectedPoint = transform . transform ( point ) ; float x = TileBoundingBoxUtils . getXPixel ( tileWidth , boundingBox , projectedPoint . getX ( ) ) ; float y = TileBoundingBoxUtils . getYPixel ( tileHeight , boundingBox , projectedPoint . getY ( ) ) ; if ( path == null ) { path = new Path2D . Double ( ) ; path . moveTo ( x , y ) ; } else { path . lineTo ( x , y ) ; } } return path ; }
Get the path of the line string