The spell description makes no mention of how much error is involved. It also doesn't say exactly which part of a city it points to, or whether it points to the nearest part, or what, exactly, counts as 'part of the city' for the purposes of working this out. Additionally, it doesn't say what units it gives its information in, or whether it takes into account travellers, tourists and seasonal workers when determining a settlement's population.
This isn't surprising in any way. Spell descriptions in Dungeons and Dragons are written on the assumption that the spell will be cast by traditional adventurers in traditional adventuring situations, such as "in a dungeon corridor" or "fending off unusually-large spiders," or "when lost in the wilderness." The authors don't include details that would only be relevant when casting a spell from 5000 feet in the air for the same reason they don't include details only relevant when upside-down in a tree: Accounting for all possible campaigns and situations is a lot of work that very few players will ever benefit from or appreciate.
In any case, this spell's author has assumed the spell will only be cast in a specific set of situations, and has accounted for only those situations when writing the spell description. This not a problem; It is an opportunity for your GM to get creative. I could write an entire campaign based around discovering and exploiting the more subtle and undocumented details of spells.
In any case, the only possible way to find out details of spells that aren't included in the rules is to ask your GM, or to perform a set of experiments designed to find out that information in your GM's game.