Thursday, October 13, 2016

Some differences when opening georeferenced imagery between QGIS and ArcGIS

Just did some minor testing after trying the Georeferencing toolbar in ArcGIS to create some world files (.jpgw, .pngw, .ecww, .tfw, etc.) and wanted to see how these two GIS suites treat the result. Normally I use MapWindow GIS to georeference aerial photos but it's very slow and has some strange bugs that might deserve another blog post.

The aerial photos were received from the provincial agency as MrSID files and were converted to ecw using IrfanView. Neither the original SID files or the ECW files had embedded projection information. In ArcGIS, I used the georeferencing toolbar and added five control points then chose Projective Transformation rather than the default Affine 1st Order Polynomial method to transform the raster. Upon clicking Update Georeferencing (Save the current warp to the dataset) from the toolbar, two files are created with the same name prefix as the .ecw file but with different extensions. They are photoname.ecw.aux.xml, and photoname.ewwx. The .ewwx file contains the image-to-world file transformation parameters using 1st Order Polynomial. The original ecw image file was untouched by this process.

I also made a copy of the photoname.ewwx file and renamed the extension to ecww so there was a file named photoname.ecww that QGIS and MapWindow can use.

It seems that although QGIS can read the ecw.aux.xml for the projection information (so it doesn't need a .prj file), it can not read this auxiliary file's contents for the higher order polynomial transformation. Thus there is a difference in the accuracy of the georeferenced raster when loaded, between ArcGIS and QGIS. In ArcGIS, if a more complex transform higher than 1st order polynomial was used to create the aux.xml and ewwx files, then it will show the raster with the higher order transformation method applied. If one decides to load the raster into QGIS, then QGIS will only use the world file (.ecww) and perform affine transformation on it.

Thursday, June 30, 2016

Friday, April 8, 2016

A list of "All-Weather" tires with the Mountain/Snowflake symbol and where to get them

Though the design and compounds have been around a few years now, it was surprisingly difficult to find tires that are truly All-Weather (good for every season) per Transport Canada standards and meet or exceed the Rubber Association of Canada performance requirements. Since my tires need replacing and I'm not looking for soft winter-specific tires, I have compiled a list of tires that have the mountain/snowflake rating based upon my search. Perhaps you'll find this list useful and that it saves you time.

Nokian pioneered this class of tires and was the first to market but there are now a number of brands with a limited selection.

These makes include: Kumho, Toyo, Falken, Michelin, Vredestein, Hankook, Yokohama, and Nankang, Michelin, Multi-Mile, and Muteki.  Additionally, some are exclusively sold at certain retailers.

Tires that have the 3PMSF icon and are all-weather capable
Manufacturer Model Retailer Size Limits/ Tire diameter
Nokian Nordman WR & WR SUV Kal Tire (Exclusive) Smallest size: 155/70R13 = 21.5", Largest size: 225/55R17 = 26.7"
Nokian WRG3 & WRG3 SUV Kal Tire (Exclusive) Smallest: 175/65R14, Largest: 255/40R19,
SUV Smallest size: 235/75R15 = 28.9", SUV Largest size: 275/40R21 = 29.7"
Nankang SV-2 Kal Tire Smallest size: 175/70R13 = 22.6", Largest size: 235/75R15 = 28.9"
Kumho The Road Venture SAT (KL61) Mopar Dealers (Dodge/Jeep/Fiat),
OK Tire,
Smallest size: 225/75R15 = 28.3", Largest size: 265/50R20 = 30.4"
Kumho Solus HA31 Mopar Dealers (Dodge/Jeep/Fiat), Smallest size: 145/80R13 = , Largest size: 225/45R17 =
Toyo Celsius & Celsius CUV OK Tire,,
Smallest size: 185/65R14
Largest size: 265/50R20
Vredestein Quatrac 3 & Quatrac 3 SUV
Smallest size: 155/70 R 13
Largest size: 255/55 R 19
Vredestein Quatrac 5 2
Hankook Optimo 4S Canadian Tire (Exclusive) Smallest size: 175/65R14 = , Largest size: 225/50R17 =
Yokohama Geolandar A/T G015
Smallest size: 215/75R15 = Largest sizes: 305/55R20 = , 35X12.50R20 = 35"
Falken Wildpeak A/T3W Smallest size: 235/75R15 = , Largest size: 325/60R20 =
BFGoodrich All-Terrain T/A® KO2 Mopar Dealers (Dodge/Jeep/Fiat),
Smallest size: 235/75R15 = , Largest size: 325/60R20 =
Michelin Pilot Alpin PA3 Canadian Tire
Smallest size: = 205/55R16, Largest size: = 285/40R19
Michelin Pilot Alpin PA4 Canadian Tire
Smallest size: 225/40R18 = , Largest size: = 315/35R20
Michelin Primacy Alpin PA3 Canadian Tire
Smallest size: = , Largest size: = 225/45R17
Minerva Emizero 4s Smallest size: = , Largest size: =
Muteki Trail Hog Kal Tire Smallest size: 265/75R16
Largest sizes:
325/60R20 = 35.4",
37X12.5R20 = 37"
Multi-Mile Wild Country XTX Sport Kal Tire 275/65R20 = 34.1"
Nitto EXO Grappler AWT Kal Tire, Smallest size:
Largest sizes:
Nokian Rotiva AT Plus Kal Tire ?

With respect to other tire models that do not have the 3-peaked mountain/snowflake rating yet might actually deliver, however subjective, sufficient or excellent performance in diverse weather conditions including snow, they are not listed here but may be numerous.  Besides reading reviews, it's worth looking at Quebec's Bill 42 (an Act to Amend the Highway Safety Code) passed in 2008 and lists the following as acceptable tires for winter driving: Tires on which one of the following inscriptions appears: Alaska | Arctic | A/T or AT | Blizzard | Ice | LT | Nordic | Snow (but not Mud & Snow) | Stud | Ultratraction | Winter.  Note that after December 15, 2014, in Quebec, these inscriptions on tires were no longer compliant with the statute and only those tires that have the 3-peaked mountain/snowflake
icon are in compliance for winter driving.  
Of course, the class of winter-dedicated tires are probably compliant with Quebec's law but that is not the topic of this blog post.

Wednesday, March 16, 2016

A simple way to view Shadow Copies on Windows 8.1 without installing or downloading software

Upon pressing "undo" accidentally in File Explorer on my Surface Pro 3, Windows 8.1 performs bad behaviour.  See details and frustration others have had here: thread

It seems Windows 8.1 made all the contents of the folder disappear as a consequence of undoing a previous rename of the folder from "New Folder".  That is, the file entry in the Master File Table was lost. Hopefully the entries were deleted and the space is reusable (I'm not sure what how Windows manipulates the MFT in this case).

So, I wanted to recover the files from that folder.  I first found out that Windows 8 has two kinds of "backup" systems, one called File History that is intended to make regular replicas of the tracked Libraries to a separate physical disk or to a network share.  Since this File History wasn't configured and not turned on by default on my SP3, I looked toward Volume Shadow Copy, which appears to be enabled by default on the C: drive.  You can check your "System Protection" tab in System Properties to see if this is the case for you by following the first part of this tutorial:
In fact, you can follow the entire video if you feel you want to try the software he mentions, ShadowExplorer.

Alternatively, if you don't want to download any software and happen to have a Windows 7 Pro machine at your disposal on your network, then you can just navigate to the Windows 8.1 machine and right click the folder of interest to see Previous Versions.  This is how I recovered my files and viewed the snapshots of my Documents folder on my SP3.

Interestingly, if you try navigating to \\localhost\C$ on the Windows 8.1 computer without any software installed, you'll be able to see the Previous Versions tab, but it will be empty.  So in my case, from the Windows 7 Pro machine, I navigated to \\SP3\Users\name\Documents\ and right-clicked properties on the folder of interest.  This showed me Previous Versions with a list of snapshots and their dates.

I was afraid at first that I didn't have any shadow copies to restore because checking the Services tab in Task Manager on my SP3 indicated the VSS (Volume Shadow Copy) service was Stopped.  Also, this article says that Volume Shadow Copy Service in Windows 8 is set to manual and does not run on system startup.  Lucky for me, Shadow Copies were being made and I was able to use a Windows 7 computer on the same network to browse the "Previous Versions" of the folders on the SP3 running Windows 8.1 without even downloading other software such as ShadowExplorer mentioned above or Z-VSScopy.

Sunday, June 8, 2014

Silly Apple, customer-losing the Source (Circuit City/Radioshack), Amazon proves itself again!

Apple is so lame! This is another reason why I don't own any Apple products: they require me to install bloated iTunes software just to send a digital iTunes store gift card.

Meanwhile I purchased a physical gift card at the Source (by Circuit City) and the complete idiots there did not activate it properly. They required the physical card to activate it, which I gifted away and did not have access to for months.  Then the Source was unable to activate it and I lost my money!!!  The Apple Store was also unable to help as it is outside of their system... I am so pissed at the Source; that company had better disappear.

As for Apple, making it near impossible for me to buy a digital gift card without an Apple product or iTunes, I can't express the numerous other reasons why Apple still sucks.  I even tried asking someone who owned an iPhone to help me make the purchase via their phone but they thought it was too complicated.  So frustration!

Months after giving the card in the first place, a few pages into Googling Canada iTunes gift card online delivery, I found out that can do it and at a value you specify.  Took me less than two minutes!

Is it not obvious as to why Amazon is kicking the crap out of other retailers and why everyone loves to hate Apple?

Wednesday, January 16, 2013

DWL-G122 Rev. A2 Wireless Adapter on Linux

Finding working drivers for D-Link DWL-G122 Rev. A2 USB Wireless Adapter to use in Linux Mint 14 (32-bit) based on Ubuntu 12.10.

The adapter is only compatible with WPA and WEP security modes; not compatible with WPA2.  PSK can be used.  This adapter could not connect to a router running in 802.11g/n mixed mode; but does associate with a router set in 802.11g mode.

On Mint/Ubuntu, attempts to use the native p54usb kernel module, and the necessary isl3887usb firmware placed in the correct /lib/firmware path resulted in dmesg log lines "authentication with AA:BB:CC:DD:EE:FF timed out" despite success registering drivers to the interface.  See firmware installation instructions at There appears to be a newer version of the isl3887usb firmware available here,, which I did not try

I had success using the old method I had running on an earlier edition of Ubuntu. Ie. load ndiswrapper

Use ndiswrapper kernel module and install Windows drivers from D-Link website.  However, D-Link Support website does not list Rev. A2 (as of 2013-01) but the correct driver is available on their FTP server at:

Encountered "FATAL: Module ndiswrapper not found." when trying to sudo modprobe ndiswrapper or when trying to install Windows drivers for the adapter via ndisgtk.  Downloading and installing ndiswrapper-dkms_1.58~rc1-0ubuntu1_all.deb worked. Older version ndiswrapper-dkms_1.57-1ubuntu1_all.deb did not.  Follow procedures at

Probably want to blacklist p54usb if you want to get ndiswrapper to work.

Monday, January 14, 2013

Yet another blog post about tethering your Android-powered phone to a router via USB.

This post summarizes my experience with flashing my router's stock firmware to an opensource firmware to enable it to use the USB port as the WAN connection. The Internet (WAN) connection is provided by an Android-powered smartphone via USB tethering.

Specifically, I have a D-Link DIR-825 Wireless N router. HW Rev. B1. It has one USB port. The phone is a Samsung Galaxy S 4G (SGH-T959W); it is not the same as a Samsung Galaxy Vibrant. My cellular provider is Mobilicity and my phone number is.... j/k. I'm not releasing that. 

So I first tried flashing the DD-WRT firmware to my DIR-825. This is a very nice firmware: nice GUI and excellent features, most of which I don't know how to use. It can bridge the various interfaces such as WiFi to the LAN, it can act in a Wireless Distribution System, it has various hotspots for potential revenue-generation using landing pages to share Internet, it has awesome graphs for monitoring bandwidth and usage, and it has support for various USB devices from printers, to storage, to 3G USB modems.

And that's where I got stuck.  I had DD-WRT v24-sp2 (03/19/12) std r18777 installed on the router. I enabled Core USB Support under the Services menu along with USB Storage Support. Set the WAN Connection Type to "3G/UMTS/4G/LTE" and input the APN settings for Mobilicity. Then I plugged in the Galaxy S 4G into the USB port, via a USB cable of course, and enabled USB tethering on the phone which is running Gingerbread 2.3.6.

This did not work; router clients did not have Internet connectivity. I SSH'd into the router and ran cat /proc/bus/usb/devices
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04e8 ProdID=6881 Rev= 4.00
S: Manufacturer=SAMSUNG
S: Product=SAMSUNG_Android
S: SerialNumber=T959f1f202cd
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 96mA
A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=(none)
E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
As you can see, no drivers were attached to the device; whereas before enabling tethering on the phone, the Interface line said I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage indicating the usb-storage driver was bound.

From looking through the DD-WRT wiki at I didn't find any Samsung devices supported. I had hoped that DD-WRT would support this phone as there were a few Android smartphones listed in addition to all the USB rocket sticks. But alas, there seems to be no compatibility with the Galaxy S 4G.

Because I don't give up easily and knew that the desired result is feasible, I looked for more solutions. First, I tested USB tethering this phone to a Linux LiveCD (Linux Mint 14) and looked at the modules it enabled. Running lsmod from a terminal window listed rndis_host and cdc_ether, which I had read about somewhere before. A quick search in Google and I found a number of webpages/blog posts referencing these modules and a forum post on OpenWRT's forum.

They are:
Starting with OpenWRT Backfire 10.03.1 final flashed to the D-Link DIR-825 and following the instructions in the forum post linked above, I had everything required. However, once I connected the Galaxy S 4G to the router and enabled USB tethering in Android, I still didn't have Internet connectivity.

From SSH on the router, I ran dmesg | grep usb and got this
usb 1-1: new high speed USB device using ar71xx-ehci and address 1
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: USB disconnect, address 1
usb 1-1: new high speed USB device using ar71xx-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: bad CDC descriptors

instead of
usb 1-1: new high speed USB device using ar71xx-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
usb0: register 'rndis_host' at usb-ar71xx-ehci-1, RNDIS device, aa:cc:b6:36:b3:97

Additionally, cat /proc/bus/usb/devices was similar to the above result where "Driver=(none)"

So I decided to test my other Android phone, a Motorola RAZR HD running ICS 4.0.4. This phone produced the desired result with rndis_host being bound to the device as a driver. But I had no intentions of tethering the Motorola on a limited data plan to the router.

Finally, after downloading and installing the newest version of OpenWRT, Attitude Adjustment 12.09-rc1, and the new versions of the packages as listed in the above linked articles, from:
I plugged in the Samsung Galaxy S 4G to the router and everything worked!  Next step is to flash the ROM on the Galaxy S 4G to ICS or JB and see if it still functions.

Recommended: If you have software on your NAT'ed internal computers that use UPnP to automatically configure the router to for example, expose a port and redirect external traffic to that internal device, then you should install the miniupnpd package as well.  The version available at the time I setup Attitude Adjustment 12.09-rc1 and seems to work with it is 1.6.20110730-6.  Specifically for DIR-825, the package is here. Although there might be newer versions that are also compatible.

This discussion explains why someone may want to install the UPnP package instead of setting up portforwarding redirects (and related rules) in /etc/firewall.user. This wiki page explains setting up Universal Plug'n'Play and NAT-PMP on OpenWrt and the instructions for installing the package is the same as the 3rd link in the first list above.

Possible explanation for why the newer version of OpenWRT works while the older version, 10.03.1, does not?
Thread about potential solution using similar modules in DD-WRT to achieve the same goal: