503 stories

OpenStreetMap alternatives to Google’s Maps Engine and Fusion Tables


Often we just want to produce a simple map showing data as a collection of pins (map markers). In this post we look at two tools that both use OpenStreetMap base maps; namely geojson.io and uMap. These are both potential alternatives to Google Maps Engine and Fusion Tables. 

OpenStreetMap has come a long way in the last 10 years; we’ve reached 1.7 million registered users, over 300,000 of whom are the last editor an an object in OpenStreetMap, and we’ve contributed over 2.4 billion nodes (points) and 248 million ways (linear features). This has led to OpenStreetMap being deployed by large companies such as Apple, Mapquest and Foursquare, and relief organisations such as Médecins Sans Frontières.

However when it comes to individuals – including those who associate themselves with the Open Source or Open Data communities – many people stick with what they know. More often that not that’s Google. OpenStreetMap is quite different; as it’s not a traditional company, most of the interesting stuff is going on outside of the core openstreetmap.org website. Let’s look at two online tools that use OpenStreetMap for the base map display.


Geojson.io describes itself as “a quick, simple tool for creating, viewing, and sharing map”. It has a strong focus on input/output (io) as it supports major formats such GeoJSON, KML, GPX, CSV, TopoJSON, amongst other formats listed on the OpenStreetMap wiki. The inputs can be from a file, from a GitHub (including Gist snippets) or added manually via the website’s user interface. The final map can be exported to file, to GitHub or shared as an embeddable iframe or as a standalone URL. Visual customisation is limited to a choice of three map backgrounds.


In this example I have a geojson file of pubs in and around Stratford-upon-Avon. All the data is as points (nodes) and I want to produce a simple map to display in this blog post. Using geojson.io the steps are:

  1. Go to geojson.io.
  2. Click Open and load the source file. The map data can then be edited in the right hand pane (I used the table edit to drop some columns)
  3. Pick a map background from the choice of Mapbox, Satellite and default OSM from the options in the bottom left.
  4. Click Share and copy and paste the embeddable iframe.

Here is the result:

Quick, simple and effective.


Similar to geojson.io above, uMap describes itself as a way to “create maps with OpenStreetMap layers in a minute and embed them in your site”. It supports a number of import formats including geojson, csv, kml and also allows you to draw content directly on the map. On the export side, you can download the map data in three different file formats, or share it via an embeddable iframe or stand alone URL. Unlike geojson.io, uMap has numerous customisation options, for example you can pick from 16 map backgrounds, map data can be styled with a colour, fill opacity and line type, and the popup content can be adjusted to display additional information such as images and web links. uMap also enables you to easily work collaboratively on a map. This flexibility does however make the user interface more complicated than geojson.io’s.


