{"comment":{"created_at":"2011-10-11T15:18:25Z","body":"[springmeyer] see also: \r\nhttps://lists.berlios.de/pipermail/mapnik-devel/2010-March/001101.html\r\nand\r\nhttps://lists.berlios.de/pipermail/mapnik-devel/2010-March/001104.html","updated_at":"2011-10-11T15:18:25Z","url":"https://api.github.com/repos/artemp/tickets2issues/issues/comments/2364010","id":2364010,"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"}},"action":"created","issue":{"number":442,"created_at":"2011-10-11T15:18:23Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"This enhancement suggestion was encouraged by Dane Springmeyer (see emails appended below).\r\n\r\nMapnik currently lacks a feature to easily generate maps with coordinate grids and map borders with coordinates. Coordinate grids/borders are obligatory e.g. for any scientific use of maps.\r\n\r\nThe Generic Mapping Tools (GMT, http://gmt.soest.hawaii.edu) could serve as a model for the functionality to be achieved by implementing this feature. GMT comprises a set of command line tools producing postscript output from raster or vector data for a given map bounding box, map size/scale and projection; the data produced  may be augmented by other tool's output to generate the final map. To draw an empty base map with frame and coordinate grids, the tool psbasemap may be used. The base map specification (given by command line arguments and/or via the GMT configuration file) includes\r\n\r\n* the type of map border (frame type \"simple\" or \"fancy\"),\r\n\r\n* the sides of the map where borders are to be drawn (N, W, S, E) and \r\n\r\n* the subdivision of the grid. \r\n\r\nThe map border may include separate, \"primary\" and \"secondary\" frames drawn next to each other (possibly not essential for mapnik).\r\n\r\nThe \"fancy\" map border consists of a chain of slim rectangles in contrasting colours (normally black and white) alternating with the tick marks; the \"simple\" map borders consist of a line with tick marks. Within the map, grid lines can be drawn, or grid line intersections can be marked by crossed short line segments. \r\n\r\nIntervals for labels and tick marks of the map border and for the grid lines/marks within the map can be chosen independently. The units for the subdivision of the grid depend on the projection. The number format for the labels can be specified via format string within the range valid for the given projection. Further, label offset, font, font size, label colour and line width, type and colour can be specified.\r\n\r\nThe respective GMT documentation (with graphical examples) can be found at\r\n\r\nhttp://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node36.html\r\nhttp://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node37.html\r\nhttp://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node30.html\r\n\r\nExamples for maps produced with varying border/grid specifications for the different projection types are illustrated within subsections of\r\n\r\nhttp://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node78.html\r\n\r\nI hope that this description might help to implement the corresponding functionality in a future version of mapnik.\r\n\r\nThanks!\r\nUlf\r\n\r\n-----------------------------------------------------------\r\nFrom: \tDane Springmeyer <blake@hailmail.net>\r\nTo: \tUlf Mehlig <ulf.mehlig@gmx.net>\r\nCc: \tmapnik-users@lists.berlios.de\r\nSubject: \tRe: [Mapnik-users] map borders, coordinate grid\r\nDate: \tThu, 9 Apr 2009 08:18:27 -0700 (12:18 BRT)\r\n\r\n\r\nHello Ulf,\r\n\r\nNo. The desire for map elements has been expressed and their has been  \r\nsome interesting work in the experimental PDF branch, but there is no  \r\ntimeline or distinct plan at this point.\r\n\r\nI should probably move those items to the 1.0 milestone to avoid  \r\nconfusion (done).\r\n\r\nThe easiest way to get grids on a Mapnik map would be to generate a  \r\nshapefile or graticules and render it as a layer. I've stashed a  \r\ngraticule generator here if you are interested: http://mapnik-utils.googlecode.com/svn/example_code/bonne_projection/generate_graticules.py\r\n\r\nFor a map border you could consider rendering a Mapnik map to the  \r\nCairo Context (requires building Mapnik with Cairo), and then using  \r\nthe Cairo C++ or Python bindings to draw borders.\r\n\r\nUlf, GMT tools have quite advanced features and I agree that it would  \r\nbe excellent to think through similar features in Mapnik.\r\n\r\nUlf, could you create a trac ticket describing some of the GMT stuff  \r\nyou would like to see?\r\n\r\nDane\r\n\r\n\r\n\r\nOn Apr 9, 2009, at 7:40 AM, Ulf Mehlig wrote:\r\n\r\n> I just saw that http://trac.mapnik.org/milestone/0.7.0 lists \"map  \r\n> canvas\r\n> features (surround,legend,scalebar,etc)\". Does this imply that one may\r\n> expect that future Mapnik versions provide different types of map\r\n> borders with coordinate divisions, scalebars etc., like in the Generic\r\n> Mapping Tools (http://gmt.soest.hawaii.edu), for example? That would  \r\n> be\r\n> great ...\r\n>\r\n> However, is there any moderately simple way to get coordinate grids  \r\n> and\r\n> map borders with coordinate division with today's Mapnik?\r\n>\r\n> Many thanks! Ulf","comments":3,"title":"suggestion for implementation of map borders and coordinate grids similar to those provided by GMT","updated_at":"2011-10-11T15:18:25Z","url":"https://api.github.com/repos/artemp/tickets2issues/issues/442","id":1876314,"assignee":null,"milestone":{"number":2,"created_at":"2011-10-11T14:49:57Z","due_on":null,"title":"Future","creator":{"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"},"url":"https://api.github.com/repos/artemp/tickets2issues/milestones/2","open_issues":50,"closed_issues":1,"description":"Tickets without a proper milestone: either because they are unsorted and unreviewed or because developers do not see capacity to work on them before a planned release.\r\n\r\nThis group should be periodically reviewed and plucked by developers to be included in other milestones if feasible to work on.","state":"open"},"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/artemp/tickets2issues/issues/442","labels":[{"name":"Core_Library","url":"https://api.github.com/repos/artemp/tickets2issues/labels/Core_Library","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1876314,"comment_id":2364010}}