Page 68 of 170

Converting shapefiles to GeoJSON, and other format conversions

To develop the Chicago Bike Map app, I had a problem I thought would be simple to solve: load train lines into a Leaflet-powered map. I had the train lines stored as a polyline shapefile but Leaflet can only read the GeoJSON format or a string of geographic coordinates representing lines.

I eventually found a solution (I can’t remember how) and I need to share it with you. The converter can do more than ESRI shapefiles to GeoJSON. It can reproject the data in the conversion. It can convert from several formats to several other formats.

The site is called MyGeodata Converter. You upload a ZIP file of geographic files – .shp and its companion files (.prj, .dbf, .shx), .kml, and .gpx. Let’s take the Chicago Transit Authority train lines shapefile straight from the City of Chicago’s open data portal. It downloads as a zipped collection of a shapefile and its buddies and we can take this file straight to the Converter and upload it. The Converter will unzip it and read the data; it will even identify the projection system (for Chicago-based geographic data, its common to use NAD83 Illinois StatePlane East FIPS 1201 Feet (SRID 102671, the same as SRID 3435).

The Converter will convert to one of the following formats, with same or new projection; accepts SQL statements to extract a subset of data:

  • ESRI shapefile
  • GML
  • KML, KMZ
  • GeoJSON
  • Microstation DGN
  • MapInfo File
  • GPX
  • CSV

WorkCycles Fr8 fits on the CTA’s bus-bike rack!

If you ride a bike more than you use other transportation modes, and you visit online forums, then you probably know that the correct number of bikes is n+1. I got a new bike this year, but it was partly to replace the cargo carrying capabilities I lacked after selling my Yuba Mundo in the spring.

Two weekends ago I passed by the Chicago Transit Authority headquarters to test if my WorkCycles Fr8 could fit in the Sportworks VeloPorter 2 bus-bike rack the CTA uses on most buses (it’ll eventually replace the red ones). I don’t know if Pace buses have the same model.

It fits! (I feel like saying “It blends!”)

I already knew that the WorkCycles Transportfiets would fit, having made a video of it last year. But they seemed to be of different dimensions (they probably aren’t) and I wanted to check ahead of time lest I embarrass myself and delay a bus if I tested it in the field.

Actually, I wasn’t worried that the Fr8 wouldn’t fit, I was worried that it wouldn’t fit securely under the spring-tensioned arm with the yellow grip. I have a burly front rack and metal fenders that wouldn’t be able to budge. See how that worked out for me in the photo below. Additionally, my bike weighs 50 pounds unloaded (and without the red basket) – the Sportworks specifications note that each bike tray holds 55 pounds. Phew!

Last weekend I took the Fr8 on its first ever train journey, from the Clinton Pink/Green Line station to the California Pink Line station. The Pink Line uses the 5000-series cars, which are brand new from Bombardier’s factory in New York. They have the distinction of providing two wheelchair-accessible spaces in every car instead of one. This means there are two fewer “modesty panels” in the vestibule. It offers more room to position and park your bike – it works out great; see photo below. It still doesn’t provide enough room for a passenger to bring a bike aboard, stay put, and let other passengers in and out of the door. Passengers with bikes will still need to pay attention to the announcements to know which door will open at the next station and move their bike accordingly.

Looking for a WorkCycles of your own? You can contact them directly in Amsterdam. Shipping is €200, which is a really good deal now. You can also contact J.C. Lind Bike Co. who will become a dealer soon.

Finding a new way to measure cities’ bike friendliness in the United States, part 2

One of the reasons I developed my own bike friendly city ranking system was to provide a better measurement when comparing cities. Since the League of American Bicyclists (LAB) uses a nominal ranking (Platinum, Silver, Gold, Bronze), the difference in bike friendliness between cities of the same rank may be small or great. A numerical scoring system on a predictable and familiar scale will better highlight the distance of one city to another on achieve that city’s level of bike friendliness.

I created a method that would compare my ranking to LAB’s ranking and that was to find the variance (which isn’t the same as range) in scores in my ranking for each nominal level in LAB’s ranking. Platinum cities had a very high variance and Bronze cities had the lowest variance. Gold and Silver had swapped positions: Gold cities had a lower variance than Silver cities.

The beauty with creating your own bike friendly measurement system is that you can make the outcome order whatever you want.

In the days since, I’ve developed another bike friendliness measurement system, one that’s easier to understand, whose rankings are still relative to other cities, and that can be weighted. (I’m emphasizing the bike commute mode share.) It uses percentile scoring so all scores are positive but still based on the distribution of values. I’ve listed the scores for Method 1 (which uses a normalizing function based on mean and standard deviation) and Method 2 below.

[table id=5 /]

Mode share by trip miles and trip frequency in Chicago and Cook County

Two tables in this post. Data from the Chicago Metropolitan Agency for Planning’s 2008 Travel Tracker Survey. Download source file (pdf).

Table 1. Number represents share of trip miles taken by that mode. So in Central Chicago (which seems to comprise neighborhoods as far north as Uptown and as far south as Hyde Park), 1.4% of all trip miles are by bike. If 1,000 people take 100 trips of 2 miles each, then 2,800 miles will be by bike.

[table id=1 /]

Table 2. Number represents share of trips taken by that mode, regardless of distance.

[table id=2 /]