Site menu:

Cyclocross For Roadies: How and Why to Get Started - Buy Now!

Site search

Categories

QGIS Diagrams – Pie Charts for Symbols!

QGIS has a great feature that allows you to create pie charts for feature symbols! I have known about it for a while, but never really had the opportunity or reason to play with it. However, this post on gis.stackexchange.com prompted me to take a look. Here’s a quick summary of how the ‘Diagrams’ functionality works in case you’re like me and haven’t had time to check it out! It’s easy to do, and works pretty well!

As an example, I created a random sample dataset with some fictitious data. It contained three points, and the attribute table looked like this:

Attribute Table

Attribute Table

To create a diagram symbol, go to the properties for the layer in question, and click the “Diagrams” tab at the top, then check off “Display Diagrams” and set Diagram type to “Pie Chart.” You can also use “Text Diagram” but that’s another post!

You can set either a fixed size, or scale the size of the charts to an attribute value range. This is useful if you are wanting to use the size of the symbol to indicate a value, and the ‘slices’ to indicate percentages. In my case, I set the size to ’23′ and set it to scale between 0 and 30mm. This is arbitrary in my case, but you can play with it using your own data to see what works best for you.

At the bottom under “Attributes,” select each attribute you want to form a ‘slice’ of the pie, and click the ‘+’ on the right. Then select the next value, and click ‘+.’  Repeat until you are finished adding all values. In my case, I added attributes A, B, C, and D. I didn’t want to use the ID, so I left it out. You can set individual colours for each ‘slice’ here by double clicking the colour in the table. Here’s what my settings looked like:

Pie Chart Settings

Pie Chart Settings

and here’s here what the final product looks like:

Final Result

Final Result

This is already a great tool, and with a few more enhancements, it will be a fantastic tool! What enhancements you wonder? A couple that immediately come to mind are the ability to label ‘slices’ with either their attribute value, or their percentage, and the ability to remove all borders (in the above example, ‘Pen Width’ is set to 0, but it still shows a border. Weird.)

What features would you like to see?

Perth Cyclocross – Back for a second year!

The Ottawa Bicycle Club is returning to host a morning of cyclocross racing in Perth!  The Perth race is race number seven of the ten race series being held this fall throughout the Ottawa Valley.

Cyclocross is the fastest growing discipline in cycling, with popularity skyrocketing worldwide. Specialized cyclocross bikes (think of a road bike with mountain bike tires) are used as racers ride on grassy fields, dismount their bikes and carry them over barriers, run up steep, short hills and ride through sand pits or mud depending upon conditions!

Races are very spectator friendly, presenting many opportunities to see the action up close and personal!

The racing in Perth will occur on Sunday, November 6 at Conlon Farm Recreation Complex. Come on out to cheer on some of the best racers in Canada (including current and former National and Provincial champions!)  Races start at 9am (for U17 and younger, Women, Masters B Men and older & Novices) with the second race starting at 10:45am (Elite Men, Masters A Men & Junior Men.)

For more information on the races, go to www.cyclocross.org, or call race organizer Bob Woods at 613-256-1874.  Or, just make your way to Conlon Farm on Sunday, November 6! If you’re interested in racing yourself, see the website for registration details.

Tour de Brew – Part IV

This entry is part 4 of 6 in the series Tour de Brew

My last post talked about our awesome ride up the Appalachian Gap on Saturday. You can read that here, and earlier posts here.

Post Appalachian Gap, we headed to the ‘big city’ for a tour of the Magic Hat Brewery in Burlington. Right away, we noticed that the place was jammed. We could barely find a parking spot, and there was a BBQ going on outside the door! We finally got parked, and made our way into the ‘gift shop’ portion of the brewery. The place was packed with people! There’s a long bar across one whole side of the room, and all of the beers they brew at Magic Hat are on tap for free sample. Amazing! Trent commented that he’s never seen a brewery so busy, and he’s been on tours of breweries and distilleries all around the world! Magic Hat is definitely doing something right in the marketing and ‘company culture’ department!

Because the place was so busy, we decided to make our way to the front of the line for the next free tour (they go hourly) and avoid the rush at the bar. The tour was interesting, although we didn’t get to check out the actual production floor–we only saw it from above, where the tour concluded on a balcony overlooking the floor. It’s not quite what I would expect from a ‘micro’ brewery–their line puts out 400 bottles/minute, and 50-60 kegs/hour. That’s a lot of beer! Obviously not on the same level as a Molson or Labatt, but still more than a ‘micro’ in my opinion.

Post-tour, we headed back to the bar to test, taste and sample. #9, Circus Boy, Single Chair, Hi.P.A., Blind Faith, Humble Patience; oh my! I don’t recall specifics on any of the beers, except for #9 which I stocked up on before we left the state. It’s a beautiful, slightly apricot-tinted ‘not-quite-pale’ ale that I quite enjoyed! The rest of the beers were good, but none really made much of an impression on me. Of course, without more time to sit and enjoy each (in a larger than sample size quantity…) it’s hard to say for sure! I’d be more than willing to give any of them another try of course :)

