{"action":"opened","issue":{"number":330,"created_at":"2011-10-11T07:49:21Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I have suggestion, to add support for some kind of line and polyline smoothing.\r\nIt appears, there was some discussion already:\r\nhttp://lists.berlios.de/pipermail/mapnik-devel/2008-January/000367.html\r\n\r\nAgg and cairo has some support for bezier curves. I tried with agg_renderer.cpp by wrapping path_type with agg::conv_smooth_poly1_curve and adjusting smooth_value, but it only looks acceptable for wide angles, and still generated curves are little too far from source path.\r\nThings to keep in mind:[[BR]]\r\n- don't smooth angles less then specified value (i.e. 100 deg.).[[BR]]\r\n- [http://www.antigrain.com/research/bezier_interpolation/ conv_smooth_poly1_curve] generates curve passing through nodes, maybe better would be cutting turns. In other worlds drawing curves passing through middle points of path segments[[BR]]\r\n- solution should handle all paths, including text placement and polygons. To consider: what would be default behaviour for different symbolizers. Maybe some global option (smoothness) per layer, but this would be just walkaround of current xml format (or use cascadenik).[[BR]]\r\n- there should be some universal approach, to handle agg ang cairo, i.e.: adding new cmd: SEG_CURVETO to map to cairo's cairo_curve_to and agg's path_cmd_curve4 of conv_curve wrapper.[[BR]]\r\n- for polygons, closing should be also curved in case of wide angle.\r\n\r\nProbably this could be partly implemented in CoordTransform or some wrapper. For wide angles, it would at first generate SEG_LINETO to middle point of actual segment and SEG_CURVETO to middle of next segment. Bezier control points would be placed along segments and with length dependent on smoothness value. For narrow angles, SEG_LINETO from actual middle, to end of segment, and SEG_LINETO to next middle point (could be omitted in case of two adjacent narrow angles).","comments":0,"title":"Rendering curved paths","updated_at":"2011-10-11T07:49:21Z","url":"https://api.github.com/repos/mapnik-org/mapnik/issues/330","id":1871900,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/mapnik-org/mapnik/issues/330","labels":[{"name":"Agg_Renderer","url":"https://api.github.com/repos/mapnik-org/mapnik/labels/Agg_Renderer","color":"FFFFFF"}],"state":"open"},"legacy":{"number":330,"action":"opened","issue":1871900}}