cities.type fieldEvery city record carries an optional type field describing what kind of
place it is. This page explains where the values come from, what each one
means, and how to filter the dataset down to genuine settlements.
Why this exists:
typeis inherited from the upstream GeoNames feature classification. It mixes two different ideas β what a place is (city,town,village) and what administrative role it fills (adm2,county,parish). The same place can be tagged either way depending on whether it is also the seat of an administrative division. For example, Dallas isadm2because it is the seat of Dallas County, and major Australian cities areadm1because they are seats of state-level governments. Cleanup of this inconsistency is tracked in #1303.
There are 35 distinct values across 156,025 city rows. Counts are a snapshot (2026-05-24) and drift as the data evolves β treat them as approximate.
type |
Count | Settlement? | Meaning |
|---|---|---|---|
city |
96,098 | β | Actual settlements |
adm2 |
20,796 | β | 2nd-order admin division β usually a real city that is also a county/district seat (e.g. Dallas) |
adm3 |
15,774 | β | Mostly real municipalities/communes (small towns) tagged with their admin role |
section |
5,346 | β | Suburbs and districts of larger cities |
county |
4,409 | β | County-level admin unit β not a settlement |
adm4 |
3,909 | β | Similar mix to adm3 |
adm1 |
3,505 | β | 1st-order admin division β usually a state/region seat (e.g. major AU cities) |
district |
2,381 | β | District-level populated place |
| (null) | 1,900 | β οΈ | No type assigned β see Records with no type |
regency |
390 | β | Indonesian kabupaten β admin division |
prefecture |
369 | β | Prefecture-level admin division |
locality |
319 | β | Named populated place |
capital |
281 | β | National/regional capital |
municipality |
209 | β | Municipality |
parish |
80 | β | Louisiana-style parish (= county) |
banner |
52 | β | Inner Mongolia banner β admin division |
town |
48 | β | Town |
province |
36 | β | Province-level admin division |
adm5 |
16 | β | 5th-order admin division (populated) |
abandoned |
15 | β | Abandoned place β not a live settlement |
cities |
13 | β | Data artifact of city |
area |
12 | β | Generic administrative area |
village |
10 | β | Village |
historical |
9 | β | Historical place β not a live settlement |
settlement |
9 | β | Settlement |
oblast |
8 | β | Oblast β admin division |
gov_seat |
6 | β | Government seat (populated) |
special municipality |
6 | β | Special municipality |
administrative zone |
5 | β | Administrative zone |
region |
4 | β | Region-level admin division |
destroyed |
3 | β | Destroyed place β not a live settlement |
township |
3 | β | Township |
religious |
2 | β | Religious site β not a settlement |
subdistrict |
1 | β | Subdistrict (populated) |
historical_capital |
1 | β | Former capital β not a live settlement |
For use cases like βfind the nearest city, town, or village to a locationβ, exclude the admin-only and non-place types. An exclusion list is more robust than an include list, because any new settlement-style value added in future is kept by default.
Exclude these types:
county, regency, prefecture, parish, banner, province, area, oblast,
administrative zone, region, abandoned, historical, destroyed, religious,
historical_capital
SELECT *
FROM cities
WHERE (
type IS NULL -- keep null-type rows (see "Records with no type")
OR type NOT IN (
'county', 'regency', 'prefecture', 'parish', 'banner', 'province',
'area', 'oblast', 'administrative zone', 'region',
'abandoned', 'historical', 'destroyed', 'religious', 'historical_capital'
)
)
AND latitude IS NOT NULL
AND longitude IS NOT NULL;
Note on
NULL:type NOT IN (...)evaluates toUNKNOWN(notTRUE) for rows wheretypeisNULL, so it would silently drop them. The explicittype IS NULL OR ...keeps null-type rows, matching the JavaScript filter below. Drop thetype IS NULLclause if youβd rather exclude them.
const EXCLUDED_TYPES = new Set([
'county', 'regency', 'prefecture', 'parish', 'banner', 'province',
'area', 'oblast', 'administrative zone', 'region',
'abandoned', 'historical', 'destroyed', 'religious', 'historical_capital',
]);
const settlements = cities.filter(
(c) => !EXCLUDED_TYPES.has(c.type) && c.latitude != null && c.longitude != null
);
This keeps all city/adm*/town/village/section/locality-style rows
(including admin seats like Dallas and Sydney) while dropping pure
administrative units and defunct places.
About 1,900 rows have a null type. They are a mix of legitimate places
and unclassified entries. For strict settlement queries, the safest signal is
the presence of valid coordinates (latitude/longitude not null), and β
where available β a non-null population.