Category: Information

How to extract highways and subway lines from OpenStreetMap as a shapefile

It’s possible to use Overpass Turbo to extract any object from the OpenStreetMap “planet” and convert it from a GeoJSON or KML file to a shapefile for manipulation and analysis in GIS.

Say you want the subway lines for Mexico City, and you can’t find a GTFS file that you could convert to shapefile, and you can’t find the right files on Sistema de Transporte Colectivo’s website (I didn’t look for it).

Here’s how to extract the subway lines that are shown in OpenStreetMap and save them as a GIS shapefile.

This is my second tutorial to describe using Overpass Turbo. The first extracted places of worship in Cook County. I’ve also used Overpass Turbo to extract a map of campgrounds

Extract free and open source data from OpenStreetMap

  1. Open the Overpass Turbo website and, on the map, search for the city from which you want to extract data. (The Overpass query will be generated in such a way that it’ll only search for data in the current map view.)
  2. Click the “Wizard” button in the top toolbar. (Alternatively you can copy the code below and paste it into the text area on the website and click the “Run” button.)
  3. In the Wizard dialog box, type in “railway=subway” in order to find metro, subway, or rapid transit lines. (If you want to download interstate highways, or what they call motorways in the UK, use “highway=motorway“.) Then click the “build and run query” button.
  4. In a few seconds you’ll see lines and dots (representing the metro or subway stations) on the map, and a new query in the text area. Notice that the query has looked for three kinds of objects: node (points/stations), way (the subway tracks), relation (the subway routes).
  5. If you don’t want a particular kind of object, then delete its line from the query and click the “Run” button. (You probably don’t want relation if you’re just needing GIS data for mapping purposes, and because routes are not always well-defined by OpenStreetMap contributors.)
  6. Download the data by clicking the “Export” button. Choose from one of the first three options (GeoJSON, GPX, KML). If you’re going to use a desktop GIS software, or place this data in a web map (like Leaflet), then choose GeoJSON. Now, depending on what browser you’re using, a couple things could happen after you click on GeoJSON. If you’re using Chrome then clicking it will download a file. If you’re using Safari then clicking it will open a new tab and put the GeoJSON text in there. Copy and paste this text into TextEdit and save the file as “mexico_city_subway.geojson”.
Overpass Turbo screenshot 1 of 2

Screenshot 1: After searching for the city for which you want to extract data (Mexico City in this case), click the “Wizard” button and type “railway=subway” and click run.

Overpass Turbo screenshot 2

Screenshot 2: After building and running the query from the Wizard you’ll see subway lines and stations.

Overpass Turbo screenshot 3

Screenshot 3: Click the Export button and click GeoJSON. In Chrome, a file will download. In Safari, a new tab with the GeoJSON text will open (copy and paste this into TextEdit and save it as “mexico_city_subway.geojson”).

Convert the free and open source data into a shapefile

  1. After you’ve downloaded (via Chrome) or re-saved (Safari) a GeoJSON file of subway data from OpenStreetMap, open QGIS, the free and open source GIS desktop application for Linux, Windows, and Mac.
  2. In QGIS, add the GeoJSON file to the table of contents by either dragging the file in from the Finder (Mac) or Explorer (Windows), or by clicking File>Open and browsing and selecting the file.
  3. Convert it to GeoJSON by right-clicking on the layer in the table of contents and clicking “Save As…”
  4. In the “Save As…” dialog box choose “ESRI Shapefile” from the dropdown menu. Then click “Browse” to find a place to save this file, check “Add saved file to map”, and click the “OK” button.
  5. A new layer will appear in your table of contents. In the map this new layer will be layered directly above your GeoJSON data.
Overpass Turbo screenshot 4

Screenshot 4: The GeoJSON file exported from Overpass Turbo has now been loaded into the QGIS table of contents.

Overpass Turbo screenshot 5

Screenshot 5: In QGIS, right-click the layer, select “Save As…” and set the dialog box to have these settings before clicking OK.

Query for finding subways in your current Overpass Turbo map view

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“railway=subway”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “railway=subway”
node["railway"="subway"]({{bbox}});
way["railway"="subway"]({{bbox}});
relation["railway"="subway"]({{bbox}});
/*relation is for "routes", which are not always
well-defined, so I would ignore it*/
);
// print results
out body;
>;
out skel qt;

