why do shipping labels have a dot code AND a bar code?

Currently looking at a printed USPS shipping label. Near the bottom there’s a bar code, and near the top there’s a dot code. FedEx labels are the same way, and so are UPS labels.

So why the two separate blocks of info?

Because barcodes have been around for a long time and there is a lot of machinery and systems in place that rely on those for automated and semi-automated processing.

Newer things like 2D barcodes can’t just replace the old 1D barcodes because it would cost a lot of money to replace the hardware and systems with little to no gain.

This page refers to the 2-D barcode as “unidirectional bar code” that “can be read by a machine regardless of the direction it is facing,” which is very misleading. The 2-D barcode contains a lot more information than the conventional barcode, so it’s not just a unidirectional equivalent of it.

My guess is that the conventional (1-D) barcode just encodes the tracking number for the package, while the 2-D barcode contains all the info on the label - recipient’s name, delivery address, etc. This might allow a barcode scanner to display the address without requiring a connection to the server, for example.

My guess is that the “IMPB” barcode, which has basic routing information can be read at extremely high speed, by the automated sorting equipment.
The 2-d barcode takes longer to read, so even if it has the same information, it’s faster to have the essential routing info. read at the maximum speed of the package sorting equipment.

I doubt it’s a speed thing- they can read 2d and linear barcodes at the same speed. But there’s a fundamental difference between them- the amount of data contained.

The thing is, linear barcode readers are cheaper and simpler, so I imagine they use those in high speed sorting equipment that routes packages, while the 2d barcodes are read less often when the actual info is needed.

I happen to have a 2D barcode scanner on my desk and just scanned a typical Feded Ground label. There are about* 290 characters encoded. Name, address, tracking number and package weight are in there, of course, but the majority are other strings that I don’t recognize.

My earliest experience working with 2D barcodes was in 2006 for a project where we were both generating the barcodes and later reading them back into a machine. After fiddling around with the barcode software, I showed the boss an example. He and I were really impressed with the data density and he said,“You could put the whole Gettysburg Address in there!” About 90 seconds later, I had barcoded the speech, the scanner read it every time.

*it’s an approximation since I had to subtract about 100 characters from the text representation. Each of the fields are end in ASCII 29 which is the nonprintable Group Separator. My serial terminal utility represents this as [GS] but it’s really only one character. There are about 32, give or take.

Yeah, at my last job (2 years ago), I was in charge of implementing a pharmacy system- we used bar codes in the clinics. The wholesale pharmacy would print linear and 2d barcodes on the medication bottles, and the clinic staff would scan them as part of the prescription process.

The 2d barcodes were better- it had EVERYTHING about the medication- NDC, quantity, dosage, and so forth, while the linear one just had the inventory number, and the clinic staff had to manually enter the quantity dispensed. But… the linear barcode scanners were like $30 a piece, while the 2d ones were upwards of $150. So we went with the linear ones. There wasn’t a perceptible speed difference that we could tell though.