Post-tour, we headed to box-mall hell to grab some Thai take out, and then back to the cabin for dinner and more beer. A selection of the nights samplings:

The selection for the night

The selection for the night

The Blackbeary Wheat from Long Trail was one of my favourites of the trip. The Peak Organics was popular all around, and we tried several different varieties. I still think that their Maple Oat was the best of the trip, although the Double Bag is a very close second (possibly first, depending on my mood at the time…)

The beer, hot tub, games and sleep wrapped up another successful, busy day, both on the bike and off. The morning would bring a ‘north of Jeffersonville’ route to mix things up, and to give the legs a rest from the big hills. The story of that ride will be coming up next!

QGIS Topological Editing

As we all know, there’s almost always more than one way to do something!

In a previous post (QGIS Trace Edit Tool) I discussed how to use QGIS’ trace edit plugin to create a polygon adjacent to an existing polygon while ensuring that it is topologically correct. With a bit more experimentation, I’ve found a better and easier way to perform the same task, using QGIS’ built-in topological editing functions. It’s easy and super convenient!

The key is that you’ll need to go to Settings > Snapping Options and enable the “Avoid Int.”  checkbox. (The mouseover reads “Avoid intersections of new polygons” and the checkbox doesn’t appear for lines or points, since it doesn’t apply.)

Enable "Avoid Intersections"

Enable "Avoid Intersections"

You can then digitize a polygon beside existing polygons, and have the new feature ‘clipped’ to the boundary. This is faster than using the trace edit plugin like I mentioned before, and it also ensures that no vertices are missed! Fantastic! How about we walk through an example? Pretend we had these existing features:

Existing Features

Existing Features

Now, let us pretend we want to draw a polygon that fills in the hole in the middle. We could simply set our snapping options, zoom way in, and try to snap to every vertex using the standard edit tool. Or, we could use the trace edit tool, and ‘trace’ around the boundary while holding the Ctrl key. OR, we could set the “Avoid intersection” option as shown above, and just quickly sketch in the boundary like so:

New feature boundary

New feature boundary

The red feature above is what I drew in. No need to go carefully, or try to snap to anything. Just roughly sketch in the area I want. Topology rules take care of the rest, clipping the feature to the existing boundary when I finish my sketch. The final product looks like this:

Finished Product

Finished Product

Voila! It’s just that easy! I quickly (not precisely at all) drew in the rough shape required, and ended up with a perfectly topologically correct feature that follows the existing boundary exactly. No need to snap or trace anything! Sweet!

Tour de Brew – Part III

This entry is part 3 of 6 in the series Tour de Brew

Yes, updates are few and far between. My apologies.

For those keeping track, I’m still working on documenting our trip to Vermont for “Tour de Brew 2011.” Check out the rest of the story here.

I left off talking about our hike up Mt. Mansfield, and our encounter with momma moose and her baby. I realized I had failed to mention our Friday night dinner at The Shed, where we had a decent meal, and their ‘ski of beer’ – a sampler of six of their own beers served on an old wooden ski. Pretty cool!

Ski of Beer

Ski of Beer* Not my photo - thanks to HomeBrew Guru for this shot

We were not super impressed with the beer itself, although they seemed to get better the further down the ski we got. I’m not sure if the later beers were actually better beers, or if our judgement was perhaps clouded? The stout was quite nice, as was their seasonal which I believe was an Irish Red. Either way, this was the least impressive Vermont beer we had the whole trip.

Saturday was to be a big day. We were going to meet up with Luke and Allan (Luke’s brother-in-law) for a ride up the Appalachian Gap. I was a bit worried, but after our success on Smuggler’s Notch, I was no longer scared of the big mountains. I knew it was all doable!  We drove to Richmond, were we met Luke and Allan. Luke had driven all night to arrive at his sister’s place, and was now ready to join us for some rides (and beer!)

The ride out of Richmond was painful. It was nothing compared to the Notch, but still a big climb for us! The first 3.2 km gained 95m, averaging 6% with a max of 10%,.  The legs were not used to this kind of effort, especially after what they had been through the day before, and were protesting the ride this morning! Luckily, the next 2km was downhill, and gave us a bit of a rest and recovery so the legs could warm up. This was good, as I started to feel strong again, and was all I needed to be ready for the climb! Of course, the climb came soon enough, as km 6 to km 29 was all uphill!

Oddly enough, we started meeting folks on the side of the road who were cheering for us:

“Good job guys!”

“Way to go, keep it up!”

We thought that perhaps the locals were just really friendly to cyclists here…however, we then started to see signs along the road:  “Bike race Saturday.” Hmm…  Soon, we rolled past a feed zone – people ready to hand us bottles and everything. Gee.. I wonder. Could we be on the course during The Green Mountain Stage Race? Turns out that yes, yes we were. Shortly after the feed zone, I heard Luke announce “Riders back” – we were about to be passed by some racers! Two riders came by us. Slowly. One guy was clearly banged up from a crash, and we were certain they were off the back of the group. Good–we didn’t really want to be on the road when the peloton came by!