I grew up in the suburbs and it shows in early drawings

Vanceville 3 of 13

This panel has the light rail station next to an office complex that had the United Airlines headquarters and the office for “Steve Vance Enterprises – Western Region”.

I lived in suburbs until I was 22. The suburbs of Houston, of San Francisco, and of Chicago.

And from when I was 11 years old to about 15 years old I drew a municipality called “Vanceville” (and “Vancin” at one point) on 13 adjoining panels, each a standard size grade school poster. I started in fifth grade, within a couple of months of moving to Batavia, Illinois.

The first panel was drawn on the backside of a poster that displayed my study for class that counted cars on my street categorized by their manufacturer.

The suburban pattern of development was all I knew – and it really shows. I didn’t make it into the respective city centers that often, and when I did it was mostly by car. I think I drew the ultimate suburb of NIMBYs.

I don’t support this kind of development. Back then I thought I was designing the best city. I had no idea that what I was drawing wasn’t a sustainable way to develop places where people live.

You can see how four panels adjoin.

You can see how four panels adjoin.

I mean, just look at all the massive parking lots I drew. I seriously thought that that was how cities should be designed. I didn’t know that they paved over natural areas and caused dirty water to run off into the river I drew.

There are no multi-unit buildings. In fact, each single-family house is built on a huge lot. I gave each house a big garage, writing explicitly “2 + 1” and “2 + 1/2”.

I drew townhomes, a denser housing style than single-family, because I had a few friends who lived in them. This panel has my house in the lower-left corner.

Sidewalks are rare, but they become more prevalent in later design phases. You can forget bike lanes, but you may be lucky and find a bike path, again, in a later design phase. Those phases are also distinguished by smoother lines, fewer stray markings, and a lighter touch of the pencil.

People have to drive to the parks. Strip malls abound. Many of the shops are named for real businesses in Batavia.

Oh, wait, I drew in light rail tracks and stations. But I didn’t draw them because I knew or thought transit was a good thing. None of the places I lived had it. I drew the light rail because I loved trains.

Vanceville was so oriented to driving that some of the road lanes had “ATM” imprinted where a right-turn arrow would be, to signify that there was an upcoming turn off for a bank drive-through, with two lanes that had only ATMs. Even “Steve Vance Enterprises – Western Region” was connected to a 5-level car park.

There are just so many roads. I drew what appear to be interchanges between two “connector” roads within a residential neighborhood! That same panel seems to have as much asphalt as any other surface, be it developed or grass or water.

I’m not surprised this is the kind of city I drew.

If I still drew, the outcome would be completely different. It would probably look like a mix of Rotterdam, Madrid, and Houten.

What else do you see in the drawings? View the full album.

Vanceville 5 of 13

I drew these at a time when I was also obsessed with spy stories, which explains the CIA building.

Which places in Chicago get the most building permits?

View from the CTA green roof

The Merchandise Mart in the Near North Side community area ranks second place in locations receiving the most building permits.

Ed. note: I changed the title of this blog post because one interpretation of the original, “Where are the most building permits issued in Chicago?”, has the answer “City Hall”, the location of the issuer. My bad. 

Without regard to type or construction cost, the most building permits in the City of Chicago are issued at 11601 W Touhy Ave.

Where is that? It depends on which geocoder you use.

Two buildings at 11601 W Touhy Ave from Google Street View. The City of Chicago has issued thousands of building permits to this address, but the work is actually distributed across the O'Hare airport grounds. Google Maps and the Cook County parcel map places these buildings in Des Plaines.

Two buildings at 11601 W Touhy Ave from Google Street View. The City of Chicago has issued thousands of building permits to this address, but the work is actually distributed across the O’Hare airport grounds. Google Maps and the Cook County parcel map places these buildings in Des Plaines.

Google Maps puts it on this building that’s on a street called “Upper Express Drive” and in the city of Des Plaines, Illinois. But the City of Chicago wouldn’t issue building permits in another city.