This example uses a file of school locations in and around Lichfield. Most of the data is stored as polygons, however it also include point data. As before the aim is to produce a simple map to display in this blog post. Using uMap the steps are:

  1. Go to umap.openstreetmap.fr or one of the alternate instances listed here.
  2. Click Create a map.
  3. Click Import data (the up arrow icon on the right or keyboard shortcut Ctrl+I).
  4. Customise using the options on the right. Here I’ve changed the map background to MapQuest Open.
  5. Click More on the left hand side, followed by Embed and share this map.
  6. Copy and paste the embeddable iframe (I also had to click Current view instead of deafult map view in the iframe options box.

Here’s the result from uMap:

Advanced, customisable, and featureful.

Tell us what you think

Have a go and let us know what you think. How do they compare with what is available from Google or others, and what would make them better. Drop us a line in the comment box below or via our twitter account, @mappamercia.

Read the whole story
Share this story

Identify USB Driver on Linux.

1 Share
This guide shows how you can identify USB Driver Chipset(most commonly Wireless) Information on Linux. Often users troll different forums and blogs to find out they can identify which driver their PCI or USB device is using. This guide applies to all possible scenarios and any Linux OS namely Ubuntu, Debian, Mint, CentOS, Fedora etc.
Read the whole story
Share this story

Ubuntu and SNMP

1 Share

After running Ubuntu for about two years now, I have a laundry list of complaints. Whether Ubuntu is automagically starting daemons that I install, or the relative difficulty of running an internal repo, or (and I'm heartily agreeing with my coworker Nick here) that it doesn't actually include a firewall out of the box....there are very basic issues I have with running and managing Ubuntu machines.

The one that inspired this entry, though, is like, super dumb and annoying.

Suppose I'm trying to do something like snmpwalk on a switch:

$ snmpwalk -v 2c -c public myswitch.mydomain
-bash: /usr/bin/snmpwalk: No such file or directory

Of course, I need snmp. Lets install that:

~$ sudo apt-get install snmp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libperl5.18 libsensors4 libsnmp-base libsnmp30
Suggested packages:
lm-sensors snmp-mibs-downloader
The following NEW packages will be installed:
libperl5.18 libsensors4 libsnmp-base libsnmp30 snmp
0 upgraded, 5 newly installed, 0 to remove and 36 not upgraded.
Need to get 1,168 kB of archives.
After this operation, 4,674 kB of additional disk space will be used.

and try it again:

$ snmpwalk -v 2c -c public myswitch.mydomain
iso. = STRING: "Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 6.0(2)N2(3), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version 6.2(1), Compiled 12/17/2013 2:00:00"
iso. = OID: iso.
iso. = Timeticks: (575495258) 66 days, 14:35:52.58
iso. = STRING: "me@here"
iso. = STRING: "myswitch"
iso. = STRING: "snmplocation"
iso. = INTEGER: 70
iso. = Timeticks: (4294966977) 497 days, 2:27:49.77
iso. = OID: iso.
iso. = OID: iso.
iso. = OID: iso.

Well, we're close, but all we have are a bunch of OIDs. I'd really like names. If you've read my introduction to SNMP, you know that it's not loading the MIBs. Weird. On RHEL/CentOS, that's kind of automatic. Maybe there's another package?

Well, that snmp-mibs-downloader that was listed as a suggested package above sounds pretty promising. Lets install that.

$ sudo apt-get install snmp-mibs-downloader
...snip lots of installing MIBS...

So basically, 300+ MIBs were just installed into /var/lib/mibs/ - this is awesome. Lets run that command again:

$ snmpwalk -v 2c -c public myswitch.mydomain
iso. = STRING: "Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 6.0(2)N2(3), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version 6.2(1), Compiled 12/17/2013 2:00:00"
iso. = OID: iso.
iso. = Timeticks: (575577418) 66 days, 14:49:34.18
iso. = STRING: "me@here"
iso. = STRING: "myswitch"
iso. = STRING: "snmplocation"
iso. = INTEGER: 70
iso. = Timeticks: (4294966977) 497 days, 2:27:49.77
iso. = OID: iso.
iso. = OID: iso.
iso. = OID: iso.

That's strange. As it turns out, though, Ubuntu has yet another trick up its sleeve to screw with you. Check out /etc/snmp/snmp.conf:

msimmons@nagios:/var/log$ cat /etc/snmp/snmp.conf
# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loaging them by commenting out the following line.
mibs :

This file's entire purpose in life is to stop you from having MIBs out of the box.

Obviously, you can comment out that line and then things work:

$ snmpwalk -v 2c -c public myswitch.mydomain
SNMPv2-MIB::sysDescr.0 = STRING: Cisco NX-OS(tm) n5000, Software (n5000-uk9), Version 6.0(2)N2(3), RELEASE SOFTWARE Copyright (c) 2002-2012 by Cisco Systems, Inc. Device Manager Version 6.2(1), Compiled 12/17/2013 2:00:00
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (575602144) 66 days, 14:53:41.44
SNMPv2-MIB::sysContact.0 = STRING: me@here
SNMPv2-MIB::sysName.0 = STRING: myswitch
SNMPv2-MIB::sysLocation.0 = STRING: snmplocation
SNMPv2-MIB::sysServices.0 = INTEGER: 70
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (4294966977) 497 days, 2:27:49.77
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.5 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (4294966977) 497 days, 2:27:49.77
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (4294966977) 497 days, 2:27:49.77

But...if you're not actually running an snmp server, and you just want to use snmp for querying...if you get rid of that file entirely, it ALSO fixes the problem.

Anyway, just another annoying thing I've found that I thought I'd share.

Read the whole story
Share this story

Merge could be the ultimate bike for NY commuters

1 Comment and 2 Shares

More and more people are considering taking their bike to work, whether it’s due to concern over their car’s impact on the environment, a need to save money, or to simply keep fit. To cater for this influx of commuting cyclists, we’ve already seen Parker Dusseau create a business suit that keeps riders sweat free on their way to the office. Now design studio Pensa has developed Merge, which comes with an array of features that make it perfect for big city cycling.

Merge is the result of Oregon Manifest‘s Bike Design Project, which challenged designers from New York City, Chicago, San Francisco, Seattle, and Portland to create a bike that would attract more people to cycle commuting. Pensa worked with Horse Cycles to create a bike especially for NYC, valuing storage facilities and lightweight design. The bike frame itself includes built-in bungee cords and an extendable rack that can be pulled out and repacked at any time. A braided steel cable is also tucked into the frame and can be used for extra security when locking up. Embedded bike lights run off a dynamo connected to the bike’s wheels, meaning riders don’t need to constantly replace the batteries or take off their lights when locking up. The dynamo also features a USB charger that can power riders’ phones while they cycle. At the same time, its light frame makes it easy to carry up city steps and apartment stairs.

Watch the video below to see the bike in action:

Although Merge didn’t win the Oregon Manifest competition, the bike could still make it onto the streets of NYC. Are there other ways to make bikes more city-friendly to encourage commuters to cycle?

Website: www.pensanyc.com
Contact: www.pensanyc.com/where_we_are.cfm

Read the whole story
15 days ago
Cluj-Napoca, România
14 days ago
And flat bars. Ugh.
Share this story

Spoon: They Want My Soul

1 Share

All these soulsuckers, they're among us. They're stealing our privacy, our convictions, the very essence of our being, and leaving behind little more than a "for sale" sign and some vague, constant hollowness. In music, a dwindling whirlpool of funds only spurs on these parasites as they scavenge for scraps of humanity wherever ears can hear. Their thirst is real. And artists—those blasphemous and holy conduits for truth, liberty, and whatever else is missing from our lives—can't help but succumb. To last more than 20 years in rock'n'roll without sacrificing a lethal amount of one's soul requires a certain vigilance; to navigate around the pitfalls of both punk and ambition without tripping-up on either can seem just as hard as making a great album. But Spoon, one of the most stand-up bands of their generation, have figured all of this out. On their eighth album, they laugh in the face of leeches, defy gravity, suspend time. "All they want's my soul, yes, yes, I know!" hollers Britt Daniel, stretching every crevice of his 43-year-old throat. His message is clear: They can't have it.

Spoon's soul is theirs alone. It's not James Brown's soul, and though Daniel was raised Christian in conservative small-town Texas, it's not God's soul, either. It's not exactly classic rock, not quite post-punk. It's not the soul of indie idealists blindly conflating modesty and virtue. Instead, this band is about capturing the unknown—those "finer feelings," as Daniel once put it—and simply letting it float. Many of their songs are meticulously crafted, but they also breathe and break with crackling spontaneity. Theirs is an in-between soul happily seeking limbo as its own destination. It's manly in an old-fashioned way, but still scuffed-up and vulnerable. It's allergic to empty sentiment. It's smart but not eggheaded, tough but not dumb. It's Costello, Lennon, Can, and the Cure. It's all-knowing and hopelessly fallible, mysterious with a purpose. It's going to be crushed by life and love, and it's going to endure. 

They Want My Soul is the quintet's most booming LP, eons ahead of their Pixies-worshipping beginnings and a far cry from the relatively small-scale charm of their early-2000s touchstones Girls Can Tell and Kill the Moonlight, as well as their self-consciously lo-fi 2010 record, Transference. The album sounds like a proper follow-up to Ga Ga Ga Ga Ga, the clear-eyed 2007 LP where everything clicked into place and a restless band finally hammered themselves into stone. Some of the new record's sonic forthrightness comes courtesy of two indie-hit-making producers new to Spoon's world: über-pro Joe Chiccarelli, who's worked with everyone from Frank Zappa to the Shins to Jazon Mraz over the last 35 years, and psychedelic guru Dave Fridmann, who's helped turn unapologetic weirdos Flaming Lips and MGMT into festival headliners. Spoon, who also co-produced every song on the album, lie somewhere between those two poles—pop and outré—and the triangulations happening throughout They Want My Soul flow out unencumbered. These songs rip and burst and  just go.

As guitar rock continues its slow and inevitable transition into a bygone art, They Want My Soul pulls at familiar threads, fraying things to make them seem now, if not new. There's an inherent nostalgia in the kind of alchemy Spoon are mixing up here, and the band is wise enough not to shy away from it. But instead of glowing in the light of good times past, They Want My Soul is constantly negotiating with the memories that make up our minds, trying to decide if they're traps or blessings. "Do You" plays it both ways, starting off with Daniel wistfully reminiscing about vomiting on a curb—"I was half out of a bag," he grins—before zooming out with a succinct world-weariness that comes from chronicling humanity's small giveaways for more than two decades: "You tiptoe for ages, but lose yourself/ Flippin' back pages, unbuckling belts." Daniel has talked about how he was a "mean and ornery" teenage outcast, and much of his subsequent years have been spent wearing-down that sharpness with empathy while trying to retain bits of its hard-nosed rigor. On the barrelling "Rainy Taxi", he has trouble living in the greys, describing an all-or-nothing romance he can't help but fall for. "When you stand beside me I feel something stronger than I ever could," he says with hope, before the ultimatum: "But if you leave you better run away for good." A happy ending is a boring ending.

And who wants an ending anyway? "Inside Out" finds submissive contentment amidst a drift that hints at eternity. "There's intense gravity in you," Daniel lilts, "I'm just your satellite." And then the track willingly enters that ether as koi-pond synths twinkle in the distance, its tranquility tempered by the fact that Spoon have never made a song quite this pretty before. So have Spoon gone soft? Have they been watered-down by commercially-minded collaborators? Have they crushed the DIY dream by leaving indie utopia label Merge? They Want My Soul makes such questions sound about as petty and irrelevant as the thousands of bands that have come and gone (or come, gone, and reunited) since Daniel and drummer Jim Eno started Spoon in the months just before Kurt Cobain's death. They didn't burn out. They're not fading away.

Read the whole story
Share this story

Iago Toral: A brief introduction to the Linux graphics stack

1 Share

This post attempts to be a brief and simple introduction to the Linux graphics stack, and as such, it has an introductory nature. I will focus on giving enough context to understand the role that Mesa and 3D drivers in general play in the stack and leave it to follow up posts to dive deeper into the guts of Mesa in general and the Intel DRI driver specifically.

A bit of history

In order to understand some of the particularities of the current graphics stack it is important to understand how it had to adapt to new challenges throughout the years.

You see, nowadays things are significantly more complex than they used to be, but in the early times there was only a single piece of software that had direct access to the graphics hardware: the X server. This approach made the graphics stack simpler because it didn’t need to synchronize access to the graphics hardware between multiple clients.

In these early days applications would do all their drawing indirectly, through the X server. By using Xlib they would send rendering commands over the X11 protocol that the X server would receive, process and translate to actual hardware commands on the other side of a socket. Notice that this “translation” is the job of a driver: it takes a bunch of hardware agnostic rendering commands as its input and translates them into hardware commands as expected by the targeted GPU.

Since the X server was the only piece of software that could talk to the graphics hardware by design, these drivers were written specifically for it, became modules of the X server itself and an integral part of its architecture. These userspace drivers are called DDX drivers in X server argot and their role in the graphics stack is to support 2D operations as exported by Xlib and required by the X server implementation.

DDX drivers in the X server (image via wikipedia)

In my Ubuntu system, for example, the DDX driver for my Intel GPU comes via the xserver-xorg-video-intel package and there are similar packages for other GPU vendors.

3D graphics

The above covers 2D graphics as that is what the X server used to be all about. However, the arrival of 3D graphics hardware changed the scenario significantly, as we will see now.

In Linux, 3D graphics is implemented via OpenGL, so people expected an implementation of this standard that would take advantage of the fancy new 3D hardware, that is, a hardware accelerated libGL.so. However, in a system where only the X server was allowed to access the graphics hardware we could not have a libGL.so that talked directly to the 3D hardware. Instead, the solution was to provide an implementation of OpenGL that would send OpenGL commands to the X server through an extension of the X11 protocol and let the X server translate these into actual hardware commands as it had been doing for 2D commands before.

We call this Indirect Rendering, since applications do not send rendering commands directly to the graphics hardware, and instead, render indirectly through the X server.

OpenGL with Indirect Rendering (image via wikipedia)

Unfortunately, developers would soon realize that this solution was not sufficient for intensive 3D applications, such as games, that required to render large amounts of 3D primitives while maintaining high frame rates. The problem was clear: wrapping OpenGL calls in the X11 protocol was not a valid solution.

In order to achieve good performance in 3D applications we needed these to access the hardware directly and that would require to rethink a large chunk of the graphics stack.

Enter Direct Rendering Infrastructure (DRI)

Direct Rendering Infrastructure is the new architecture that allows X clients to talk to the graphics hardware directly. Implementing DRI required changes to various parts of the graphics stack including the X server, the kernel and various client libraries.

Although the term DRI usually refers to the complete architecture, it is often also used to refer only to the specific part of it that involves the interaction of applications with the X server, so be aware of this dual meaning when you read about this stuff on the Internet.

Another important part of DRI is the Direct Rendering Manager (DRM). This is the kernel side of the DRI architecture. Here, the kernel handles sensitive aspects like hardware locking, access synchronization, video memory and more. DRM also provides userspace with an API that it can use to submit commands and data in a format that is adequate for modern GPUs, which effectively allows userspace to communicate with the graphics hardware.

Notice that many of these things have to be done specifically for the target hardware so there are different DRM drivers for each GPU. In my Ubuntu system the DRM module for my Intel GPU is provided via the libdrm-intel1:amd64 package.

OpenGL with Direct Rendering (image via wikipedia)

DRI/DRM provide the building blocks that enable userspace applications to access the graphics hardware directly in an efficient and safe manner, but in order to use OpenGL we need another piece of software that, using the infrastructure provided by DRI/DRM, implements the OpenGL API while respecting the X server requirements.

Enter Mesa

Mesa is a free software implementation of the OpenGL specification, and as such, it provides a libGL.so, which OpenGL based programs can use to output 3D graphics in Linux. Mesa can provide accelerated 3D graphics by taking advantage of the DRI architecture to gain direct access to the underlying graphics hardware in its implementation of the OpenGL API.

When our 3D application runs in an X11 environment it will output its graphics to a surface (window) allocated by the X server. Notice, however, that with DRI this will happen without intervention of the X server, so naturally there is some synchronization to do between the two, since the X server still owns the window Mesa is rendering to and is the one in charge of displaying its contents on the screen. This synchronization between the OpenGL application and the X server is part of DRI. Mesa’s implementation of GLX (the extension of the OpenGL specification that addresses the X11 platform) uses DRI to talk to the X server and accomplish this.

Mesa also has to use DRM for many things. Communication with the graphics hardware happens by sending commands (for example “draw a triangle”) and data (for example the vertex coordinates of the triangle, their color attributes, normals, etc). This process usually involves allocating a bunch of buffers in the graphics hardware where all these commands and data are copied so that the GPU can access them and do its work. This is enabled by the DRM driver, which is the one piece that takes care of managing video memory and which offers APIs to userspace (Mesa in this case) to do this for the specific target hardware. DRM is also required whenever we need to allocate and manage video memory in Mesa, so things like creating textures, uploading data to textures, allocating color, depth or stencil buffers, etc all require to use the DRM APIs for the target hardware.

OpenGL/Mesa in the context of 3D Linux games (image via wikipedia)

What’s next?

Hopefully I have managed to explain what is the role of Mesa in the Linux graphics stack and how it works together with the Direct Rendering Infrastructure to enable efficient 3D graphics via OpenGL. In the next post we will cover Mesa in more detail, we will see that it is actually a framework where multiple OpenGL drivers live together, including both hardware and software variants, we will also have a look at its directory structure and identify its main modules, introduce the Gallium framework and more.

Read the whole story
Share this story
Next Page of Stories