The reality in the UK is that the freeview (OTA) lineup for a postal code is not always correct for actual viewing. This can be due to incorrect data (which could be fixed), but can also be down to the realities of signal propagation, or the choice by some (especially near the overlaps) to choose a different transmitter.

I do not consider the (kludgy, likely necessary, but apparently reactionary) /transmitters solution to be a good long term solution unless you are going to expand that to ALL countries, including the US and let people pick and choose their transmitters(*). GBR is a very special location for historical reasons (i.e. BBC) in how they have provided DVB-T transmissions and transmitter locations.

There are a couple of obvious ways to address this with the existing API structure.

* Require the users to open tickets to request the adding all of the freeview transmitters they want to use for each and every postal code (which is sort of equivalent to those in the US that are in dual "fringe" areas, but apparently in the UK the overlap is much more common due to the heavy coverage for all locations). From previous interactions, some people can see 2, 3, or even 4 different transmitters (and sometimes choose which to select based on the "local" news due to their historical/family interests).

* Add in all the freeview transmitters to all UK lineups, and let the user decide which they are going to use. In the UK, knowing your transmitter is almost second nature I have been told (at least for a lot of people who use software that needs guide data).

* Provide a new "region" (somewhat equivalent to the ZZZ global satellite, but perhaps GBR/Freeview?) which has a list of all UK freeview transmitters. This preserves the headend selection process.

* Expand /transmitters to all countries, including the US.

* Something entirely different (API 201607xx?)

* Do nothing.

I recognize that this is a long term consideration, and nothing will happen quickly. Thanks for the considerations.

(*) Which is likely to result in usage other than what you would prefer to see.

For countries that either don't have postal codes, or postal codes are so new that people still aren't used to using them, the "human" name to lineup list will be available using the /transmitters/ API call. It's an option if your grabber wants to implement it as an alternate means of selecting a lineup.

Basically:What's your country: GBRDo you want to select your transmitter list based on postal code or transmitter name? (postal code)Present list of lineups.Did you find your transmitter? Do you want to see the master list?

Since it's only done once during the setup phase, it's a little "wordy", but once done, it's done.

To your other thoughts:

Generating a bottom up map is time consuming; are "you" willing to pay more than $25 year?I don't think adding all 60 transmitters to every request for lineups in a postal code makes sense, because it will just add confusion.I believe the existing call for /transmitters/GBR already meets your suggestion of a region that has a list of all Freeview transmitters.The mapping of zip codes to lineups in the US is probably 99% accurate, so nothing to be gained there.

The ATSC system used by USA (and Canada and Mexico) is not like the DVB-T systems used in Europe and other areas. We do not have specific transmitters broadcasting an entire digital lineup for the area, each TV station has their own transmitter. Some of those transmitters share the same tower, others have their own towers in the same general area, others may have towers located in completely different areas since stations here are licensed to specific communities and not an entire region, so if we're in a location where they are in opposited directions, we might need an antenna rotator to get them all. The further away you get from a city, the more likely you can also get stations from multiple neighboring cities. Each channel has their own channel numbers based on their old analog number, and because of the way analog TV worked, it's extremely rare for neighboring cities to have channels on the same number, so we don't really have to deal with things like someone who can get stations from both Philadelphia and NYC getting ABC on the same channel number like someone in the UK would have to deal with if they're pointing to another transmitter that has a different BBC region where BBC One on Freeview is always channel 1. Our TV is more local, network programming is limited to primetime and some hours during daytime and late night depending on the network, while the rest of the day the schedules for our stations vary from market to market. We also have low power TV stations that are not available in the entire market, just in specific towns.

The US OTA listings are not grouped by transmitter. The FCC has a database of every single licensed TV station in the USA and border areas in Canada and Mexico, along with their antenna patterns, height and power, they can use that data to predict the stations a given zip code is likely to receive under normal conditions with an outdoor antenna. Tribune/Gracenote provides zip code specific OTA lineups for the USA that includes the stations you are likely to receive in your zip code, if there's any neighboring stations missing we can open a lineup ticket, and they can add them to the lineups for our zip codes. (Although if you're someone using a 75 foot tower on your property with giant antennas tuned to specific frequencies to pull in stations from 100 miles away that no one with a regular roof top antenna would be able to get, you're better off just adding a secondary zip code for that distant city) The actual tuning requirements are also the same for everyone watching that channel no matter where you are, if you're pulling in WABC from NYC with an antenna, you are tuning to the frequency for RF channel 7, it's not like the UK where a given BBC One regional feed has different frequencies depending on what transmitter you're pointing to.

Unfortunately with the way DVB-T is, the same methods can't be applied there. (i.e. someone who can get multiple transmitters having listings for both BBC London and BBC South East in their DVB-T lineup) Remember, schedules direct and xmltv are not the same thing, and schedules direct provides a lot more data than just what xmltv supports. The DVB-T lineups aren't just a list of channel numbers and networks you may get in your postal code, it also contains DVB-T tuning data for that specific transmitter, some of the DVB-C and DVB-S lineups have similar data when available. If you use an application that fully supports Schedules Direct's API, they can use that data to avoid the need for a scan.

I'm referring to the US style of a zip code specific OTA lineups based on the stations you can get, instead of the UK style where the OTA lineups are based on the DVB-T transmitter your antenna is pointed to. In the USA each TV station broadcasts their own signal, in the UK they have transmitters broadcasting the full Freeview lineup, they don't have to deal with anything like additional low powered TV stations with signals that only reach specific communities within that area, or cases where not every station broadcasts from the same general area.

The OP was suggesting the USA OTA lineups switch to the /transmitters/country API call too so it's handled the same way, but the differences between the way our stations are broadcast and listed would make that impractical. For one thing the USA has about 43,000 zip codes, even if you subtract the zip codes that don't have OTA lineups because they are PO Box or business only, that's likely still well over 30,000, which would take forever to browse in full and possibly put a burden on your servers, compared to the 85 Freeview transmitters for the UK, 46 for Australia and 6 for New Zealand. Plus, for the USA you just need to know the zip code of the station you're looking for, you don't need a full list to find the ID for the OTA lineup to add it manually, it has a standard format of USA-OTA-ZIPCODE.

tv_grab_sd_json does support multiple lineups, and you have the choice of downloading all the channels you want at the same time from those lineups in one unified xmltv file, or using different config-files and downloading seperate xmltv files for the lineups.

Although if you're using a North American ATSC lineup, you might be better off using tv_grab_na_dd for now, tv_grab_sd_json doesn't currently show the fcc/RF number like na_dd does, and depending on your application it might use that value to automatically map the channel.