Our own geocoder converts the geographic coordinates given in the city’s building permits database for these permits to the address “399 E Touhy Ave, Des Plaines, IL”. The Cook County parcel for the same location has the address “385 E Touhy Ave, Des Plaines, IL”.

Now where is this building?

It’s at O’Hare airport, and it’s one of a handful of addresses* the city’s buildings departments uses to denote permits issued to work at O’Hare. Since 2006 to Saturday, December 12, 2015, there’ve been 2,403 building permits issued here. The permits’ work descriptions indicate that a lot of the work occurs elsewhere on the airport grounds.

13 buildings have had more than 400 permits issued since 2006 to yesterday.

address community area count
11601 W Touhy Ave O’Hare

2403

222 W Merchandise Mart Plz Near North Side

802

141 W Jackson Blvd Loop

538

233 S Wacker Dr Loop

518

2301 S Lake Shore Dr Near South Side

516

30 S Wacker Dr Loop

510

5700 S Cicero Ave Garfield Ridge

495

500 W Madison St Near West Side

482

227 W Monroe St Loop

422

55 E Monroe St Loop

421

875 N Michigan Ave Near North Side

408

151 E Wacker Dr Loop

407

350 N Orleans St Near North Side

401

A pattern emerges: 10 of these 13 buildings are in the Central Business District and the other three are O’Hare airport, McCormick Place (2301 S Lake Shore Drive), and Midway airport (5700 S Cicero Ave).

The first location that’s outside the Central Business District and not one of the city’s airport or its convention center is at 1060 W Addison St – better known as Wrigley Field – in the Lake View community area with 321 building permits issued. It ranks #30. If you keep running down the list, the next most frequently issued location is 7601 S Cicero Ave – that’s the Ford City Mall and I think the city’s only sprawl-style indoor mall. It ranks #39 because it pulls monthly electric maintenance permits.

The Merchandise Mart’s position at #2 is notable because the majority of its permits are for small amounts of work: there is a lot of electrical rewiring done because of the frequent shows and exhibitions in the interior design materials “mall”.

The Mart sees other activity, though, including multi-million renovations for technology companies like Motorola Mobility and Braintree. The Mart also received a permit this year for a new $3 million staircase construction, part of its building-wide renovation project.

Rendering of new main (south) lobby staircase at the Merchandise Mart

This rendering shows a new grand staircase that will be built in the Merchandise Mart’s south lobby jutting from the side of the lobby that’s between the doors on the Chicago River side, and the reception desk and central elevator bank. A building permit issued this fall puts the construction cost at $3 million.

If you want to know more about building trends in Chicago, send me a message through the Chicago Cityscape website and I can put together a custom report for you.

* Other addresses I’ve noticed are:

  • 10000 N Bessie Coleman Dr
  • 10000 W Ohare St
  • 11600 W Touhy Ave
  • 11555 W Touhy Ave

Of these only the two Touhy Ave addresses are logical: O’Hare Street isn’t a real road, and 10000 N Bessie Coleman Dr is much further north than the northernmost point in Chicago.

How to use Chicago Cityscape’s upgraded names search tool

Search for names of people who do business in Chicago.

I created a combined dataset of over 2 million names, including contractors, architects, business names, and business owners and their shareholders, from Chicago’s open data portal, and property owners/managers from the property tax database. It’s one of three new features published in the last couple of weeks.

Type a person or company name in the search bar and press “search”. In less than 1 second you’ll get results and a hint as to what kind of records we have.

What should you search?

Take any news article about a Chicago kinda situation, like this recent Chicago Sun-Times article about the city using $8 million in taxpayer-provided TIF district money to move the Harriet Rees house one block. The move made way for a taxpayer-funded property acquisition on which the DePaul/McCormick Place stadium will be built.

The CST is making the point that something about the house’s sale and movement is sketchy (although I don’t know if they showed that anything illegal happened).

There’re a lot of names in the article, but here are some of the ones we can find info about in Chicago Cityscape.

Salvatore Martorina – an architect & building permit expeditor, although this name is connected to a lot of other names on the business licenses section of Cityscape

Oscar Tatosian – rug company owner, who owned the vacant lot to which the Rees house was moved

Bulley & Andrews – construction company which moved the house

There were no records for the one attorney and two law firms mentioned.

