geography
Locations, addresses, coordinates, and regional identifiers
7 categories, 25 types: 3 a sibling in its category also accepts, 3 accepted by another category's rule, 6 that decompose into parts, 1 flagged as personal data, 3 in Meridian's open data.
The 7 geography categories
Each category's lookup value, against every other category's rule
| Category | Types | Casts to | For example | Within the group | Also accepted by |
|---|---|---|---|---|---|
| 7 | VARCHAR, DOUBLE, POINT | -74.0060 | 1 a sibling also accepts | — | |
| 6 | VARCHAR | US | 2 a sibling also accepts | — | |
| 5 | VARCHAR | 8471.30 | each told apart | location | |
| 4 | VARCHAR | 123 Main Street, New York, N… | each told apart | coordinate | |
| 1 | VARCHAR | +1 | — | — | |
| 1 | VARCHAR | POINT (30 10) | — | — | |
| 1 | VARCHAR | 8928308280fffff | — | coordinate |
Where geography categories overlap
Each type's lookup value, against every other category's rule
| Value | Written by | Also accepted by |
|---|---|---|
| 10001 | address.postal_code | coordinate.geohash |
| 8928308280fffff | index.h3 | coordinate.geohash |
| JFK | transportation.iata_code | location.state_code |
Which geography type is it?
2 of 25 geography types in 2 categories accept it, and read it alike.
Full Address, Postal Code, Street Name, Street Suffix, Longitude, City Name, Continent Name, Country Name and Region / State carry no pattern or format, so they have no rule to ask.
| Type | Category | Reads it as |
|---|---|---|
H3 Hex Index h3 | index | 8928308280fffff |
Geohash geohash | coordinate | 8928308280fffff |
What the engine extracts
- coordinate2 of 7latitude · latitude_deg · latitude_min · longitude · longitude_deg
- transportation1 of 5country · location
- address2 of 4city · first_part · street_name · street_number
- contact1 of 1code
In Meridian's open data
- edgar_gleif
.jurisdictioncountry_code - gleif
.citycity.countrycountry_code.jurisdictioncountry_code - hts
.codehs_code.code_displayhs_code.rate_from_codehs_code - schedule_b
.codehs_code.code_displayhs_code
Use it
One value from each category, each inferred on its own
CLI · DuckDB
$ for v in '-74.0060' 'US' '8471.30' '123 Main Street, New York, NY 10001, USA' '+1' 'POINT (30 10)' '8928308280fffff'; do finetype infer -i "$v"; done
SELECT v, ft_infer(v) FROM (VALUES ('-74.0060'), ('US'), ('8471.30'), ('123 Main Street, New York, NY 10001, USA'), ('+1'), ('POINT (30 10)'), ('8928308280fffff')) t(v);