{"id":394,"date":"2016-09-13T16:37:29","date_gmt":"2016-09-13T16:37:29","guid":{"rendered":"http:\/\/blog.fellstat.com\/?p=394"},"modified":"2016-09-13T16:37:29","modified_gmt":"2016-09-13T16:37:29","slug":"new-version-of-the-openstreetmap-r-pacakge","status":"publish","type":"post","link":"https:\/\/blog.fellstat.com\/?p=394","title":{"rendered":"New Version of the OpenStreetMap R Pacakge"},"content":{"rendered":"<p>A new version of the OpenStreetMap package has been released to CRAN. OpenStreetMap 0.3.3\u00a0contains several minor improvements. I&#8217;ve removed the CloudMade tile set types, as they seem to have gone out of business. MapQuest has also been removed as they have moved to a new API. The mapbox type has been updated to use their new API.<\/p>\n<p>The most important update is the ability to use custom <a href=\"http:\/\/wiki.osgeo.org\/wiki\/Tile_Map_Service_Specification\">tile servers<\/a>. Suppose you have a server using the\u00a0tile map service specification with access urls\u00a0looking something like<\/p>\n<p>http:\/\/api.someplace.com\/{z}\/{x}\/{y}.png*<\/p>\n<p>where {z} is the map&#8217;s integer zoom level, {x} is the tile&#8217;s integer x position and {y} is the tile&#8217;s integer y position. You may pass this url into openmap&#8217;s type argument to obtain a map using this tileset.<\/p>\n<p>For example, if you need to access MapQuest&#8217;s tilesets, which now require a developer API key, you can use the new custom tileserver facility to access them. Below is an example with my (free) API key.<\/p>\n<p>&nbsp;<\/p>\n<pre>ul &lt;- c(40.9,-74.5)\nlr &lt;- c(40.1,-73.2)\npar(mfrow=c(2,3))\nurl &lt;- \"https:\/\/a.tiles.mapbox.com\/v4\/mapquest.streets-mb\/{z}\/{x}\/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg\"\nmap &lt;- openmap(ul,lr,minNumTiles=4, type=url)\nplot(map)\n\n\nurl &lt;- \"https:\/\/a.tiles.mapbox.com\/v4\/mapquest.satellitenolabels\/{z}\/{x}\/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg\"\nmap &lt;- openmap(ul,lr,minNumTiles=4, type=url)\nplot(map)\n\n\nurl &lt;- \"https:\/\/a.tiles.mapbox.com\/v4\/mapquest.satellite\/{z}\/{x}\/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg\"\nmap &lt;- openmap(ul,lr,minNumTiles=4, type=url)\nplot(map)\n\nurl &lt;- \"https:\/\/a.tiles.mapbox.com\/v4\/mapquest.dark\/{z}\/{x}\/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg\"\nmap &lt;- openmap(ul,lr,minNumTiles=4, type=url)\nplot(map)\n\nurl &lt;- \"https:\/\/a.tiles.mapbox.com\/v4\/mapquest.light\/{z}\/{x}\/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg\"\nmap &lt;- openmap(ul,lr,minNumTiles=4, type=url)\nplot(map)<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/blog.fellstat.com\/wp-content\/uploads\/2016\/09\/tmp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-396\" src=\"http:\/\/blog.fellstat.com\/wp-content\/uploads\/2016\/09\/tmp.png\" alt=\"tmp\" width=\"800\" height=\"800\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A new version of the OpenStreetMap package has been released to CRAN. OpenStreetMap 0.3.3\u00a0contains several minor improvements. I&#8217;ve removed the CloudMade tile set types, as they seem to have gone out of business. MapQuest has also been removed as they have moved to a new API. The mapbox type has been updated to use their [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6,9],"tags":[],"class_list":["post-394","post","type-post","status-publish","format-standard","hentry","category-openstreetmap","category-r","category-spatial"],"_links":{"self":[{"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=\/wp\/v2\/posts\/394","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=394"}],"version-history":[{"count":0,"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=\/wp\/v2\/posts\/394\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fellstat.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}