From 3225e33fc14a246655904b642a906c9ea288ee70 Mon Sep 17 00:00:00 2001 From: Jared L <48422312+lhjt@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:59:53 +1000 Subject: [PATCH] feat(server): significantly improve Australian reverse geocoding accuracy (#11370) chore(geocoding): ingest australia PPLXs --- server/src/repositories/map.repository.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/src/repositories/map.repository.ts b/server/src/repositories/map.repository.ts index a1a958c517..80b3fd7854 100644 --- a/server/src/repositories/map.repository.ts +++ b/server/src/repositories/map.repository.ts @@ -297,7 +297,16 @@ export class MapRepository implements IMapRepository { admin2Name: admin2Map.get(`${lineSplit[8]}.${lineSplit[10]}.${lineSplit[11]}`), }), resourcePaths.geodata.cities500, - { entityFilter: (lineSplit) => lineSplit[7] != 'PPLX' }, + { + entityFilter: (lineSplit) => { + if (lineSplit[7] === 'PPLX') { + // Exclude populated subsections of cities that are not in Australia. + // Australia has a lot of PPLX areas, so we include them. + return lineSplit[8] === 'AU'; + } + return true; + }, + }, ); }