Despite our painfully slow pace, the guys that passed us didn’t get too far ahead. In fact, they were catching another lone rider, and we then passed two of them again. At this point, I had to stop, as I thought my cleat was coming loose. We stopped and I checked my cleat (it was fine…weird…) and the racers passed us again. However, we saddled back up, and very shortly were caught up to them again. Wow.. these guys must be shattered, since we were only averaging 27km/hr or so, and there were racing even slower than that.

We got to the main turnoff where the ‘real climb’ begins, (about 24km from Richmond) and the racers went right, while we went left. The racers didn’t seem sure where to go, and almost followed us. I guess it looked like we knew what we were doing! I loudly announced “We are not in the race, and do not know where the course goes. Please follow us at your own risk.” I hope they went the right way!

I say that the ‘real climb’ started at km 24, which is true. However, kilometers 6 through 24 gain 234m, with an average grade of 3% and a max of 8%. Not exactly flat!

The “real climb’ up Appalachian Gap begins at Gore Rd. and 17, and from there climbs a total of 340m in 4.34km. This gives an average of 8%, with a max of 18% near the top. Yes, 18%! Oh, and there’s no reprieve. The total downhill in this whole stretch? Zero (yes, 0) meters. None.

Our little group got smashed apart pretty quickly. Soon it was Allan and I, with Matt just behind me. Then, Allan opened a gap on me, and I couldn’t close it. I settled into my own pace, rather than trying to match Allan tapping away on his compact crank. At one point, the road leveled off a bit, and I actually went sur la plaque (see here) just to mix it up. It actually felt good. Oh boy. “I think I like these big climbs” I thought to myself, as I powered up 100m or so in the big ring. Then, back to the 39, and keep on trucking. I noticed that as I approached the top (where it was exactly, I wasn’t sure, I just knew it couldn’t go up forever…) I was closing in on Allan again. We then hit the last 600m or so; what Allan had called “The Wall” in our chats about the ride. This last 600m averages 11%, and is where that fun little 18% pitch I told you about also resides. Lovely! It took me (literally) 3 minutes to go 600m. Three minutes!  That’s an average speed of 12.3km/hr. Ouch. However, I made it! And I had closed the gap to Allan down to only 10 or 20m by the line. Nice!

The Gang at the top of the Appalachian Gap

At the top of "App Gap" (l-r: Allan, Shawn, Me, Trent, Matt, Luke)

The rest of the guys had their own epic battles on the way up. Matty, followed by Trent, followed by Shawn. We took some photos, then decided to split. Allan, Trent and Shawn went back the way we came up, and Matt, Luke and I headed for a bit of a longer ride, descending down the opposite side of the Gap. This was super fun, but again made my poor descending skills evident.  Max speed was 73.47km/hr for me, while the others were much faster, opening a huge gap on me on the descent. The descent itself was about 14km long (!), and dropped 507m with an average grade of -5%, and a max (minimum?) of -13%. Some of the switchbacks were super fun, and on one the left hand shoulder was a full lane wide, with lots of visibility. I took the whole thing, and ended up on on the left side edge of the left shoulder–basically 3 full lanes from the right side of the road, and just flying! I do not recommend this of course, but…it’s a calculated risk! Obviously this is insane if there is no visibility!

Yes, we came from down there

Yes, we came from down there!

Our route back to Richmond took us from 17, onto the 100 into Waterbury. Our original plan (pre-flooding) was to make The Alchemist a starring role in the brew portion of Tour de Brew. However, the flooding hit it hard, and it was closed for business during our trip. Riding through Waterbury was an experience. Matt flatted just before we got out of town (no doubt on some of the debris from the flooding) so we had a chance to see the damage in some detail.  It looked like a war zone! Dumpsters lining the streets, the entire community out pitching in to clean up… entire houses full of drywall, insulation, and worldly possessions piled up in moldy heaps at the ends of driveways. People wearing dust masks while walking down the street. Not a good scene! However, it was great to see people pitching in and working together to clean up the community! And good news for beer lovers–it looks like The Alchemist is rebuilding to be bigger and better than ever, so perhaps it will have a starring role in Tour de Brew 2012!

The Alchemist cleaning up post-Irene

The Alchemist cleaning up post-Irene

The remainder of our ride took us on 2 back to Richmond, where we met the guys at On The Rise Bakery for some great grub and yes, even beer. Epic mountain passes, and beer on tap at the bakery?!? Am I in heaven? I had a half-pint of Switchback Ale, which I enjoyed greatly! Although, even a Bug Light probably would have tasted good after the ride we’d just finished! While at the bakery, we firmed up plans for our afternoon–a tour of the Magic Hat Brewery. Oh ya! That will be Part IV of the story!

Our epic Appalachian Gap ride ended up with 83.58km in a total of 3:06:04 for an average speed of 26.95km/hr. Our total climb over the entire ride was 1134m, with an average grade of 4% and a max of 18%! Nice!

Elevation/Speed/HR Graph

Elevation/Speed/HR Graph (click for full image)

Stay tuned for Part IV, where I’ll talk about Magic Hat! That reminds me… I think I still have a #9 in the fridge!

Bookshelf 2.0 developed by revood.com