A century old former radium extraction site in Bronzeville gets building permit

Map of the Carnotite Reduction Company site near Bronzeville

The Carnotite Reduction Company site near Bronzeville. Map: OpenStreetMap

A recently-issued building permit on 26th Street just east of King Drive in the Prairie Shores neighborhood of the Near South Side community area (near Bronzeville) caught my eye.

Installation of temporary wood poles and aerial cable, to powering air monitors, for the Carnotite Reduction Company site project

Carnotite wasn’t a word I’ve heard before, and “Carnotite Reduction Company” isn’t a business I’ve heard of before, either.

I searched Bing and found that 4 of the 5 results were about cleaning up a contaminated site, and one of the results was a letter in PDF form hosted on the Centers for Disease Control and Prevention website prepared by a scientist at the Illinois Department of Public Health.

The letter is 11 pages long and tells the story about Carnotite Reduction Company, which had a factory in 1915 on what’s now known as the Michael Reese Hospital site, the buildings of which have all been demolished.

The Carnotite Co. mainly produced radium, along with some uranium and vanadium as byproducts.

The Carnotite Co. owned and operated mines in Colorado and Utah. In 1919, it was one of four companies that mined 95% of the carnotite ore produced in Colorado. The U.S. dominated the world radium market until 1922, when Belgium began using pitchblende ore from the Belgian Congo. The pitchblende was 40 to 100 times more pure than carnotite, and by 1923, Belgian competition ended carnotite ore processing in the U.S.

This article from the “Chicago Chemical Bulletin” publication in 1917 linked on the United States Environmental Protection Agency’s website about the cleanup project describes carnotite ore and mining process. They’ve cataloged this site as EPA ID# ILN000510371.

Chicago Chemical Bulletin: 1917 article about the Carnotite Reduction Company

The letter describes where radioactive, contaminated soil was found during boring tests made within the last three years, and how it potentially got there. The factory was extracting radium there, for an exploding cancer research trend, until 1920.

The company, the EPA believes, may have disposed its waste into public infrastructure.

The US Environmental Protection Agency (USEPA) suspects that the Carnotite Co. may have sent this liquid waste into the sewer, floor drains, or reintroduced it into the process for further refining. Because streets in the area, including Inglehart Court, were abandoned during the redevelopment in the 1950s and 1960s, sewers running along those abandoned streets likely also were abandoned. Other options for liquid waste disposal commonly used at the time included streams or ditches (with Lake Michigan in the vicinity), waste ponds, dug wells, and dumping wastes on porous ground (such as the sand on-site).

When the City of Chicago was preparing the site in 2009 for a potential Olympic Village for its 2016 Olympic Games bid – buying the property for an insane amount of cash and then razing it all, while eventually losing the bid to Rio de Janeiro – conducted “Phase I and Phase II environmental investigations” but didn’t survey for radiological contamination and didn’t uncover an important survey from 30 years prior.

The Illinois Department of Public Health found radioactive contamination after a “radiological surface survey” of the Michael Reese hospital site in 1979.

The IDPH Division of Radiological Health concluded that the contamination did not pose an immediate health threat, but should be taken into account before any future construction. In 1979, IDPH did not notify USEPA about the contamination they found.

The Illinois Emergency Management Agency surveyed the site in August 2009 and found the contamination, alerted the EPA, and met with the City of Chicago to discuss remediation.

The letter details further testing by AECOM, a global transportation, infrastructure, and engineering company, the levels of contamination, and risk assessment. It appears that the contamination won’t be a danger to most people.

The Illinois Department of Public Health concludes that exposure at the Carnotite Co. site to the area with the greatest surface radium and uranium concentration for 20 minutes per day, five days per week, 250 days per week, for 50 years is not expected to harm people’s health. IDPH considers this to be a maximum likely exposure scenario, given current conditions at the site.

It notes that a change in land use – the site is currently occupied by vacant hardscape, tennis courts, a park, sidewalks, and grassy areas – “could increase exposure duration”, especially if housing was built here.

The City of Chicago applied for a license in 2013 to temporarily store radioactive material on site before shipping it to a disposal facility. The EPA last updated its website in April 2014 to say that it was considering this application.