[NZ] Check and fix NZ phone numbers

I’ve just added New Zealand to my phone number tool, which has found 4% (549/13446) of phone numbers to be invalid/incorrectly formatted. Most of these should be very easy to fix, and this can be done from the website itself. Take a look and see if you can fix any and let me know if you see any issues.

If all looks good, then the simple ones can be fixed automatically in an ongoing bot edit which is already running in UK, USA, Canada, South Africa, Switzerland, Austria and Germany.

Australia has been on there for a few months and has been kept down to very few invalid numbers, and being fixed fairly quickly.

Other countries/territories can be added quite easily if there is interest.

3 Likes

& done! :grinning_face:

We don’t seem to have seen much action here. I’d love for an NZ local to take a look, confirm that the edits seem to make sense, then the bot can be enabled so that we don’t keep getting more invalid phone numbers and can address the actual errors in the data.

a few of the proposed changes are wrong unfortunately. Our existing tool for phonenumber formats has a hardcoded exeption to handle 0800 *, since these numbers can only be called from within the country, and +64 0800 * is wrong. These numbers should be moved to phone:NZ, likewise for all such numbers.

but everything else looks good! the last time we did a country-wide fix was 14 months ago, so I’m surpised there’s already 589 new issues :sweat_smile:

1 Like

Thank you very much, that is exactly the sort of feedback that I was looking for.

I hadn’t realised about the prior work of a phone number tool, although that repository appears to be private, so I can’t see the code.

I know that different communities have different thoughts about the formatting of toll-free numbers, so I have made such numbers not get formatted to international format in New Zealand, which has slightly decreased the number of invalid numbers detected.

Personally, I think that regardless of where a number can be called from, it should be mapped on phone and not relegated to a subkey, such as phone:NZ, in particular since the latter has no support that I am aware of from any editor or data consumer. The advice on the wiki is that keys such as phone:NZ should be used in addition to, not instead of, phone. I would therefore not want to automatically move valid phone numbers out of the phone tag.

I also note that in that country-wide fix you did that there were some numbers which were only changed in formatting, e.g. +6433252696 to +64 3 325 2696. I am not generally considering such cases as issues, but if desired then I could add an exception for NZ to ‘fix’ these.

1 Like

sorry lol, i just made it public. it’s nothing insightful, just a random script to run libphonenumber-js on every phone=* tag.

that’s my opinion too, but various people support tags like phone:AU and phone:NZ, so I’m happy to follow the status quo. But it is indeed annoying.

@Fizzie-DWG maybe you can share some insight about these tags, since I saw you opened this issue in iD about phone:AU?

1 Like

That’s not actually what it says. If I may quote:

Also some amenities have a local phone number which can only be used domestically not [sic] cannot be called internationally (notably for toll free phone numbers, or abbreviated phone numbers). For international calls, they publish another phone number.

What we are talking about here are POIs that only have a local free call number. If they have an internationally callable number then that would go under phone.

Phone numbers in Australia have been tagged in the same way.

Ah yes, I realise I was reading between the lines.

Regardless, it seems that it will be fine with the community to leave such toll-free numbers in the phone tag, in national format if that is how they are mapped. If someone else wants to move them and has community support then they can go ahead.

I was trying to let you know that’s how the Australian community has chosen to map these free call numbers. It would appear that the NZ community has come to the same conclusion.

Not sure what you mean by “international format”?

At least for phone:AU numbers, they should all (?) appear as either 13x xxx or 1800 / 1300 yyy yyy.

I “think” NZ has the same formatting?

Can’t really say an awful lot more than what I put there!

As requested, have now created a (very basic!) wiki page: Key☎AU - OpenStreetMap Wiki , which in turn, references Australian Tagging Guidelines/Australian features - OpenStreetMap Wiki & Key:phone - OpenStreetMap Wiki

1 Like

Yep - NZ uses the same as Australia

1 Like

That’s not what I read from this:

I meant +64 800 … and national format meant 0800 …

Regardless, I can see that phone:AU and to a lesser extent, phone:NZ have been used, I just disagree with the tag. I think it’s bad enough having 5 different tags[1] for phone numbers, and adding another 200 or so doesn’t seem to help much.

I consider this out of scope for the current discussion. Toll free numbers won’t be reformatted to international format by the edit (or suggested by the tool), and also won’t be moved to another tag.


  1. phone, contact:phone, mobile, contact:mobile, phone:mobile ↩︎

I see that @TheSwavu has gone through and done most of the fixes in JOSM, just leaving the ‘interesting’ cases, like duplicate numbers in different tags or non-mobile numbers mapped in mobile. These wouldn’t be fixed by the bot anyway.

So since I’ve seen no opposition to the proposed bot edits, and if anything the opinions are that it doesn’t go far enough, I’m planning to enable it for New Zealand soon, to fix any newly occurring issues as they show up.

1 Like