Cool article, explains how you can do anything using Python, although doesn't mention Mapnik. However, for most people, these days I would recommend to try TileMill (https://www.mapbox.com/tilemill/) to make a map. The CartoCSS can let you style anything based on attributes and it also lets you add and style raster data.
Can you draw brightly colored lines on roads for a bus map? I like to mess around analyzing bus routes, but so far I haven't been able to find a computer-based tool for drawing them effectively.
I would probably draw in QuantumGIS and export as shapefile. There are many many ways to draw or otherwise generate spatial data. I think it depends on what you mean by 'effectively'?
Edit: Ok, I just re-thought your comment, and perhaps you mean to 'highlight' the existing road paths if they are also bus-routes. That would be trivial if your roads lines have attribute "bus_route". You can also add the attribute, then in QGIS you can select such paths, edit them and set the attribute as 'true', in TileMill you would then add a style to change color for lines with such attribute. Also, if the streets have names and you have a list of such streets, you can do a CartoCSS selection based on the street names attribute.
This is trivial - assign a value to an attribute for all segments that are part of a bus route, then style accordingly (preferably in a gis, the approach in the op is a cumbersome roundabout way)
Also, I just realized, if the bus routes are not in the OSM, he could use the new iD editor and add the bus routes to OSM under his account, and then export :)
be aware though that it is tile based and that comes with a price. for example you cannot have huge labels. also the dependency on many node.js packages can be annoying.
That looks pretty interesting. I'll have to show my dad this stuff - he's a cartographer that specializes in Adobe Illustrator and makes large print maps. He's been looking at easy ways to transition to the web while maintaining high visual customization.
My biggest problem with maps these days is the data license for commercial use. I dont need very detailed map, usually administrative level 2, but it's hard to find accurate sources that dont make you pay thousands of dollars per small userbase. We create our own app and distribute it, therefore cannot exactly estimate our userbase. Does anybody know of a decent source with good, fairly detailed world maps and liberal license ? Doesn't have to be free.
Natural Earth data [0] is public domain. Their terms of use state "No permission is needed to use Natural Earth. Crediting the authors is unnecessary." But I think they only have down to admin level 1.
The freely available dumps to SHP are not up -to-date or have insufficient details and my several efforts to produce an SHP myself have failed. I'd like to be able to produce a shp dump that contains only selected "layer" for given country.
I think OGR (gdal.org) has an OSM driver that you can install optionally to go from OSM -> SHP. Problem is that SHP and OSM are not 100% compatible formats, so data massaging may be necessary in many cases.
Also, Geofabrik.de will export it for you for a fee.
I tried QGis 2 with built-in OSM support but I was unable to properly download data through it. Perhaps I was doing something wrong, I'd love to read a good tutorial on this. If you happen to find one, let me know!
It's been a while since I played with OSM data. OGR 1.10.0 supports OSM, and you can grab it from various sources (gdal.org or gisinternals.com/sdk/ if you want latest windows binaries).
Converting OSM -> SHP should be relatively similar to other formats, and there are a good number of tutorials out there for using OGR. Here's their page on OSM: http://www.gdal.org/ogr/drv_osm.html
What kind of data are you looking for? Many governments provide data for their own country, with differing licenses (the Canadian ones I've used are commercial-friendly). There are a good number of open GIS data initiatives around the world, that you should be able to find exactly what you're looking for.
You can also check the data that ESRI provides, as some is free, and other is paid.
In our company we use python to make maps, but we go with the traditional GIS approach, dependencies?: postgis and mapnik.
The first two examples would be solved by a single postgis query, the last one maybe would require some extra work. But nice work anyway, bookmarked.
Surprised to see that they're using basemap instead of cartopy. There's nothing wrong with using basemap, but it can be a bit clunky, i.m.o.
Then again, cartopy is only a year or two old, so it doesn't have the traction that basemap does. It's gained a fairly large following very quickly, though.
In modern parlance, cartography is more about information design. For example, what features appear at what zoom level on Google Maps? What color is an interstate?
That has nothing to do with cartography. That's geology.
Geology often uses cartography to display data and various spatial analysis methods to analyze data, but what you're describing is purely geology.
Sorry if I sound snippy... But as a geologist, we get a bit annoyed when one of the major discoveries of our field is attributed to "those darn geographers"! :)
Very cool, article. I've always loved maps and mapping and python is my preferred language. The only thing I would mention is that it would be nice to have a pic of the results earlier in the article, that's just from the "let's look at this article, seems cool but what exactly is he teaching me" angle. I'm more likely to try the code if I can see the results up front. Otherwise it was a really cool example.
Very interesting, it had never occurred to me that there were probably python libraries for mapping. My ArcMap license expires in less than two weeks, perhaps I will give this a shot before I re-up.